18360efbdSAlfred Perlstein /* $NetBSD: pmap_prot.c,v 1.10 2000/01/22 22:19:18 mycroft Exp $ */ 28360efbdSAlfred Perlstein 399064799SGarrett Wollman /* 499064799SGarrett Wollman * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 599064799SGarrett Wollman * unrestricted use provided that this legend is included on all tape 699064799SGarrett Wollman * media and as a part of the software program in whole or part. Users 799064799SGarrett Wollman * may copy or modify Sun RPC without charge, but are not authorized 899064799SGarrett Wollman * to license or distribute it to anyone else except as part of a product or 999064799SGarrett Wollman * program developed by the user. 1099064799SGarrett Wollman * 1199064799SGarrett Wollman * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 1299064799SGarrett Wollman * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 1399064799SGarrett Wollman * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 1499064799SGarrett Wollman * 1599064799SGarrett Wollman * Sun RPC is provided with no support and without any obligation on the 1699064799SGarrett Wollman * part of Sun Microsystems, Inc. to assist in its use, correction, 1799064799SGarrett Wollman * modification or enhancement. 1899064799SGarrett Wollman * 1999064799SGarrett Wollman * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 2099064799SGarrett Wollman * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 2199064799SGarrett Wollman * OR ANY PART THEREOF. 2299064799SGarrett Wollman * 2399064799SGarrett Wollman * In no event will Sun Microsystems, Inc. be liable for any lost revenue 2499064799SGarrett Wollman * or profits or other special, indirect and consequential damages, even if 2599064799SGarrett Wollman * Sun has been advised of the possibility of such damages. 2699064799SGarrett Wollman * 2799064799SGarrett Wollman * Sun Microsystems, Inc. 2899064799SGarrett Wollman * 2550 Garcia Avenue 2999064799SGarrett Wollman * Mountain View, California 94043 3099064799SGarrett Wollman */ 3199064799SGarrett Wollman 328360efbdSAlfred Perlstein #include <sys/cdefs.h> 3399064799SGarrett Wollman #if defined(LIBC_SCCS) && !defined(lint) 348360efbdSAlfred Perlstein static char *sccsid = "@(#)pmap_prot.c 1.17 87/08/11 Copyr 1984 Sun Micro"; 358360efbdSAlfred Perlstein static char *sccsid = "@(#)pmap_prot.c 2.1 88/07/29 4.0 RPCSRC"; 367f3dea24SPeter Wemm static char *rcsid = "$FreeBSD$"; 3799064799SGarrett Wollman #endif 3899064799SGarrett Wollman 3999064799SGarrett Wollman /* 4099064799SGarrett Wollman * pmap_prot.c 4199064799SGarrett Wollman * Protocol for the local binder service, or pmap. 4299064799SGarrett Wollman * 4399064799SGarrett Wollman * Copyright (C) 1984, Sun Microsystems, Inc. 4499064799SGarrett Wollman */ 4599064799SGarrett Wollman 468360efbdSAlfred Perlstein #include "namespace.h" 478360efbdSAlfred Perlstein #include <assert.h> 488360efbdSAlfred Perlstein 4999064799SGarrett Wollman #include <rpc/types.h> 5099064799SGarrett Wollman #include <rpc/xdr.h> 5199064799SGarrett Wollman #include <rpc/pmap_prot.h> 528360efbdSAlfred Perlstein #include "un-namespace.h" 5399064799SGarrett Wollman 5499064799SGarrett Wollman 5599064799SGarrett Wollman bool_t 5699064799SGarrett Wollman xdr_pmap(xdrs, regs) 5799064799SGarrett Wollman XDR *xdrs; 5899064799SGarrett Wollman struct pmap *regs; 5999064799SGarrett Wollman { 6099064799SGarrett Wollman 618360efbdSAlfred Perlstein assert(xdrs != NULL); 628360efbdSAlfred Perlstein assert(regs != NULL); 638360efbdSAlfred Perlstein 6499064799SGarrett Wollman if (xdr_u_long(xdrs, ®s->pm_prog) && 6599064799SGarrett Wollman xdr_u_long(xdrs, ®s->pm_vers) && 6699064799SGarrett Wollman xdr_u_long(xdrs, ®s->pm_prot)) 6799064799SGarrett Wollman return (xdr_u_long(xdrs, ®s->pm_port)); 6899064799SGarrett Wollman return (FALSE); 6999064799SGarrett Wollman } 70