Cleaner fix part 1
[bluesky.git] / nfs3 / mount_prot.x
1 const MNTPATHLEN = 1024;        /* Maximum bytes in a path name */
2 const MNTNAMLEN = 255;          /* Maximum bytes in a name */
3 const FHSIZE3 = 64;             /* Maximum bytes in a V3 file handle */
4
5 typedef opaque fhandle3<FHSIZE3>;
6 typedef string dirpath<MNTPATHLEN>;
7 typedef string name<MNTNAMLEN>;
8
9 enum mountstat3 {
10     MNT3_OK = 0,                /* no error */
11     MNT3ERR_PERM = 1,           /* Not owner */
12     MNT3ERR_NOENT = 2,          /* No such file or directory */
13     MNT3ERR_IO = 5,             /* I/O error */
14     MNT3ERR_ACCES = 13,         /* Permission denied */
15     MNT3ERR_NOTDIR = 20,        /* Not a directory */
16     MNT3ERR_INVAL = 22,         /* Invalid argument */
17     MNT3ERR_NAMETOOLONG = 63,   /* Filename too long */
18     MNT3ERR_NOTSUPP = 10004,    /* Operation not supported */
19     MNT3ERR_SERVERFAULT = 10006 /* A failure on the server */
20 };
21
22 struct mountres3_ok {
23     fhandle3 fhandle;
24     int auth_flavors<>;
25 };
26
27 union mountres3 switch (mountstat3 fhs_status) {
28 case MNT3_OK:
29     mountres3_ok mountinfo;
30 default:
31     void;
32 };
33
34 typedef struct mountbody *mountlist;
35
36 struct mountbody {
37     name ml_hostname;
38     dirpath ml_directory;
39     mountlist ml_next;
40 };
41
42 typedef struct groupnode *groups;
43
44 struct groupnode {
45     name gr_name;
46     groups gr_next;
47 };
48
49 typedef struct exportnode *exports;
50
51 struct exportnode {
52     dirpath ex_dir;
53     groups ex_groups;
54     exports ex_next;
55 };
56
57 program MOUNT_PROGRAM {
58     version MOUNT_V3 {
59         void MOUNTPROC3_NULL (void) = 0;
60         mountres3 MOUNTPROC3_MNT (dirpath) = 1;
61         mountlist MOUNTPROC3_DUMP (void) = 2;
62         void MOUNTPROC3_UMNT (dirpath) = 3;
63         void MOUNTPROC3_UMNTALL (void) = 4;
64         exports MOUNTPROC3_EXPORT (void) = 5;
65     } = 3;
66 } = 100005;