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