Back to home page

OSCL-LXR

 
 

    


0001 /* 
0002    You may distribute this file under either of the two licenses that
0003    follow at your discretion.
0004 */
0005 
0006 /* BLURB lgpl
0007 
0008                            Coda File System
0009                               Release 5
0010 
0011           Copyright (c) 1987-1999 Carnegie Mellon University
0012                   Additional copyrights listed below
0013 
0014 This code is distributed "AS IS" without warranty of any kind under
0015 the terms of the GNU Library General Public Licence Version 2, as
0016 shown in the file LICENSE, or under the license shown below. The
0017 technical and financial contributors to Coda are listed in the file
0018 CREDITS.
0019 
0020                         Additional copyrights 
0021 */
0022 
0023 /*
0024 
0025             Coda: an Experimental Distributed File System
0026                              Release 4.0
0027 
0028           Copyright (c) 1987-1999 Carnegie Mellon University
0029                          All Rights Reserved
0030 
0031 Permission  to  use, copy, modify and distribute this software and its
0032 documentation is hereby granted,  provided  that  both  the  copyright
0033 notice  and  this  permission  notice  appear  in  all  copies  of the
0034 software, derivative works or  modified  versions,  and  any  portions
0035 thereof, and that both notices appear in supporting documentation, and
0036 that credit is given to Carnegie Mellon University  in  all  documents
0037 and publicity pertaining to direct or indirect use of this code or its
0038 derivatives.
0039 
0040 CODA IS AN EXPERIMENTAL SOFTWARE SYSTEM AND IS  KNOWN  TO  HAVE  BUGS,
0041 SOME  OF  WHICH MAY HAVE SERIOUS CONSEQUENCES.  CARNEGIE MELLON ALLOWS
0042 FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION.   CARNEGIE  MELLON
0043 DISCLAIMS  ANY  LIABILITY  OF  ANY  KIND  FOR  ANY  DAMAGES WHATSOEVER
0044 RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE  OR  OF
0045 ANY DERIVATIVE WORK.
0046 
0047 Carnegie  Mellon  encourages  users  of  this  software  to return any
0048 improvements or extensions that  they  make,  and  to  grant  Carnegie
0049 Mellon the rights to redistribute these changes without encumbrance.
0050 */
0051 
0052 /*
0053  *
0054  * Based on cfs.h from Mach, but revamped for increased simplicity.
0055  * Linux modifications by 
0056  * Peter Braam, Aug 1996
0057  */
0058 
0059 #ifndef _UAPI_CODA_HEADER_
0060 #define _UAPI_CODA_HEADER_
0061 
0062 
0063 /* Catch new _KERNEL defn for NetBSD and DJGPP/__CYGWIN32__ */
0064 #if defined(__NetBSD__) || \
0065   ((defined(DJGPP) || defined(__CYGWIN32__)) && !defined(KERNEL))
0066 #include <sys/types.h>
0067 #endif 
0068 
0069 #ifndef CODA_MAXSYMLINKS
0070 #define CODA_MAXSYMLINKS 10
0071 #endif
0072 
0073 #if defined(DJGPP) || defined(__CYGWIN32__)
0074 #ifdef KERNEL
0075 typedef unsigned long u_long;
0076 typedef unsigned int u_int;
0077 typedef unsigned short u_short;
0078 typedef u_long ino_t;
0079 typedef u_long dev_t;
0080 typedef void * caddr_t;
0081 #ifdef DOS
0082 typedef unsigned __int64 u_quad_t;
0083 #else 
0084 typedef unsigned long long u_quad_t;
0085 #endif
0086 
0087 #define inline
0088 
0089 #else  /* DJGPP but not KERNEL */
0090 #include <sys/time.h>
0091 typedef unsigned long long u_quad_t;
0092 #endif /* !KERNEL */
0093 #endif /* !DJGPP */
0094 
0095 
0096 #if defined(__linux__)
0097 #include <linux/time.h>
0098 #define cdev_t u_quad_t
0099 #ifndef __KERNEL__
0100 #if !defined(_UQUAD_T_) && (!defined(__GLIBC__) || __GLIBC__ < 2)
0101 #define _UQUAD_T_ 1
0102 typedef unsigned long long u_quad_t;
0103 #endif
0104 #endif /* __KERNEL__ */
0105 #else
0106 #define cdev_t dev_t
0107 #endif
0108 
0109 #ifndef __BIT_TYPES_DEFINED__
0110 #define __BIT_TYPES_DEFINED__
0111 typedef signed char       int8_t;
0112 typedef unsigned char       u_int8_t;
0113 typedef short            int16_t;
0114 typedef unsigned short     u_int16_t;
0115 typedef int          int32_t;
0116 typedef unsigned int       u_int32_t;
0117 #endif
0118 
0119 
0120 /*
0121  * Cfs constants
0122  */
0123 #define CODA_MAXNAMLEN   255
0124 #define CODA_MAXPATHLEN  1024
0125 #define CODA_MAXSYMLINK  10
0126 
0127 /* these are Coda's version of O_RDONLY etc combinations
0128  * to deal with VFS open modes
0129  */
0130 #define C_O_READ    0x001
0131 #define C_O_WRITE       0x002
0132 #define C_O_TRUNC       0x010
0133 #define C_O_EXCL    0x100
0134 #define C_O_CREAT   0x200
0135 
0136 /* these are to find mode bits in Venus */ 
0137 #define C_M_READ  00400
0138 #define C_M_WRITE 00200
0139 
0140 /* for access Venus will use */
0141 #define C_A_C_OK    8               /* Test for writing upon create.  */
0142 #define C_A_R_OK    4               /* Test for read permission.  */
0143 #define C_A_W_OK    2               /* Test for write permission.  */
0144 #define C_A_X_OK    1               /* Test for execute permission.  */
0145 #define C_A_F_OK    0               /* Test for existence.  */
0146 
0147 
0148 
0149 #ifndef _VENUS_DIRENT_T_
0150 #define _VENUS_DIRENT_T_ 1
0151 struct venus_dirent {
0152         u_int32_t d_fileno;     /* file number of entry */
0153         u_int16_t d_reclen;     /* length of this record */
0154         u_int8_t  d_type;           /* file type, see below */
0155         u_int8_t  d_namlen;     /* length of string in d_name */
0156         char      d_name[CODA_MAXNAMLEN + 1];/* name must be no longer than this */
0157 };
0158 #undef DIRSIZ
0159 #define DIRSIZ(dp)      ((sizeof (struct venus_dirent) - (CODA_MAXNAMLEN+1)) + \
0160                          (((dp)->d_namlen+1 + 3) &~ 3))
0161 
0162 /*
0163  * File types
0164  */
0165 #define CDT_UNKNOWN  0
0166 #define CDT_FIFO     1
0167 #define CDT_CHR      2
0168 #define CDT_DIR      4
0169 #define CDT_BLK      6
0170 #define CDT_REG      8
0171 #define CDT_LNK     10
0172 #define CDT_SOCK    12
0173 #define CDT_WHT     14
0174 
0175 /*
0176  * Convert between stat structure types and directory types.
0177  */
0178 #define IFTOCDT(mode)   (((mode) & 0170000) >> 12)
0179 #define CDTTOIF(dirtype)    ((dirtype) << 12)
0180 
0181 #endif
0182 
0183 #ifndef _VUID_T_
0184 #define _VUID_T_
0185 typedef u_int32_t vuid_t;
0186 typedef u_int32_t vgid_t;
0187 #endif /*_VUID_T_ */
0188 
0189 struct CodaFid {
0190     u_int32_t opaque[4];
0191 };
0192 
0193 #define coda_f2i(fid)\
0194     (fid ? (fid->opaque[3] ^ (fid->opaque[2]<<10) ^ (fid->opaque[1]<<20) ^ fid->opaque[0]) : 0)
0195 
0196 #ifndef _VENUS_VATTR_T_
0197 #define _VENUS_VATTR_T_
0198 /*
0199  * Vnode types.  VNON means no type.
0200  */
0201 enum coda_vtype { C_VNON, C_VREG, C_VDIR, C_VBLK, C_VCHR, C_VLNK, C_VSOCK, C_VFIFO, C_VBAD };
0202 
0203 struct coda_timespec {
0204     int64_t     tv_sec;     /* seconds */
0205     long        tv_nsec;    /* nanoseconds */
0206 };
0207 
0208 struct coda_vattr {
0209     long        va_type;    /* vnode type (for create) */
0210     u_short     va_mode;    /* files access mode and type */
0211     short       va_nlink;   /* number of references to file */
0212     vuid_t      va_uid;     /* owner user id */
0213     vgid_t      va_gid;     /* owner group id */
0214     long        va_fileid;  /* file id */
0215     u_quad_t    va_size;    /* file size in bytes */
0216     long        va_blocksize;   /* blocksize preferred for i/o */
0217     struct coda_timespec va_atime;  /* time of last access */
0218     struct coda_timespec va_mtime;  /* time of last modification */
0219     struct coda_timespec va_ctime;  /* time file changed */
0220     u_long      va_gen;     /* generation number of file */
0221     u_long      va_flags;   /* flags defined for file */
0222     cdev_t          va_rdev;    /* device special file represents */
0223     u_quad_t    va_bytes;   /* bytes of disk space held by file */
0224     u_quad_t    va_filerev; /* file modification number */
0225 };
0226 
0227 #endif 
0228 
0229 /* structure used by CODA_STATFS for getting cache information from venus */
0230 struct coda_statfs {
0231     int32_t f_blocks;
0232     int32_t f_bfree;
0233     int32_t f_bavail;
0234     int32_t f_files;
0235     int32_t f_ffree;
0236 };
0237 
0238 /*
0239  * Kernel <--> Venus communications.
0240  */
0241 
0242 #define CODA_ROOT   2
0243 #define CODA_OPEN_BY_FD 3
0244 #define CODA_OPEN   4
0245 #define CODA_CLOSE  5
0246 #define CODA_IOCTL  6
0247 #define CODA_GETATTR    7
0248 #define CODA_SETATTR    8
0249 #define CODA_ACCESS 9
0250 #define CODA_LOOKUP 10
0251 #define CODA_CREATE 11
0252 #define CODA_REMOVE 12
0253 #define CODA_LINK   13
0254 #define CODA_RENAME 14
0255 #define CODA_MKDIR  15
0256 #define CODA_RMDIR  16
0257 #define CODA_SYMLINK    18
0258 #define CODA_READLINK   19
0259 #define CODA_FSYNC  20
0260 #define CODA_VGET   22
0261 #define CODA_SIGNAL 23
0262 #define CODA_REPLACE     24 /* DOWNCALL */
0263 #define CODA_FLUSH       25 /* DOWNCALL */
0264 #define CODA_PURGEUSER   26 /* DOWNCALL */
0265 #define CODA_ZAPFILE     27 /* DOWNCALL */
0266 #define CODA_ZAPDIR      28 /* DOWNCALL */
0267 #define CODA_PURGEFID    30 /* DOWNCALL */
0268 #define CODA_OPEN_BY_PATH 31
0269 #define CODA_RESOLVE     32
0270 #define CODA_REINTEGRATE 33
0271 #define CODA_STATFS  34
0272 #define CODA_STORE   35
0273 #define CODA_RELEASE     36
0274 #define CODA_ACCESS_INTENT 37
0275 #define CODA_NCALLS 38
0276 
0277 #define DOWNCALL(opcode) (opcode >= CODA_REPLACE && opcode <= CODA_PURGEFID)
0278 
0279 #define VC_MAXDATASIZE      8192
0280 #define VC_MAXMSGSIZE      sizeof(union inputArgs)+sizeof(union outputArgs) +\
0281                             VC_MAXDATASIZE  
0282 
0283 #define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t)
0284 
0285 //      CODA_KERNEL_VERSION 0 /* don't care about kernel version number */
0286 //      CODA_KERNEL_VERSION 1 /* The old venus 4.6 compatible interface */
0287 //      CODA_KERNEL_VERSION 2 /* venus_lookup gets an extra parameter */
0288 //      CODA_KERNEL_VERSION 3 /* 128-bit file identifiers */
0289 //      CODA_KERNEL_VERSION 4 /* 64-bit timespec */
0290 #define CODA_KERNEL_VERSION 5 /* access intent support */
0291 
0292 /*
0293  *        Venus <-> Coda  RPC arguments
0294  */
0295 struct coda_in_hdr {
0296     u_int32_t opcode;
0297     u_int32_t unique;       /* Keep multiple outstanding msgs distinct */
0298     __kernel_pid_t pid;
0299     __kernel_pid_t pgid;
0300     vuid_t uid;
0301 };
0302 
0303 /* Really important that opcode and unique are 1st two fields! */
0304 struct coda_out_hdr {
0305     u_int32_t opcode;
0306     u_int32_t unique;   
0307     u_int32_t result;
0308 };
0309 
0310 /* coda_root: NO_IN */
0311 struct coda_root_out {
0312     struct coda_out_hdr oh;
0313     struct CodaFid VFid;
0314 };
0315 
0316 struct coda_root_in {
0317     struct coda_in_hdr in;
0318 };
0319 
0320 /* coda_open: */
0321 struct coda_open_in {
0322     struct coda_in_hdr ih;
0323     struct CodaFid VFid;
0324     int flags;
0325 };
0326 
0327 struct coda_open_out {
0328     struct coda_out_hdr oh;
0329     cdev_t  dev;
0330     ino_t   inode;
0331 };
0332 
0333 
0334 /* coda_store: */
0335 struct coda_store_in {
0336     struct coda_in_hdr ih;
0337     struct CodaFid VFid;
0338     int flags;
0339 };
0340 
0341 struct coda_store_out {
0342     struct coda_out_hdr out;
0343 };
0344 
0345 /* coda_release: */
0346 struct coda_release_in {
0347     struct coda_in_hdr ih;
0348     struct CodaFid VFid;
0349     int flags;
0350 };
0351 
0352 struct coda_release_out {
0353     struct coda_out_hdr out;
0354 };
0355 
0356 /* coda_close: */
0357 struct coda_close_in {
0358     struct coda_in_hdr ih;
0359     struct CodaFid VFid;
0360     int flags;
0361 };
0362 
0363 struct coda_close_out {
0364     struct coda_out_hdr out;
0365 };
0366 
0367 /* coda_ioctl: */
0368 struct coda_ioctl_in {
0369     struct coda_in_hdr ih;
0370     struct CodaFid VFid;
0371     int cmd;
0372     int len;
0373     int rwflag;
0374     char *data;         /* Place holder for data. */
0375 };
0376 
0377 struct coda_ioctl_out {
0378     struct coda_out_hdr oh;
0379     int len;
0380     caddr_t data;       /* Place holder for data. */
0381 };
0382 
0383 
0384 /* coda_getattr: */
0385 struct coda_getattr_in {
0386     struct coda_in_hdr ih;
0387     struct CodaFid VFid;
0388 };
0389 
0390 struct coda_getattr_out {
0391     struct coda_out_hdr oh;
0392     struct coda_vattr attr;
0393 };
0394 
0395 
0396 /* coda_setattr: NO_OUT */
0397 struct coda_setattr_in {
0398     struct coda_in_hdr ih;
0399     struct CodaFid VFid;
0400     struct coda_vattr attr;
0401 };
0402 
0403 struct coda_setattr_out {
0404     struct coda_out_hdr out;
0405 };
0406 
0407 /* coda_access: NO_OUT */
0408 struct coda_access_in {
0409     struct coda_in_hdr ih;
0410     struct CodaFid VFid;
0411     int flags;
0412 };
0413 
0414 struct coda_access_out {
0415     struct coda_out_hdr out;
0416 };
0417 
0418 
0419 /* lookup flags */
0420 #define CLU_CASE_SENSITIVE     0x01
0421 #define CLU_CASE_INSENSITIVE   0x02
0422 
0423 /* coda_lookup: */
0424 struct  coda_lookup_in {
0425     struct coda_in_hdr ih;
0426     struct CodaFid VFid;
0427     int         name;       /* Place holder for data. */
0428     int         flags;  
0429 };
0430 
0431 struct coda_lookup_out {
0432     struct coda_out_hdr oh;
0433     struct CodaFid VFid;
0434     int vtype;
0435 };
0436 
0437 
0438 /* coda_create: */
0439 struct coda_create_in {
0440     struct coda_in_hdr ih;
0441     struct CodaFid VFid;
0442     struct coda_vattr attr;
0443     int excl;
0444     int mode;
0445     int     name;       /* Place holder for data. */
0446 };
0447 
0448 struct coda_create_out {
0449     struct coda_out_hdr oh;
0450     struct CodaFid VFid;
0451     struct coda_vattr attr;
0452 };
0453 
0454 
0455 /* coda_remove: NO_OUT */
0456 struct coda_remove_in {
0457     struct coda_in_hdr ih;
0458     struct CodaFid VFid;
0459     int name;       /* Place holder for data. */
0460 };
0461 
0462 struct coda_remove_out {
0463     struct coda_out_hdr out;
0464 };
0465 
0466 /* coda_link: NO_OUT */
0467 struct coda_link_in {
0468     struct coda_in_hdr ih;
0469     struct CodaFid sourceFid;   /* cnode to link *to* */
0470     struct CodaFid destFid; /* Directory in which to place link */
0471     int tname;      /* Place holder for data. */
0472 };
0473 
0474 struct coda_link_out {
0475     struct coda_out_hdr out;
0476 };
0477 
0478 
0479 /* coda_rename: NO_OUT */
0480 struct coda_rename_in {
0481     struct coda_in_hdr ih;
0482     struct CodaFid sourceFid;
0483     int     srcname;
0484     struct CodaFid destFid;
0485     int     destname;
0486 };
0487 
0488 struct coda_rename_out {
0489     struct coda_out_hdr out;
0490 };
0491 
0492 /* coda_mkdir: */
0493 struct coda_mkdir_in {
0494     struct coda_in_hdr ih;
0495     struct CodaFid VFid;
0496     struct coda_vattr attr;
0497     int    name;        /* Place holder for data. */
0498 };
0499 
0500 struct coda_mkdir_out {
0501     struct coda_out_hdr oh;
0502     struct CodaFid VFid;
0503     struct coda_vattr attr;
0504 };
0505 
0506 
0507 /* coda_rmdir: NO_OUT */
0508 struct coda_rmdir_in {
0509     struct coda_in_hdr ih;
0510     struct CodaFid VFid;
0511     int name;       /* Place holder for data. */
0512 };
0513 
0514 struct coda_rmdir_out {
0515     struct coda_out_hdr out;
0516 };
0517 
0518 /* coda_symlink: NO_OUT */
0519 struct coda_symlink_in {
0520     struct coda_in_hdr ih;
0521     struct CodaFid VFid;    /* Directory to put symlink in */
0522     int srcname;
0523     struct coda_vattr attr;
0524     int tname;
0525 };
0526 
0527 struct coda_symlink_out {
0528     struct coda_out_hdr out;
0529 };
0530 
0531 /* coda_readlink: */
0532 struct coda_readlink_in {
0533     struct coda_in_hdr ih;
0534     struct CodaFid VFid;
0535 };
0536 
0537 struct coda_readlink_out {
0538     struct coda_out_hdr oh;
0539     int count;
0540     caddr_t data;       /* Place holder for data. */
0541 };
0542 
0543 
0544 /* coda_fsync: NO_OUT */
0545 struct coda_fsync_in {
0546     struct coda_in_hdr ih;
0547     struct CodaFid VFid;
0548 };
0549 
0550 struct coda_fsync_out {
0551     struct coda_out_hdr out;
0552 };
0553 
0554 /* coda_vget: */
0555 struct coda_vget_in {
0556     struct coda_in_hdr ih;
0557     struct CodaFid VFid;
0558 };
0559 
0560 struct coda_vget_out {
0561     struct coda_out_hdr oh;
0562     struct CodaFid VFid;
0563     int vtype;
0564 };
0565 
0566 
0567 /* CODA_SIGNAL is out-of-band, doesn't need data. */
0568 /* CODA_INVALIDATE is a venus->kernel call */
0569 /* CODA_FLUSH is a venus->kernel call */
0570 
0571 /* coda_purgeuser: */
0572 /* CODA_PURGEUSER is a venus->kernel call */
0573 struct coda_purgeuser_out {
0574     struct coda_out_hdr oh;
0575     vuid_t uid;
0576 };
0577 
0578 /* coda_zapfile: */
0579 /* CODA_ZAPFILE is a venus->kernel call */
0580 struct coda_zapfile_out {  
0581     struct coda_out_hdr oh;
0582     struct CodaFid CodaFid;
0583 };
0584 
0585 /* coda_zapdir: */
0586 /* CODA_ZAPDIR is a venus->kernel call */   
0587 struct coda_zapdir_out {      
0588     struct coda_out_hdr oh;
0589     struct CodaFid CodaFid;
0590 };
0591 
0592 /* coda_purgefid: */
0593 /* CODA_PURGEFID is a venus->kernel call */ 
0594 struct coda_purgefid_out { 
0595     struct coda_out_hdr oh;
0596     struct CodaFid CodaFid;
0597 };
0598 
0599 /* coda_replace: */
0600 /* CODA_REPLACE is a venus->kernel call */  
0601 struct coda_replace_out { /* coda_replace is a venus->kernel call */
0602     struct coda_out_hdr oh;
0603     struct CodaFid NewFid;
0604     struct CodaFid OldFid;
0605 };
0606 
0607 /* coda_open_by_fd: */
0608 struct coda_open_by_fd_in {
0609     struct coda_in_hdr ih;
0610     struct CodaFid VFid;
0611     int        flags;
0612 };
0613 
0614 struct coda_open_by_fd_out {
0615     struct coda_out_hdr oh;
0616     int fd;
0617 
0618 #ifdef __KERNEL__
0619     struct file *fh; /* not passed from userspace but used in-kernel only */
0620 #endif
0621 };
0622 
0623 /* coda_open_by_path: */
0624 struct coda_open_by_path_in {
0625     struct coda_in_hdr ih;
0626     struct CodaFid VFid;
0627     int flags;
0628 };
0629 
0630 struct coda_open_by_path_out {
0631     struct coda_out_hdr oh;
0632     int path;
0633 };
0634 
0635 /* coda_statfs: NO_IN */
0636 struct coda_statfs_in {
0637     struct coda_in_hdr in;
0638 };
0639 
0640 struct coda_statfs_out {
0641     struct coda_out_hdr oh;
0642     struct coda_statfs stat;
0643 };
0644 
0645 #define CODA_ACCESS_TYPE_READ       1
0646 #define CODA_ACCESS_TYPE_WRITE      2
0647 #define CODA_ACCESS_TYPE_MMAP       3
0648 #define CODA_ACCESS_TYPE_READ_FINISH    4
0649 #define CODA_ACCESS_TYPE_WRITE_FINISH   5
0650 
0651 /* coda_access_intent: NO_OUT */
0652 struct coda_access_intent_in {
0653     struct coda_in_hdr ih;
0654     struct CodaFid VFid;
0655     int count;
0656     int pos;
0657     int type;
0658 };
0659 
0660 struct coda_access_intent_out {
0661     struct coda_out_hdr out;
0662 };
0663 
0664 /* 
0665  * Occasionally, we don't cache the fid returned by CODA_LOOKUP. 
0666  * For instance, if the fid is inconsistent. 
0667  * This case is handled by setting the top bit of the type result parameter.
0668  */
0669 #define CODA_NOCACHE          0x80000000
0670 
0671 union inputArgs {
0672     struct coda_in_hdr ih;      /* NB: every struct below begins with an ih */
0673     struct coda_open_in coda_open;
0674     struct coda_store_in coda_store;
0675     struct coda_release_in coda_release;
0676     struct coda_close_in coda_close;
0677     struct coda_ioctl_in coda_ioctl;
0678     struct coda_getattr_in coda_getattr;
0679     struct coda_setattr_in coda_setattr;
0680     struct coda_access_in coda_access;
0681     struct coda_lookup_in coda_lookup;
0682     struct coda_create_in coda_create;
0683     struct coda_remove_in coda_remove;
0684     struct coda_link_in coda_link;
0685     struct coda_rename_in coda_rename;
0686     struct coda_mkdir_in coda_mkdir;
0687     struct coda_rmdir_in coda_rmdir;
0688     struct coda_symlink_in coda_symlink;
0689     struct coda_readlink_in coda_readlink;
0690     struct coda_fsync_in coda_fsync;
0691     struct coda_vget_in coda_vget;
0692     struct coda_open_by_fd_in coda_open_by_fd;
0693     struct coda_open_by_path_in coda_open_by_path;
0694     struct coda_statfs_in coda_statfs;
0695     struct coda_access_intent_in coda_access_intent;
0696 };
0697 
0698 union outputArgs {
0699     struct coda_out_hdr oh;     /* NB: every struct below begins with an oh */
0700     struct coda_root_out coda_root;
0701     struct coda_open_out coda_open;
0702     struct coda_ioctl_out coda_ioctl;
0703     struct coda_getattr_out coda_getattr;
0704     struct coda_lookup_out coda_lookup;
0705     struct coda_create_out coda_create;
0706     struct coda_mkdir_out coda_mkdir;
0707     struct coda_readlink_out coda_readlink;
0708     struct coda_vget_out coda_vget;
0709     struct coda_purgeuser_out coda_purgeuser;
0710     struct coda_zapfile_out coda_zapfile;
0711     struct coda_zapdir_out coda_zapdir;
0712     struct coda_purgefid_out coda_purgefid;
0713     struct coda_replace_out coda_replace;
0714     struct coda_open_by_fd_out coda_open_by_fd;
0715     struct coda_open_by_path_out coda_open_by_path;
0716     struct coda_statfs_out coda_statfs;
0717 };    
0718 
0719 union coda_downcalls {
0720     /* CODA_INVALIDATE is a venus->kernel call */
0721     /* CODA_FLUSH is a venus->kernel call */
0722     struct coda_purgeuser_out purgeuser;
0723     struct coda_zapfile_out zapfile;
0724     struct coda_zapdir_out zapdir;
0725     struct coda_purgefid_out purgefid;
0726     struct coda_replace_out replace;
0727 };
0728 
0729 
0730 /*
0731  * Used for identifying usage of "Control" and pioctls
0732  */
0733 
0734 #define PIOCPARM_MASK 0x0000ffff
0735 struct ViceIoctl {
0736         void __user *in;        /* Data to be transferred in */
0737         void __user *out;       /* Data to be transferred out */
0738         u_short in_size;        /* Size of input buffer <= 2K */
0739         u_short out_size;       /* Maximum size of output buffer, <= 2K */
0740 };
0741 
0742 struct PioctlData {
0743         const char __user *path;
0744         int follow;
0745         struct ViceIoctl vi;
0746 };
0747 
0748 #define CODA_CONTROL        ".CONTROL"
0749 #define CODA_CONTROLLEN     8
0750 #define CTL_INO         -1
0751 
0752 /* Data passed to mount */
0753 
0754 #define CODA_MOUNT_VERSION 1
0755 
0756 struct coda_mount_data {
0757     int     version;
0758     int     fd;       /* Opened device */
0759 };
0760 
0761 #endif /* _UAPI_CODA_HEADER_ */