Back to index

glibc  2.9
ypupdate_xdr.c
Go to the documentation of this file.
00001 /*
00002  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
00003  * unrestricted use provided that this legend is included on all tape
00004  * media and as a part of the software program in whole or part.  Users
00005  * may copy or modify Sun RPC without charge, but are not authorized
00006  * to license or distribute it to anyone else except as part of a product or
00007  * program developed by the user or with the express written consent of
00008  * Sun Microsystems, Inc.
00009  *
00010  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
00011  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
00012  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
00013  *
00014  * Sun RPC is provided with no support and without any obligation on the
00015  * part of Sun Microsystems, Inc. to assist in its use, correction,
00016  * modification or enhancement.
00017  *
00018  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
00019  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
00020  * OR ANY PART THEREOF.
00021  *
00022  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
00023  * or profits or other special, indirect and consequential damages, even if
00024  * Sun has been advised of the possibility of such damages.
00025  *
00026  * Sun Microsystems, Inc.
00027  * 2550 Garcia Avenue
00028  * Mountain View, California  94043
00029  */
00030 /*
00031  * Copyright (c) 1986, 1990 by Sun Microsystems, Inc.
00032  */
00033 
00034 #include <rpcsvc/ypupd.h>
00035 
00036 bool_t
00037 xdr_yp_buf (XDR *xdrs, yp_buf *objp)
00038 {
00039   return xdr_bytes (xdrs, (char **) &objp->yp_buf_val,
00040                   (u_int *) &objp->yp_buf_len, ~0);
00041 }
00042 libnsl_hidden_def (xdr_yp_buf)
00043 
00044 bool_t
00045 xdr_ypupdate_args (XDR *xdrs, ypupdate_args *objp)
00046 {
00047   if (!xdr_string (xdrs, &objp->mapname, ~0))
00048     return FALSE;
00049   if (!xdr_yp_buf (xdrs, &objp->key))
00050     return FALSE;
00051   return xdr_yp_buf (xdrs, &objp->datum);
00052 }
00053 libnsl_hidden_def (xdr_ypupdate_args)
00054 
00055 bool_t
00056 xdr_ypdelete_args (XDR *xdrs, ypdelete_args *objp)
00057 {
00058   if (!xdr_string (xdrs, &objp->mapname, ~0))
00059     return FALSE;
00060   return xdr_yp_buf (xdrs, &objp->key);
00061 }
00062 libnsl_hidden_def (xdr_ypdelete_args)