00001 #include "xdr.h" 00002 00003 static FILE *_send, *_recv; 00004 00005 void 00006 db__set_protocol_fds (FILE *send, FILE *recv) 00007 { 00008 _send = send; 00009 _recv = recv; 00010 } 00011 00012 int 00013 xdr_begin_send(XDR *xdrs) 00014 { 00015 xdrstdio_create (xdrs, _send, XDR_ENCODE); 00016 } 00017 00018 int 00019 xdr_begin_recv(XDR *xdrs) 00020 { 00021 xdrstdio_create (xdrs, _recv, XDR_DECODE); 00022 } 00023 00024 int 00025 xdr_end_send(XDR *xdrs) 00026 { 00027 fflush(_send); 00028 xdr_destroy (xdrs); 00029 } 00030 00031 int 00032 xdr_end_recv(XDR *xdrs) 00033 { 00034 xdr_destroy (xdrs); 00035 }