in reply to Re: XDR encoded packet over udp socket
in thread XDR encoded packet over udp socket

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? :(

Replies are listed 'Best First'.
Re^3: XDR encoded packet over udp socket
by Anonymous Monk on Aug 09, 2012 at 09:37 UTC
      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