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