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