Changes the current position in the XDR stream.
C Library (libc.a)
The xdr_setpos macro invokes the set-position routine associated with the eXternal Data Representation (XDR) stream pointed to by the xdrs parameter. The new position setting is obtained from the xdr_getpos macro. The xdr_setpos macro returns a value of false if the set position is not valid or if the requested position is out of bounds.
A position cannot be set in some XDR streams. Trying to set a position in such streams causes the macro to fail. This macro also fails if the programmer requests a position that is not in the stream's boundaries.
Item | Description |
---|---|
xdrs | Points to the XDR stream handle. |
pos | Specifies a position value obtained from the xdr_getpos macro. |
Upon successful completion (if the stream is positioned successfully), this macro returns a value of 1. If unsuccessful, it returns a value of 0.