2 * the regents of the university of michigan
5 * permission is granted to use, copy, create derivative works and
6 * redistribute this software and such derivative works for any purpose,
7 * so long as the name of the university of michigan is not used in
8 * any advertising or publicity pertaining to the use or distribution
9 * of this software without specific, written prior authorization. if
10 * the above copyright notice or any other identification of the
11 * university of michigan is included in any copy of any portion of
12 * this software, then the disclaimer below must also be included.
14 * this software is provided as is, without representation from the
15 * university of michigan as to its fitness for any purpose, and without
16 * warranty by the university of michigan of any kind, either express
17 * or implied, including without limitation the implied warranties of
18 * merchantability and fitness for a particular purpose. the regents
19 * of the university of michigan shall not be liable for any damages,
20 * including special, indirect, incidental, or consequential damages,
21 * with respect to any claim arising out or in connection with the use
22 * of the software, even if it has been or is hereafter advised of the
23 * possibility of such damages.
28 * 03-jun 2005 (eric williams) entered into versioning
41 /* maximum number of users, based on SID, that can access AFS at one time */
42 #define MAX_AFS_USERS 256
44 /* maximum number of threads that can make simultaneous calls into afsrdr,
45 because we maintain a credential set for each thread in a single table. */
46 #define MAX_CRED_MAPS 64
48 /* size if outgoing/incoming RPC buffer (for parameters only, not bulk data) */
49 #define RPC_BUF_SIZE 2048
51 /* max. chunk size for RPC transfers */
52 #define TRANSFER_CHUNK_SIZE (1024*1024)
56 #define RPC_NAMEI 0x10
57 #define RPC_CHECK_ACCESS 0x11
58 #define RPC_CREATE 0x12
61 #define RPC_WRITE 0x15
62 #define RPC_TRUNC 0x16
63 #define RPC_SETINFO 0x17
64 #define RPC_READDIR 0x18
65 #define RPC_CLOSE 0x19
66 #define RPC_UNLINK 0x1A
67 #define RPC_IOCTL_WRITE 0x1B
68 #define RPC_IOCTL_READ 0x1C
69 #define RPC_RENAME 0x1D
70 #define RPC_FLUSH 0x1E
74 #define RPC_BREAK_CALLBACK 0x80
75 #define RPC_RELEASE_HOOKS 0x81
78 /* internal module flags */
79 #define RPC_TIMEOUT_SHORT 0
80 #define RPC_TIMEOUT_LONG 1
83 /* internal data struct for both client and server */
95 ULONG bulk_in_len, bulk_in_max;
97 char *out_buf, *out_pos;
98 char *in_buf, *in_pos;
101 typedef struct rpc rpc_t;
104 /* application interface into rpc library */
106 rpc_call(ULONG in_len, char *in_buf, ULONG out_max, char *out_buf, ULONG *out_len);
107 rpc_set_context(void *context);
108 rpc_remove_context();
109 rpc_get_len(rpc_t *rpc);
110 rpc_send(char *out_buf, int out_len, int *out_written);
111 rpc_recv(char *in_buf, ULONG len);
116 rpc_parse(rpc_t *rpc);