Home | History | Annotate | Line # | Download | only in ypserv
      1 /*	$NetBSD: ypserv_xdr.c,v 1.4 2003/11/12 13:31:08 grant Exp $	*/
      2 
      3 /*
      4  * This file was originally generated with rpcgen, then modified
      5  * by Jason R. Thorpe <thorpej (at) NetBSD.org>.
      6  */
      7 
      8 #include <sys/cdefs.h>
      9 #ifndef lint
     10 __RCSID("$NetBSD: ypserv_xdr.c,v 1.4 2003/11/12 13:31:08 grant Exp $");
     11 #endif
     12 
     13 #include <sys/types.h>
     14 
     15 #include <rpc/rpc.h>
     16 #include <rpc/xdr.h>
     17 #include <rpcsvc/yp_prot.h>
     18 
     19 #include "ypserv.h"
     20 
     21 bool_t
     22 xdr_ypresp_all(XDR *xdrs, struct ypresp_all *objp)
     23 {
     24 
     25 	if (!xdr_bool(xdrs, &objp->more))
     26 		return FALSE;
     27 
     28 	switch (objp->more) {
     29 	case TRUE:
     30 		if (!xdr_ypresp_key_val(xdrs, &objp->ypresp_all_u.val))
     31 			return FALSE;
     32 
     33 		break;
     34 
     35 	case FALSE:
     36 		break;
     37 
     38 	default:
     39 		return FALSE;
     40 	}
     41 
     42 	return TRUE;
     43 }
     44