Fix markup. Fix backslashes to surive roff.
[netbsd-mini2440.git] / dist / tcpdump / rx.h
blob798cdfe120f58e094925ccfaffa6e0ba165cef62
1 /* $NetBSD$ */
3 /*
4 * Copyright: (c) 2000 United States Government as represented by the
5 * Secretary of the Navy. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
16 * distribution.
17 * 3. The names of the authors may not be used to endorse or promote
18 * products derived from this software without specific prior
19 * written permission.
21 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
23 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
26 * Rx protocol format
28 * Id: rx.h,v 1.8 2002/12/11 07:14:11 guy Exp
31 #define FS_RX_PORT 7000
32 #define CB_RX_PORT 7001
33 #define PROT_RX_PORT 7002
34 #define VLDB_RX_PORT 7003
35 #define KAUTH_RX_PORT 7004
36 #define VOL_RX_PORT 7005
37 #define ERROR_RX_PORT 7006 /* Doesn't seem to be used */
38 #define BOS_RX_PORT 7007
40 #ifndef AFSNAMEMAX
41 #define AFSNAMEMAX 256
42 #endif
44 #ifndef AFSOPAQUEMAX
45 #define AFSOPAQUEMAX 1024
46 #endif
48 #define PRNAMEMAX 64
49 #define VLNAMEMAX 65
50 #define KANAMEMAX 64
51 #define BOSNAMEMAX 256
53 #define PRSFS_READ 1 /* Read files */
54 #define PRSFS_WRITE 2 /* Write files */
55 #define PRSFS_INSERT 4 /* Insert files into a directory */
56 #define PRSFS_LOOKUP 8 /* Lookup files into a directory */
57 #define PRSFS_DELETE 16 /* Delete files */
58 #define PRSFS_LOCK 32 /* Lock files */
59 #define PRSFS_ADMINISTER 64 /* Change ACL's */
61 struct rx_header {
62 u_int32_t epoch;
63 u_int32_t cid;
64 u_int32_t callNumber;
65 u_int32_t seq;
66 u_int32_t serial;
67 u_int8_t type;
68 #define RX_PACKET_TYPE_DATA 1
69 #define RX_PACKET_TYPE_ACK 2
70 #define RX_PACKET_TYPE_BUSY 3
71 #define RX_PACKET_TYPE_ABORT 4
72 #define RX_PACKET_TYPE_ACKALL 5
73 #define RX_PACKET_TYPE_CHALLENGE 6
74 #define RX_PACKET_TYPE_RESPONSE 7
75 #define RX_PACKET_TYPE_DEBUG 8
76 #define RX_PACKET_TYPE_PARAMS 9
77 #define RX_PACKET_TYPE_VERSION 13
78 u_int8_t flags;
79 #define RX_CLIENT_INITIATED 1
80 #define RX_REQUEST_ACK 2
81 #define RX_LAST_PACKET 4
82 #define RX_MORE_PACKETS 8
83 #define RX_FREE_PACKET 16
84 #define RX_SLOW_START_OK 32
85 #define RX_JUMBO_PACKET 32
86 u_int8_t userStatus;
87 u_int8_t securityIndex;
88 u_int16_t spare; /* How clever: even though the AFS */
89 u_int16_t serviceId; /* header files indicate that the */
90 }; /* serviceId is first, it's really */
91 /* encoded _after_ the spare field */
92 /* I wasted a day figuring that out! */
94 #define NUM_RX_FLAGS 7
96 #define RX_MAXACKS 255
98 struct rx_ackPacket {
99 u_int16_t bufferSpace; /* Number of packet buffers available */
100 u_int16_t maxSkew; /* Max diff between ack'd packet and */
101 /* highest packet received */
102 u_int32_t firstPacket; /* The first packet in ack list */
103 u_int32_t previousPacket; /* Previous packet recv'd (obsolete) */
104 u_int32_t serial; /* # of packet that prompted the ack */
105 u_int8_t reason; /* Reason for acknowledgement */
106 u_int8_t nAcks; /* Number of acknowledgements */
107 u_int8_t acks[RX_MAXACKS]; /* Up to RX_MAXACKS acknowledgements */
111 * Values for the acks array
114 #define RX_ACK_TYPE_NACK 0 /* Don't have this packet */
115 #define RX_ACK_TYPE_ACK 1 /* I have this packet */