XDR_ADMIN(3NSL) | Networking Services Library Functions | XDR_ADMIN(3NSL) |
xdr_admin, xdr_control, xdr_getpos, xdr_inline, xdrrec_endofrecord, xdrrec_eof, xdrrec_readbytes, xdrrec_skiprecord, xdr_setpos, xdr_sizeof - library routines for external data representation
XDR library routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Protocols such as remote procedure calls (RPC) use these routines to describe the format of the data.
These routines deal specifically with the management of the XDR stream.
See rpc(3NSL) for the definition of the XDR data structure. Note that any buffers passed to the XDR routines must be properly aligned. It is suggested either that malloc(3C) be used to allocate these buffers, or that the programmer insure that the buffer address is divisible evenly by four.
#include <rpc/xdr.h>
bool_t xdr_control(XDR *xdrs, int req, void *info);
uint_t xdr_getpos(const XDR *xdrs);
rpc_inline_t *xdr_inline(XDR *xdrs, int len);
Warning: xdr_inline() may return NULL if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency, and applications written for portability should not depend on this feature.
bool_t xdrrec_endofrecord(XDR *xdrs, bool_t sendnow);
bool_t xdrrec_eof(XDR *xdrs);
uint_t xdrrec_readbytes(XDR *xdrs, caddr_t addr, uint_t nbytes);
bool_t xdrrec_skiprecord(XDR *xdrs);
bool_t xdr_setpos(XDR *xdrs, const uint_t pos);
Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another. Therefore, applications written for portability should not depend on this feature.
uint_t xdr_sizeof(xdrproc_t func, void *data);
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
MT-Level | Safe |
malloc(3C), rpc(3NSL), xdr_complex(3NSL), xdr_create(3NSL), xdr_simple(3NSL), attributes(7)
May 15, 2017 | OmniOS |