rx.h revision 56893
1/*
2 * Rx protocol format
3 *
4 * $Id: rx.h,v 1.1 1999/11/17 05:45:58 assar 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
37struct 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_char 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_char 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_char userStatus;
61	u_char securityIndex;
62	u_short spare;			/* How clever: even though the AFS */
63	u_short 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