ONC+ Developer's Guide

Standard I/O Streams

XDR streams can be interfaced to standard I/O using the xdrstdio_create() routine.

#include <stdio.h>
#include <rpc/rpc.h>	/* xdr is part of rpc */

void
xdrstdio_create(xdrs, fp, xdr_op)
   XDR *xdrs;
  	FILE *fp;
   enum xdr_op x_op;

The routine xdrstdio_create() initializes an XDR stream pointed to by xdrs. The XDR stream interfaces to the standard I/O library. Parameter fp is an open file, and x_op is an XDR direction.