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