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
32 /* this is based on BUF_FILEHASH, but we were not getting unique hashes */
33 #define FID_HASH_FN(fidp) ((((fidp)->vnode + \
34 ((fidp)->unique << 13) + ((fidp)->unique >> (32-13)) + \
39 /* dirent information */
44 LARGE_INTEGER creation, access, write, change, size;
45 ULONG attribs, name_length; /* chars */
46 CCHAR short_name_length; /* chars */
50 typedef struct readdir_data readdir_data_t;
54 #define IFSL_SUCCESS_BASE 0x00000000
55 #define IFSL_FAIL_BASE 0x80000000
57 #define IFSL_SUCCESS (IFSL_SUCCESS_BASE + 0)
58 #define IFSL_DOES_NOT_EXIST (IFSL_FAIL_BASE + 1)
59 #define IFSL_NOT_IMPLEMENTED (IFSL_FAIL_BASE + 2)
60 #define IFSL_END_OF_ENUM (IFSL_SUCCESS_BASE + 3)
61 #define IFSL_CANNOT_MAKE (IFSL_FAIL_BASE + 4)
62 #define IFSL_END_OF_FILE (IFSL_SUCCESS_BASE + 5)
63 #define IFSL_NO_ACCESS (IFSL_FAIL_BASE + 6)
64 #define IFSL_BUFFER_TOO_SMALL (IFSL_FAIL_BASE + 7)
65 #define IFSL_SHARING_VIOLATION (IFSL_FAIL_BASE + 8)
66 #define IFSL_BAD_INPUT (IFSL_FAIL_BASE + 9)
67 #define IFSL_GENERIC_FAILURE (IFSL_FAIL_BASE + 10)
68 #define IFSL_OPEN_CREATED (IFSL_SUCCESS_BASE + 11)
69 #define IFSL_OPEN_EXISTS (IFSL_FAIL_BASE + 12)
70 #define IFSL_OPEN_OPENED (IFSL_SUCCESS_BASE + 13)
71 #define IFSL_OPEN_OVERWRITTEN (IFSL_SUCCESS_BASE + 14)
72 #define IFSL_OPEN_SUPERSCEDED (IFSL_SUCCESS_BASE + 15)
73 #define IFSL_BADFILENAME (IFSL_FAIL_BASE + 16)
74 #define IFSL_READONLY (IFSL_FAIL_BASE + 17)
75 #define IFSL_IS_A_DIR (IFSL_FAIL_BASE + 18)
76 #define IFSL_PATH_DOES_NOT_EXIST (IFSL_FAIL_BASE + 19)
77 #define IFSL_IS_A_FILE (IFSL_FAIL_BASE + 20)
78 #define IFSL_NO_FILE (IFSL_FAIL_BASE + 21)
79 #define IFSL_NOT_EMPTY (IFSL_FAIL_BASE + 22)
80 #define IFSL_RPC_TIMEOUT (IFSL_FAIL_BASE + 23)
81 #define IFSL_OVERQUOTA (IFSL_FAIL_BASE + 24)
82 #define IFSL_MEMORY (IFSL_FAIL_BASE + 25)
83 #define IFSL_UNSPEC (IFSL_FAIL_BASE + 26)
87 #define IOCTL_AFSRDR_IOCTL CTL_CODE(IOCTL_DISK_BASE, 0x007, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
88 #define IOCTL_AFSRDR_DOWNCALL CTL_CODE(IOCTL_DISK_BASE, 0x008, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
89 #define IOCTL_AFSRDR_GET_PATH CTL_CODE(IOCTL_DISK_BASE, 0x009, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
93 uc_namei(WCHAR *name, ULONG *fid);
94 uc_check_access(ULONG fid, ULONG access, ULONG *granted);
95 uc_create(WCHAR *str, ULONG attribs, LARGE_INTEGER alloc, ULONG access, ULONG *granted, ULONG *fid);
96 uc_stat(ULONG fid, ULONG *attribs, LARGE_INTEGER *size, LARGE_INTEGER *creation, LARGE_INTEGER *access, LARGE_INTEGER *change, LARGE_INTEGER *written);
97 uc_setinfo(ULONG fid, ULONG attribs, LARGE_INTEGER creation, LARGE_INTEGER access, LARGE_INTEGER change, LARGE_INTEGER written);
98 uc_trunc(ULONG fid, LARGE_INTEGER size);
99 uc_read(ULONG fid, LARGE_INTEGER offset, ULONG length, ULONG *read, char *data);
100 uc_write(ULONG fid, LARGE_INTEGER offset, ULONG length, ULONG *written, char *data);
101 uc_readdir(ULONG fid, LARGE_INTEGER cookie_in, WCHAR *filter, ULONG *count, char *data, ULONG *len);
103 uc_unlink(WCHAR *name);
104 uc_ioctl_write(ULONG length, char *data, ULONG *key);
105 uc_ioctl_read(ULONG key, ULONG *length, char *data);
106 uc_rename(ULONG fid, WCHAR *curr, WCHAR *new_dir, WCHAR *new_name, ULONG *new_fid);
111 dc_break_callback(ULONG fid);