1*2fe8fb19SBen Gras /* $NetBSD: pmap_prot.h,v 1.9 2005/02/03 04:39:32 perry Exp $ */ 2*2fe8fb19SBen Gras 3*2fe8fb19SBen Gras /* 4*2fe8fb19SBen Gras * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 5*2fe8fb19SBen Gras * unrestricted use provided that this legend is included on all tape 6*2fe8fb19SBen Gras * media and as a part of the software program in whole or part. Users 7*2fe8fb19SBen Gras * may copy or modify Sun RPC without charge, but are not authorized 8*2fe8fb19SBen Gras * to license or distribute it to anyone else except as part of a product or 9*2fe8fb19SBen Gras * program developed by the user. 10*2fe8fb19SBen Gras * 11*2fe8fb19SBen Gras * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 12*2fe8fb19SBen Gras * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 13*2fe8fb19SBen Gras * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 14*2fe8fb19SBen Gras * 15*2fe8fb19SBen Gras * Sun RPC is provided with no support and without any obligation on the 16*2fe8fb19SBen Gras * part of Sun Microsystems, Inc. to assist in its use, correction, 17*2fe8fb19SBen Gras * modification or enhancement. 18*2fe8fb19SBen Gras * 19*2fe8fb19SBen Gras * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 20*2fe8fb19SBen Gras * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 21*2fe8fb19SBen Gras * OR ANY PART THEREOF. 22*2fe8fb19SBen Gras * 23*2fe8fb19SBen Gras * In no event will Sun Microsystems, Inc. be liable for any lost revenue 24*2fe8fb19SBen Gras * or profits or other special, indirect and consequential damages, even if 25*2fe8fb19SBen Gras * Sun has been advised of the possibility of such damages. 26*2fe8fb19SBen Gras * 27*2fe8fb19SBen Gras * Sun Microsystems, Inc. 28*2fe8fb19SBen Gras * 2550 Garcia Avenue 29*2fe8fb19SBen Gras * Mountain View, California 94043 30*2fe8fb19SBen Gras * 31*2fe8fb19SBen Gras * from: @(#)pmap_prot.h 1.14 88/02/08 SMI 32*2fe8fb19SBen Gras * @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC 33*2fe8fb19SBen Gras */ 34*2fe8fb19SBen Gras 35*2fe8fb19SBen Gras /* 36*2fe8fb19SBen Gras * pmap_prot.h 37*2fe8fb19SBen Gras * Protocol for the local binder service, or pmap. 38*2fe8fb19SBen Gras * 39*2fe8fb19SBen Gras * Copyright (C) 1984, Sun Microsystems, Inc. 40*2fe8fb19SBen Gras * 41*2fe8fb19SBen Gras * The following procedures are supported by the protocol: 42*2fe8fb19SBen Gras * 43*2fe8fb19SBen Gras * PMAPPROC_NULL() returns () 44*2fe8fb19SBen Gras * takes nothing, returns nothing 45*2fe8fb19SBen Gras * 46*2fe8fb19SBen Gras * PMAPPROC_SET(struct pmap) returns (bool_t) 47*2fe8fb19SBen Gras * TRUE is success, FALSE is failure. Registers the tuple 48*2fe8fb19SBen Gras * [prog, vers, prot, port]. 49*2fe8fb19SBen Gras * 50*2fe8fb19SBen Gras * PMAPPROC_UNSET(struct pmap) returns (bool_t) 51*2fe8fb19SBen Gras * TRUE is success, FALSE is failure. Un-registers pair 52*2fe8fb19SBen Gras * [prog, vers]. prot and port are ignored. 53*2fe8fb19SBen Gras * 54*2fe8fb19SBen Gras * PMAPPROC_GETPORT(struct pmap) returns (long unsigned). 55*2fe8fb19SBen Gras * 0 is failure. Otherwise returns the port number where the pair 56*2fe8fb19SBen Gras * [prog, vers] is registered. It may lie! 57*2fe8fb19SBen Gras * 58*2fe8fb19SBen Gras * PMAPPROC_DUMP() RETURNS (struct pmaplist *) 59*2fe8fb19SBen Gras * 60*2fe8fb19SBen Gras * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>) 61*2fe8fb19SBen Gras * RETURNS (port, string<>); 62*2fe8fb19SBen Gras * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs); 63*2fe8fb19SBen Gras * Calls the procedure on the local machine. If it is not registered, 64*2fe8fb19SBen Gras * this procedure is quite; ie it does not return error information!!! 65*2fe8fb19SBen Gras * This procedure only is supported on rpc/udp and calls via 66*2fe8fb19SBen Gras * rpc/udp. This routine only passes null authentication parameters. 67*2fe8fb19SBen Gras * This file has no interface to xdr routines for PMAPPROC_CALLIT. 68*2fe8fb19SBen Gras * 69*2fe8fb19SBen Gras * The service supports remote procedure calls on udp/ip or tcp/ip socket 111. 70*2fe8fb19SBen Gras */ 71*2fe8fb19SBen Gras 72*2fe8fb19SBen Gras #ifndef _RPC_PMAP_PROT_H_ 73*2fe8fb19SBen Gras #define _RPC_PMAP_PROT_H_ 74*2fe8fb19SBen Gras #include <sys/cdefs.h> 75*2fe8fb19SBen Gras 76*2fe8fb19SBen Gras #define PMAPPORT ((u_short)111) 77*2fe8fb19SBen Gras #define PMAPPROG ((u_long)100000) 78*2fe8fb19SBen Gras #define PMAPVERS ((u_long)2) 79*2fe8fb19SBen Gras #define PMAPVERS_PROTO ((u_long)2) 80*2fe8fb19SBen Gras #define PMAPVERS_ORIG ((u_long)1) 81*2fe8fb19SBen Gras #define PMAPPROC_NULL ((u_long)0) 82*2fe8fb19SBen Gras #define PMAPPROC_SET ((u_long)1) 83*2fe8fb19SBen Gras #define PMAPPROC_UNSET ((u_long)2) 84*2fe8fb19SBen Gras #define PMAPPROC_GETPORT ((u_long)3) 85*2fe8fb19SBen Gras #define PMAPPROC_DUMP ((u_long)4) 86*2fe8fb19SBen Gras #define PMAPPROC_CALLIT ((u_long)5) 87*2fe8fb19SBen Gras 88*2fe8fb19SBen Gras struct pmap { 89*2fe8fb19SBen Gras long unsigned pm_prog; 90*2fe8fb19SBen Gras long unsigned pm_vers; 91*2fe8fb19SBen Gras long unsigned pm_prot; 92*2fe8fb19SBen Gras long unsigned pm_port; 93*2fe8fb19SBen Gras }; 94*2fe8fb19SBen Gras 95*2fe8fb19SBen Gras struct pmaplist { 96*2fe8fb19SBen Gras struct pmap pml_map; 97*2fe8fb19SBen Gras struct pmaplist *pml_next; 98*2fe8fb19SBen Gras }; 99*2fe8fb19SBen Gras 100*2fe8fb19SBen Gras __BEGIN_DECLS 101*2fe8fb19SBen Gras extern bool_t xdr_pmap (XDR *, struct pmap *); 102*2fe8fb19SBen Gras extern bool_t xdr_pmaplist (XDR *, struct pmaplist **); 103*2fe8fb19SBen Gras extern bool_t xdr_pmaplist_ptr (XDR *, struct pmaplist *); 104*2fe8fb19SBen Gras __END_DECLS 105*2fe8fb19SBen Gras 106*2fe8fb19SBen Gras #endif /* !_RPC_PMAP_PROT_H_ */ 107