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