Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / tcpdump / rpc_msg.h
blob719e47fe8ecd2ee4ae271e08e2b00c18806024d6
1 /* $NetBSD$ */
3 /* @(#) Header: /tcpdump/master/tcpdump/rpc_msg.h,v 1.1.2.1 2005/04/27 21:44:07 guy Exp (LBL) */
4 /*
5 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
6 * unrestricted use provided that this legend is included on all tape
7 * media and as a part of the software program in whole or part. Users
8 * may copy or modify Sun RPC without charge, but are not authorized
9 * to license or distribute it to anyone else except as part of a product or
10 * program developed by the user.
12 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
13 * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
16 * Sun RPC is provided with no support and without any obligation on the
17 * part of Sun Microsystems, Inc. to assist in its use, correction,
18 * modification or enhancement.
20 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
21 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
22 * OR ANY PART THEREOF.
24 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
25 * or profits or other special, indirect and consequential damages, even if
26 * Sun has been advised of the possibility of such damages.
28 * Sun Microsystems, Inc.
29 * 2550 Garcia Avenue
30 * Mountain View, California 94043
32 * from: @(#)rpc_msg.h 1.7 86/07/16 SMI
33 * from: @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC
34 * $FreeBSD: src/include/rpc/rpc_msg.h,v 1.11.2.1 1999/08/29 14:39:07 peter Exp $
38 * rpc_msg.h
39 * rpc message definition
41 * Copyright (C) 1984, Sun Microsystems, Inc.
44 #define SUNRPC_MSG_VERSION ((u_int32_t) 2)
47 * Bottom up definition of an rpc message.
48 * NOTE: call and reply use the same overall stuct but
49 * different parts of unions within it.
52 enum sunrpc_msg_type {
53 SUNRPC_CALL=0,
54 SUNRPC_REPLY=1
57 enum sunrpc_reply_stat {
58 SUNRPC_MSG_ACCEPTED=0,
59 SUNRPC_MSG_DENIED=1
62 enum sunrpc_accept_stat {
63 SUNRPC_SUCCESS=0,
64 SUNRPC_PROG_UNAVAIL=1,
65 SUNRPC_PROG_MISMATCH=2,
66 SUNRPC_PROC_UNAVAIL=3,
67 SUNRPC_GARBAGE_ARGS=4,
68 SUNRPC_SYSTEM_ERR=5
71 enum sunrpc_reject_stat {
72 SUNRPC_RPC_MISMATCH=0,
73 SUNRPC_AUTH_ERROR=1
77 * Reply part of an rpc exchange
81 * Reply to an rpc request that was rejected by the server.
83 struct sunrpc_rejected_reply {
84 u_int32_t rj_stat; /* enum reject_stat */
85 union {
86 struct {
87 u_int32_t low;
88 u_int32_t high;
89 } RJ_versions;
90 u_int32_t RJ_why; /* enum auth_stat - why authentication did not work */
91 } ru;
92 #define rj_vers ru.RJ_versions
93 #define rj_why ru.RJ_why
97 * Body of a reply to an rpc request.
99 struct sunrpc_reply_body {
100 u_int32_t rp_stat; /* enum reply_stat */
101 struct sunrpc_rejected_reply rp_reject; /* if rejected */
105 * Body of an rpc request call.
107 struct sunrpc_call_body {
108 u_int32_t cb_rpcvers; /* must be equal to two */
109 u_int32_t cb_prog;
110 u_int32_t cb_vers;
111 u_int32_t cb_proc;
112 struct sunrpc_opaque_auth cb_cred;
113 /* followed by opaque verifier */
117 * The rpc message
119 struct sunrpc_msg {
120 u_int32_t rm_xid;
121 u_int32_t rm_direction; /* enum msg_type */
122 union {
123 struct sunrpc_call_body RM_cmb;
124 struct sunrpc_reply_body RM_rmb;
125 } ru;
126 #define rm_call ru.RM_cmb
127 #define rm_reply ru.RM_rmb
129 #define acpted_rply ru.RM_rmb.ru.RP_ar
130 #define rjcted_rply ru.RM_rmb.ru.RP_dr