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