xref: /onnv-gate/usr/src/lib/libbc/inc/include/rpc/pmap_prot.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * CDDL HEADER START
3*0Sstevel@tonic-gate  *
4*0Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate  * with the License.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate  * and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate  *
20*0Sstevel@tonic-gate  * CDDL HEADER END
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
23*0Sstevel@tonic-gate 
24*0Sstevel@tonic-gate /*
25*0Sstevel@tonic-gate  * pmap_prot.h
26*0Sstevel@tonic-gate  * Protocol for the local binder service, or pmap.
27*0Sstevel@tonic-gate  *
28*0Sstevel@tonic-gate  * Copyright (C) 1984, Sun Microsystems, Inc.
29*0Sstevel@tonic-gate  *
30*0Sstevel@tonic-gate  * The following procedures are supported by the protocol:
31*0Sstevel@tonic-gate  *
32*0Sstevel@tonic-gate  * PMAPPROC_NULL() returns ()
33*0Sstevel@tonic-gate  * 	takes nothing, returns nothing
34*0Sstevel@tonic-gate  *
35*0Sstevel@tonic-gate  * PMAPPROC_SET(struct pmap) returns (bool_t)
36*0Sstevel@tonic-gate  * 	TRUE is success, FALSE is failure.  Registers the tuple
37*0Sstevel@tonic-gate  *	[prog, vers, prot, port].
38*0Sstevel@tonic-gate  *
39*0Sstevel@tonic-gate  * PMAPPROC_UNSET(struct pmap) returns (bool_t)
40*0Sstevel@tonic-gate  *	TRUE is success, FALSE is failure.  Un-registers pair
41*0Sstevel@tonic-gate  *	[prog, vers].  prot and port are ignored.
42*0Sstevel@tonic-gate  *
43*0Sstevel@tonic-gate  * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
44*0Sstevel@tonic-gate  *	0 is failure.  Otherwise returns the port number where the pair
45*0Sstevel@tonic-gate  *	[prog, vers] is registered.  It may lie!
46*0Sstevel@tonic-gate  *
47*0Sstevel@tonic-gate  * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
48*0Sstevel@tonic-gate  *
49*0Sstevel@tonic-gate  * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
50*0Sstevel@tonic-gate  * 	RETURNS (port, string<>);
51*0Sstevel@tonic-gate  * usage: encapsulatedresults =
52*0Sstevel@tonic-gate  *		PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
53*0Sstevel@tonic-gate  * 	Calls the procedure on the local machine.  If it is not registered,
54*0Sstevel@tonic-gate  *	this procedure is quite; ie it does not return error information!!!
55*0Sstevel@tonic-gate  *	This procedure only is supported on rpc/udp and calls via
56*0Sstevel@tonic-gate  *	rpc/udp.  This routine only passes null authentication parameters.
57*0Sstevel@tonic-gate  *	This file has no interface to xdr routines for PMAPPROC_CALLIT.
58*0Sstevel@tonic-gate  *
59*0Sstevel@tonic-gate  * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
60*0Sstevel@tonic-gate  */
61*0Sstevel@tonic-gate 
62*0Sstevel@tonic-gate #ifndef _rpc_pmap_prot_h
63*0Sstevel@tonic-gate #define	_rpc_pmap_prot_h
64*0Sstevel@tonic-gate 
65*0Sstevel@tonic-gate #define	PMAPPORT		((u_short)111)
66*0Sstevel@tonic-gate #define	PMAPPROG		((u_long)100000)
67*0Sstevel@tonic-gate #define	PMAPVERS		((u_long)2)
68*0Sstevel@tonic-gate #define	PMAPVERS_PROTO		((u_long)2)
69*0Sstevel@tonic-gate #define	PMAPVERS_ORIG		((u_long)1)
70*0Sstevel@tonic-gate #define	PMAPPROC_NULL		((u_long)0)
71*0Sstevel@tonic-gate #define	PMAPPROC_SET		((u_long)1)
72*0Sstevel@tonic-gate #define	PMAPPROC_UNSET		((u_long)2)
73*0Sstevel@tonic-gate #define	PMAPPROC_GETPORT	((u_long)3)
74*0Sstevel@tonic-gate #define	PMAPPROC_DUMP		((u_long)4)
75*0Sstevel@tonic-gate #define	PMAPPROC_CALLIT		((u_long)5)
76*0Sstevel@tonic-gate 
77*0Sstevel@tonic-gate struct pmap {
78*0Sstevel@tonic-gate 	long unsigned pm_prog;
79*0Sstevel@tonic-gate 	long unsigned pm_vers;
80*0Sstevel@tonic-gate 	long unsigned pm_prot;
81*0Sstevel@tonic-gate 	long unsigned pm_port;
82*0Sstevel@tonic-gate };
83*0Sstevel@tonic-gate 
84*0Sstevel@tonic-gate extern bool_t xdr_pmap();
85*0Sstevel@tonic-gate 
86*0Sstevel@tonic-gate struct pmaplist {
87*0Sstevel@tonic-gate 	struct pmap	pml_map;
88*0Sstevel@tonic-gate 	struct pmaplist *pml_next;
89*0Sstevel@tonic-gate };
90*0Sstevel@tonic-gate 
91*0Sstevel@tonic-gate #ifndef KERNEL
92*0Sstevel@tonic-gate extern bool_t xdr_pmaplist();
93*0Sstevel@tonic-gate #endif /*!KERNEL*/
94*0Sstevel@tonic-gate 
95*0Sstevel@tonic-gate #endif /*!_rpc_pmap_prot_h*/
96