ONC+ Developer's Guide

Memory Streams

Memory streams allow the streaming of data into or out of a specified area of memory:

#include <rpc/rpc.h>

xdrmem_create(xdrs, addr, len, x_op)
   XDR *xdrs;
  	char *addr;
  	u_int len;
  	enum xdr_op x_op;

The routine xdrmem_create() initializes an XDR stream in local memory. The memory is pointed to by parameter addr. Parameter len is the length in bytes of the memory. The parameters xdrs and x_op are identical to the corresponding parameters of xdrstdio_create(). Currently, the datagram implementation of RPC uses xdrmem_create(). Complete call or result messages are built in memory before calling the t_sndndata() TLI routine.