]>
The Tcpdump Group git mirrors - tcpdump/blob - win32/Include/Rpc/rpc.h
2 * Copyright (c) 1999 - 2000
3 * NetGroup, Politecnico di Torino (Italy)
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the Politecnico di Torino nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 * failed at remote end
38 AUTH_BADCRED
=1, /* bogus credentials (seal broken) */
39 AUTH_REJECTEDCRED
=2, /* client should begin new session */
40 AUTH_BADVERF
=3, /* bogus verifier (seal broken) */
41 AUTH_REJECTEDVERF
=4, /* verifier expired or was replayed */
42 AUTH_TOOWEAK
=5, /* rejected due to security reasons */
46 AUTH_INVALIDRESP
=6, /* bogus response verifier */
47 AUTH_FAILED
=7 /* some unknown reason */
74 #define u_long unsigned long
75 #define u_int unsigned int
76 #define u_short unsigned short
81 enum_t oa_flavor
; /* flavor of auth */
82 caddr_t oa_base
; /* address of more auth stuff */
83 u_int oa_length
; /* not to exceed MAX_AUTH_BYTES */
86 struct accepted_reply
{
87 struct opaque_auth ar_verf
;
88 enum accept_stat ar_stat
;
98 /* and many other null cases */
100 #define ar_results ru.AR_results
101 #define ar_vers ru.AR_versions
104 struct rejected_reply
{
105 enum reject_stat rj_stat
;
111 enum auth_stat RJ_why
; /* why authentication did not work */
113 #define rj_vers ru.RJ_versions
114 #define rj_why ru.RJ_why
118 enum reply_stat rp_stat
;
120 struct accepted_reply RP_ar
;
121 struct rejected_reply RP_dr
;
123 #define rp_acpt ru.RP_ar
124 #define rp_rjct ru.RP_dr
128 u_long cb_rpcvers
; /* must be equal to two */
132 struct opaque_auth cb_cred
;
133 struct opaque_auth cb_verf
; /* protocol specific - provided by client */
138 enum msg_type rm_direction
;
140 struct call_body RM_cmb
;
141 struct reply_body RM_rmb
;
143 #define rm_call ru.RM_cmb
144 #define rm_reply ru.RM_rmb
147 #define PMAPPORT ((u_short)111)
148 #define PMAPPROG ((u_long)100000)
149 #define PMAPVERS ((u_long)2)
150 #define PMAPVERS_PROTO ((u_long)2)
151 #define PMAPVERS_ORIG ((u_long)1)
152 #define PMAPPROC_NULL ((u_long)0)
153 #define PMAPPROC_SET ((u_long)1)
154 #define PMAPPROC_UNSET ((u_long)2)
155 #define PMAPPROC_GETPORT ((u_long)3)
156 #define PMAPPROC_DUMP ((u_long)4)
157 #define PMAPPROC_CALLIT ((u_long)5)