in reply to XDR encoded packet over udp socket

If you look inside http://search.cpan.org/~gord/XDR-0.03/ you can see it use pack all over the place

Replies are listed 'Best First'.
Re^2: XDR encoded packet over udp socket
by Anonymous Monk on Aug 09, 2012 at 09:23 UTC
    i know, but i dont understand those functions :(

    sub xdrencode() { my ($args) = shift; my $xid = "FGMS"; my $vers = "1.1"; my $proc = "test"; my $prog = "test2"; my $xdr = XDR->call_packet($xid, $proc, $args, $vers, $prog); return ($xdr); } print &xdrencode("www");


    how do i create such a packet? can anyone give me an example please? :(
        Thanks! ive just overseen those examples -.-

        however, i managed to get the right packet size now, but how can i add the magic number the server asks for?

        // magic value for messages const uint32_t MSG_MAGIC = 0x46474653; // "FGFS" // protocoll version const uint32_t PROTO_VER = 0x00010001; // 1.1