XDR streams can be manipulated with the primitives discussed in this section.
u_int xdr_getpos(xdrs) XDR *xdrs; bool_t xdr_setpos(xdrs, pos) XDR *xdrs; u_int pos; xdr_destroy(xdrs) XDR *xdrs;
The routine xdr_getpo()s()
returns an unsigned integer that describes the current position in the data stream. Warning: In some XDR streams, the value returned by x()dr_getpos() is meaningless; the routine returns a -1 in this case (though -1 should be a legitimate value).
The routine xdr_setpos() sets a stream position to pos. Warning: In some XDR streams, setting a position is impossible; in such cases, xdr_setpos() will return FALSE. This routine will also fail if the requested position is out-of-bounds. The definition of bounds varies from stream to stream.
The xdr_destroy() primitive destroys the XDR stream. Usage of the stream after calling this routine is undefined.