Help request -- RPC/XDR

Tony Facca fsfacca at zoso.lerc.nasa.gov
Sun Dec 9 08:25:08 AEST 1990


I am starting to develop some routines which will send binary data from
the Cray (and others) to the Iris.  I want to send the data directly over
the network.  I will have a send routine on the Cray and a receive routine
on the Iris.  I am attempting to use the XDR routines which both
architectures support.  

I muddled through the Sun Network Programming Guide and got a couple of
the simple examples to work.  I still seem to be missing the point.  As
soon as I try a more complicated transfer, like an array of int, I get an
error on the receive side.  I used RPCGEN to generate the XDR code from
the following:

	struct integer_array {
	   int int_data<>;
	};

This generates what looks like a pretty usable XDR module
xdr_integer_array.  I then stuff calls into the reader and writer
routines:

	xdr_integer_array(&xdrs, i_array)

where i_array is the array of integers I want to pass.  Well this doesn't
work straight away, so I've tried all the different variations on the
declarations and can't seem to pin down the problem.  

What I would like to know is:

o are there any better tutorial-style RPC/XDR manuals available anywhere?

o is it really possible to send arrays of data like this (I assumed so
  since it was possible to send structures) or is it customary to send one
  value at a time?

o is anyone willing to share experiences and perhaps some sample code for
  serializing/deserializing binary data using XDR?

Thanks for any reply's.  
Tony Facca   |   fsfacca at avelon.lerc.nasa.gov      |     phone: 216-433-8318



More information about the Comp.sys.sun mailing list