]> The Tcpdump Group git mirrors - tcpdump/blob - rx.h
always use u_intXX_t for protocol format declaration. char/short/int may not
[tcpdump] / rx.h
1 /*
2 * Rx protocol format
3 *
4 * $Id: rx.h,v 1.3 2000-10-03 02:55:02 itojun Exp $
5 */
6
7 #define FS_RX_PORT 7000
8 #define CB_RX_PORT 7001
9 #define PROT_RX_PORT 7002
10 #define VLDB_RX_PORT 7003
11 #define KAUTH_RX_PORT 7004
12 #define VOL_RX_PORT 7005
13 #define ERROR_RX_PORT 7006 /* Doesn't seem to be used */
14 #define BOS_RX_PORT 7007
15
16 #ifndef AFSNAMEMAX
17 #define AFSNAMEMAX 256
18 #endif
19
20 #ifndef AFSOPAQUEMAX
21 #define AFSOPAQUEMAX 1024
22 #endif
23
24 #define PRNAMEMAX 64
25 #define VLNAMEMAX 65
26 #define KANAMEMAX 64
27 #define BOSNAMEMAX 256
28
29 #define PRSFS_READ 1 /* Read files */
30 #define PRSFS_WRITE 2 /* Write files */
31 #define PRSFS_INSERT 4 /* Insert files into a directory */
32 #define PRSFS_LOOKUP 8 /* Lookup files into a directory */
33 #define PRSFS_DELETE 16 /* Delete files */
34 #define PRSFS_LOCK 32 /* Lock files */
35 #define PRSFS_ADMINISTER 64 /* Change ACL's */
36
37 struct rx_header {
38 u_int32_t epoch;
39 u_int32_t cid;
40 u_int32_t callNumber;
41 u_int32_t seq;
42 u_int32_t serial;
43 u_int8_t type;
44 #define RX_PACKET_TYPE_DATA 1
45 #define RX_PACKET_TYPE_ACK 2
46 #define RX_PACKET_TYPE_BUSY 3
47 #define RX_PACKET_TYPE_ABORT 4
48 #define RX_PACKET_TYPE_ACKALL 5
49 #define RX_PACKET_TYPE_CHALLENGE 6
50 #define RX_PACKET_TYPE_RESPONSE 7
51 #define RX_PACKET_TYPE_DEBUG 8
52 #define RX_PACKET_TYPE_PARAMS 9
53 #define RX_PACKET_TYPE_VERSION 13
54 u_int8_t flags;
55 #define RX_CLIENT_INITIATED 1
56 #define RX_REQUEST_ACK 2
57 #define RX_LAST_PACKET 4
58 #define RX_MORE_PACKETS 8
59 #define RX_FREE_PACKET 16
60 u_int8_t userStatus;
61 u_int8_t securityIndex;
62 u_int16_t spare; /* How clever: even though the AFS */
63 u_int16_t serviceId; /* header files indicate that the */
64 }; /* serviceId is first, it's really */
65 /* encoded _after_ the spare field */
66 /* I wasted a day figuring that out! */
67
68 #define NUM_RX_FLAGS 5
69
70 #define RX_MAXACKS 255
71
72 struct rx_ackPacket {
73 u_int16_t bufferSpace; /* Number of packet buffers available */
74 u_int16_t maxSkew; /* Max diff between ack'd packet and */
75 /* highest packet received */
76 u_int32_t firstPacket; /* The first packet in ack list */
77 u_int32_t previousPacket; /* Previous packet recv'd (obsolete) */
78 u_int32_t serial; /* # of packet that prompted the ack */
79 u_int8_t reason; /* Reason for acknowledgement */
80 u_int8_t nAcks; /* Number of acknowledgements */
81 u_int8_t acks[RX_MAXACKS]; /* Up to RX_MAXACKS acknowledgements */
82 };
83
84 /*
85 * Values for the acks array
86 */
87
88 #define RX_ACK_TYPE_NACK 0 /* Don't have this packet */
89 #define RX_ACK_TYPE_ACK 1 /* I have this packet */