1190207Srpaulo/* @(#) $Header: /tcpdump/master/tcpdump/pmap_prot.h,v 1.3 2005-04-27 21:43:48 guy Exp $ (LBL) */
2146773Ssam/*
3146773Ssam * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
4146773Ssam * unrestricted use provided that this legend is included on all tape
5146773Ssam * media and as a part of the software program in whole or part.  Users
6146773Ssam * may copy or modify Sun RPC without charge, but are not authorized
7146773Ssam * to license or distribute it to anyone else except as part of a product or
8146773Ssam * program developed by the user.
9146773Ssam *
10146773Ssam * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
11146773Ssam * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12146773Ssam * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
13146773Ssam *
14146773Ssam * Sun RPC is provided with no support and without any obligation on the
15146773Ssam * part of Sun Microsystems, Inc. to assist in its use, correction,
16146773Ssam * modification or enhancement.
17146773Ssam *
18146773Ssam * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
19146773Ssam * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
20146773Ssam * OR ANY PART THEREOF.
21146773Ssam *
22146773Ssam * In no event will Sun Microsystems, Inc. be liable for any lost revenue
23146773Ssam * or profits or other special, indirect and consequential damages, even if
24146773Ssam * Sun has been advised of the possibility of such damages.
25146773Ssam *
26146773Ssam * Sun Microsystems, Inc.
27146773Ssam * 2550 Garcia Avenue
28146773Ssam * Mountain View, California  94043
29146773Ssam *
30146773Ssam *	from: @(#)pmap_prot.h 1.14 88/02/08 SMI
31146773Ssam *	from: @(#)pmap_prot.h	2.1 88/07/29 4.0 RPCSRC
32146773Ssam * $FreeBSD$
33190207Srpaulo * FreeBSD: src/include/rpc/pmap_prot.h,v 1.9.2.1 1999/08/29 14:39:05 peter Exp
34146773Ssam */
35146773Ssam
36146773Ssam/*
37146773Ssam * pmap_prot.h
38146773Ssam * Protocol for the local binder service, or pmap.
39146773Ssam *
40146773Ssam * Copyright (C) 1984, Sun Microsystems, Inc.
41146773Ssam *
42146773Ssam * The following procedures are supported by the protocol:
43146773Ssam *
44146773Ssam * PMAPPROC_NULL() returns ()
45146773Ssam * 	takes nothing, returns nothing
46146773Ssam *
47146773Ssam * PMAPPROC_SET(struct pmap) returns (bool_t)
48146773Ssam * 	TRUE is success, FALSE is failure.  Registers the tuple
49146773Ssam *	[prog, vers, prot, port].
50146773Ssam *
51146773Ssam * PMAPPROC_UNSET(struct pmap) returns (bool_t)
52146773Ssam *	TRUE is success, FALSE is failure.  Un-registers pair
53146773Ssam *	[prog, vers].  prot and port are ignored.
54146773Ssam *
55146773Ssam * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
56146773Ssam *	0 is failure.  Otherwise returns the port number where the pair
57146773Ssam *	[prog, vers] is registered.  It may lie!
58146773Ssam *
59146773Ssam * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
60146773Ssam *
61146773Ssam * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
62146773Ssam * 	RETURNS (port, string<>);
63146773Ssam * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
64146773Ssam * 	Calls the procedure on the local machine.  If it is not registered,
65146773Ssam *	this procedure is quite; ie it does not return error information!!!
66146773Ssam *	This procedure only is supported on rpc/udp and calls via
67146773Ssam *	rpc/udp.  This routine only passes null authentication parameters.
68146773Ssam *	This file has no interface to xdr routines for PMAPPROC_CALLIT.
69146773Ssam *
70146773Ssam * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
71146773Ssam */
72146773Ssam
73147899Ssam#define SUNRPC_PMAPPORT		((u_int16_t)111)
74147899Ssam#define SUNRPC_PMAPPROG		((u_int32_t)100000)
75147899Ssam#define SUNRPC_PMAPVERS		((u_int32_t)2)
76147899Ssam#define SUNRPC_PMAPVERS_PROTO	((u_int32_t)2)
77147899Ssam#define SUNRPC_PMAPVERS_ORIG	((u_int32_t)1)
78147899Ssam#define SUNRPC_PMAPPROC_NULL	((u_int32_t)0)
79147899Ssam#define SUNRPC_PMAPPROC_SET	((u_int32_t)1)
80147899Ssam#define SUNRPC_PMAPPROC_UNSET	((u_int32_t)2)
81147899Ssam#define SUNRPC_PMAPPROC_GETPORT	((u_int32_t)3)
82147899Ssam#define SUNRPC_PMAPPROC_DUMP	((u_int32_t)4)
83147899Ssam#define SUNRPC_PMAPPROC_CALLIT	((u_int32_t)5)
84146773Ssam
85147899Ssamstruct sunrpc_pmap {
86146773Ssam	u_int32_t pm_prog;
87146773Ssam	u_int32_t pm_vers;
88146773Ssam	u_int32_t pm_prot;
89146773Ssam	u_int32_t pm_port;
90146773Ssam};
91