1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
15 #if defined(__NetBSD__) || (defined(DJGPP) || defined(__CYGWIN32__)) && !defined(KERNEL)
16 #include <sys/types.h>
19 #ifndef CODA_MAXSYMLINKS
20 #define CODA_MAXSYMLINKS 10
23 #if defined(DJGPP) || defined(__CYGWIN32__)
25 typedef unsigned long u_long;
26 typedef unsigned int u_int;
27 typedef unsigned short u_short;
30 typedef void * caddr_t;
32 typedef unsigned __int64 u_quad_t;
34 typedef unsigned long long u_quad_t;
45 typedef unsigned long long u_quad_t;
50 #include <linux/time.h>
51 #define cdev_t u_quad_t
52 #if !defined(_UQUAD_T_) && (!defined(__GLIBC__) || __GLIBC__ < 2)
54 typedef unsigned long long u_quad_t;
67 #ifndef __BIT_TYPES_DEFINED__
68 #define __BIT_TYPES_DEFINED__
69 typedef signed char int8_t;
70 typedef unsigned char u_int8_t;
71 typedef short int16_t;
72 typedef unsigned short u_int16_t;
74 typedef unsigned int u_int32_t;
77 #define CODA_MAXNAMLEN 255
78 #define CODA_MAXPATHLEN 1024
79 #define CODA_MAXSYMLINK 10
81 #define C_O_READ 0x001
82 #define C_O_WRITE 0x002
83 #define C_O_TRUNC 0x010
84 #define C_O_EXCL 0x100
85 #define C_O_CREAT 0x200
87 #define C_M_READ 00400
88 #define C_M_WRITE 00200
96 #ifndef _VENUS_DIRENT_T_
97 #define _VENUS_DIRENT_T_ 1
103 char d_name[CODA_MAXNAMLEN + 1];
106 #define DIRSIZ(dp) ((sizeof (struct venus_dirent) - (CODA_MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
108 #define CDT_UNKNOWN 0
118 #define IFTOCDT(mode) (((mode) & 0170000) >> 12)
119 #define CDTTOIF(dirtype) ((dirtype) << 12)
125 typedef u_int32_t vuid_t;
126 typedef u_int32_t vgid_t;
133 #define coda_f2i(fid) (fid ? (fid->opaque[3] ^ (fid->opaque[2]<<10) ^ (fid->opaque[1]<<20) ^ fid->opaque[0]) : 0)
135 #ifndef _VENUS_VATTR_T_
136 #define _VENUS_VATTR_T_
138 enum coda_vtype { C_VNON, C_VREG, C_VDIR, C_VBLK, C_VCHR, C_VLNK, C_VSOCK, C_VFIFO, C_VBAD };
149 struct timespec va_atime;
150 struct timespec va_mtime;
151 struct timespec va_ctime;
170 #define CODA_OPEN_BY_FD 3
174 #define CODA_GETATTR 7
175 #define CODA_SETATTR 8
176 #define CODA_ACCESS 9
177 #define CODA_LOOKUP 10
178 #define CODA_CREATE 11
179 #define CODA_REMOVE 12
181 #define CODA_RENAME 14
182 #define CODA_MKDIR 15
183 #define CODA_RMDIR 16
184 #define CODA_SYMLINK 18
185 #define CODA_READLINK 19
186 #define CODA_FSYNC 20
188 #define CODA_SIGNAL 23
189 #define CODA_REPLACE 24
190 #define CODA_FLUSH 25
191 #define CODA_PURGEUSER 26
192 #define CODA_ZAPFILE 27
193 #define CODA_ZAPDIR 28
194 #define CODA_PURGEFID 30
195 #define CODA_OPEN_BY_PATH 31
196 #define CODA_RESOLVE 32
197 #define CODA_REINTEGRATE 33
198 #define CODA_STATFS 34
199 #define CODA_STORE 35
200 #define CODA_RELEASE 36
201 #define CODA_NCALLS 37
203 #define DOWNCALL(opcode) (opcode >= CODA_REPLACE && opcode <= CODA_PURGEFID)
205 #define VC_MAXDATASIZE 8192
206 #define VC_MAXMSGSIZE sizeof(union inputArgs)+sizeof(union outputArgs) + VC_MAXDATASIZE
208 #define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t)
210 #define CODA_KERNEL_VERSION 3
220 struct coda_out_hdr {
226 struct coda_root_out {
227 struct coda_out_hdr oh;
231 struct coda_root_in {
232 struct coda_in_hdr in;
235 struct coda_open_in {
236 struct coda_in_hdr ih;
241 struct coda_open_out {
242 struct coda_out_hdr oh;
247 struct coda_store_in {
248 struct coda_in_hdr ih;
253 struct coda_store_out {
254 struct coda_out_hdr out;
257 struct coda_release_in {
258 struct coda_in_hdr ih;
263 struct coda_release_out {
264 struct coda_out_hdr out;
267 struct coda_close_in {
268 struct coda_in_hdr ih;
273 struct coda_close_out {
274 struct coda_out_hdr out;
277 struct coda_ioctl_in {
278 struct coda_in_hdr ih;
286 struct coda_ioctl_out {
287 struct coda_out_hdr oh;
292 struct coda_getattr_in {
293 struct coda_in_hdr ih;
297 struct coda_getattr_out {
298 struct coda_out_hdr oh;
299 struct coda_vattr attr;
302 struct coda_setattr_in {
303 struct coda_in_hdr ih;
305 struct coda_vattr attr;
308 struct coda_setattr_out {
309 struct coda_out_hdr out;
312 struct coda_access_in {
313 struct coda_in_hdr ih;
318 struct coda_access_out {
319 struct coda_out_hdr out;
322 #define CLU_CASE_SENSITIVE 0x01
323 #define CLU_CASE_INSENSITIVE 0x02
325 struct coda_lookup_in {
326 struct coda_in_hdr ih;
332 struct coda_lookup_out {
333 struct coda_out_hdr oh;
338 struct coda_create_in {
339 struct coda_in_hdr ih;
341 struct coda_vattr attr;
347 struct coda_create_out {
348 struct coda_out_hdr oh;
350 struct coda_vattr attr;
353 struct coda_remove_in {
354 struct coda_in_hdr ih;
359 struct coda_remove_out {
360 struct coda_out_hdr out;
363 struct coda_link_in {
364 struct coda_in_hdr ih;
365 struct CodaFid sourceFid;
366 struct CodaFid destFid;
370 struct coda_link_out {
371 struct coda_out_hdr out;
374 struct coda_rename_in {
375 struct coda_in_hdr ih;
376 struct CodaFid sourceFid;
378 struct CodaFid destFid;
382 struct coda_rename_out {
383 struct coda_out_hdr out;
386 struct coda_mkdir_in {
387 struct coda_in_hdr ih;
389 struct coda_vattr attr;
393 struct coda_mkdir_out {
394 struct coda_out_hdr oh;
396 struct coda_vattr attr;
399 struct coda_rmdir_in {
400 struct coda_in_hdr ih;
405 struct coda_rmdir_out {
406 struct coda_out_hdr out;
409 struct coda_symlink_in {
410 struct coda_in_hdr ih;
413 struct coda_vattr attr;
417 struct coda_symlink_out {
418 struct coda_out_hdr out;
421 struct coda_readlink_in {
422 struct coda_in_hdr ih;
426 struct coda_readlink_out {
427 struct coda_out_hdr oh;
432 struct coda_fsync_in {
433 struct coda_in_hdr ih;
437 struct coda_fsync_out {
438 struct coda_out_hdr out;
441 struct coda_vget_in {
442 struct coda_in_hdr ih;
446 struct coda_vget_out {
447 struct coda_out_hdr oh;
452 struct coda_purgeuser_out {
453 struct coda_out_hdr oh;
457 struct coda_zapfile_out {
458 struct coda_out_hdr oh;
459 struct CodaFid CodaFid;
462 struct coda_zapdir_out {
463 struct coda_out_hdr oh;
464 struct CodaFid CodaFid;
467 struct coda_purgefid_out {
468 struct coda_out_hdr oh;
469 struct CodaFid CodaFid;
472 struct coda_replace_out {
473 struct coda_out_hdr oh;
474 struct CodaFid NewFid;
475 struct CodaFid OldFid;
478 struct coda_open_by_fd_in {
479 struct coda_in_hdr ih;
484 struct coda_open_by_fd_out {
485 struct coda_out_hdr oh;
490 struct coda_open_by_path_in {
491 struct coda_in_hdr ih;
496 struct coda_open_by_path_out {
497 struct coda_out_hdr oh;
501 struct coda_statfs_in {
502 struct coda_in_hdr in;
505 struct coda_statfs_out {
506 struct coda_out_hdr oh;
507 struct coda_statfs stat;
510 #define CODA_NOCACHE 0x80000000
513 struct coda_in_hdr ih;
514 struct coda_open_in coda_open;
515 struct coda_store_in coda_store;
516 struct coda_release_in coda_release;
517 struct coda_close_in coda_close;
518 struct coda_ioctl_in coda_ioctl;
519 struct coda_getattr_in coda_getattr;
520 struct coda_setattr_in coda_setattr;
521 struct coda_access_in coda_access;
522 struct coda_lookup_in coda_lookup;
523 struct coda_create_in coda_create;
524 struct coda_remove_in coda_remove;
525 struct coda_link_in coda_link;
526 struct coda_rename_in coda_rename;
527 struct coda_mkdir_in coda_mkdir;
528 struct coda_rmdir_in coda_rmdir;
529 struct coda_symlink_in coda_symlink;
530 struct coda_readlink_in coda_readlink;
531 struct coda_fsync_in coda_fsync;
532 struct coda_vget_in coda_vget;
533 struct coda_open_by_fd_in coda_open_by_fd;
534 struct coda_open_by_path_in coda_open_by_path;
535 struct coda_statfs_in coda_statfs;
539 struct coda_out_hdr oh;
540 struct coda_root_out coda_root;
541 struct coda_open_out coda_open;
542 struct coda_ioctl_out coda_ioctl;
543 struct coda_getattr_out coda_getattr;
544 struct coda_lookup_out coda_lookup;
545 struct coda_create_out coda_create;
546 struct coda_mkdir_out coda_mkdir;
547 struct coda_readlink_out coda_readlink;
548 struct coda_vget_out coda_vget;
549 struct coda_purgeuser_out coda_purgeuser;
550 struct coda_zapfile_out coda_zapfile;
551 struct coda_zapdir_out coda_zapdir;
552 struct coda_purgefid_out coda_purgefid;
553 struct coda_replace_out coda_replace;
554 struct coda_open_by_fd_out coda_open_by_fd;
555 struct coda_open_by_path_out coda_open_by_path;
556 struct coda_statfs_out coda_statfs;
559 union coda_downcalls {
561 struct coda_purgeuser_out purgeuser;
562 struct coda_zapfile_out zapfile;
563 struct coda_zapdir_out zapdir;
564 struct coda_purgefid_out purgefid;
565 struct coda_replace_out replace;
568 #define PIOCPARM_MASK 0x0000ffff
577 const char __user *path;
582 #define CODA_CONTROL ".CONTROL"
583 #define CODA_CONTROLLEN 8
586 #define CODA_MOUNT_VERSION 1
588 struct coda_mount_data {