Back to index

glibc  2.9
pmap_prot.c
Go to the documentation of this file.
00001 /* @(#)pmap_prot.c   2.1 88/07/29 4.0 RPCSRC */
00002 /*
00003  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
00004  * unrestricted use provided that this legend is included on all tape
00005  * media and as a part of the software program in whole or part.  Users
00006  * may copy or modify Sun RPC without charge, but are not authorized
00007  * to license or distribute it to anyone else except as part of a product or
00008  * program developed by the user.
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 #if !defined(lint) && defined(SCCSIDS)
00031 static char sccsid[] = "@(#)pmap_prot.c 1.17 87/08/11 Copyr 1984 Sun Micro";
00032 #endif
00033 
00034 /*
00035  * pmap_prot.c
00036  * Protocol for the local binder service, or pmap.
00037  *
00038  * Copyright (C) 1984, Sun Microsystems, Inc.
00039  */
00040 
00041 #include <rpc/types.h>
00042 #include <rpc/xdr.h>
00043 #include <rpc/pmap_prot.h>
00044 
00045 
00046 bool_t
00047 xdr_pmap (xdrs, regs)
00048      XDR *xdrs;
00049      struct pmap *regs;
00050 {
00051 
00052   if (INTUSE(xdr_u_long) (xdrs, &regs->pm_prog) &&
00053       INTUSE(xdr_u_long) (xdrs, &regs->pm_vers) &&
00054       INTUSE(xdr_u_long) (xdrs, &regs->pm_prot))
00055     return INTUSE(xdr_u_long) (xdrs, &regs->pm_port);
00056   return FALSE;
00057 }
00058 INTDEF(xdr_pmap)