Rearrange the header files.
[deb_libnfs.git] / mount / mount.x
CommitLineData
8e9d7dde 1/* copied from RFC1813 and RFC1094 */
84004dbf
RS
2
3const MNTPATHLEN = 1024; /* Maximum bytes in a path name */
4const MNTNAMLEN = 255; /* Maximum bytes in a name */
5const FHSIZE3 = 64; /* Maximum bytes in a V3 file handle */
6
7
8typedef opaque fhandle3<FHSIZE3>;
9typedef string dirpath<MNTPATHLEN>;
10typedef string name<MNTNAMLEN>;
11
12enum mountstat3 {
13 MNT3_OK = 0, /* no error */
14 MNT3ERR_PERM = 1, /* Not owner */
15 MNT3ERR_NOENT = 2, /* No such file or directory */
16 MNT3ERR_IO = 5, /* I/O error */
17 MNT3ERR_ACCES = 13, /* Permission denied */
18 MNT3ERR_NOTDIR = 20, /* Not a directory */
19 MNT3ERR_INVAL = 22, /* Invalid argument */
20 MNT3ERR_NAMETOOLONG = 63, /* Filename too long */
21 MNT3ERR_NOTSUPP = 10004, /* Operation not supported */
22 MNT3ERR_SERVERFAULT = 10006 /* A failure on the server */
23};
24
25
26typedef struct mountbody *mountlist;
27
28struct mountbody {
29 name ml_hostname;
30 dirpath ml_directory;
31 mountlist ml_next;
32};
33
34typedef struct groupnode *groups;
35
36struct groupnode {
37 name gr_name;
38 groups gr_next;
39};
40
41
42typedef struct exportnode *exports;
43
44struct exportnode {
45 dirpath ex_dir;
46 groups ex_groups;
47 exports ex_next;
48};
49
50struct mountres3_ok {
51 fhandle3 fhandle;
52 int auth_flavors<>;
53};
54
55union mountres3 switch (mountstat3 fhs_status) {
56 case MNT3_OK:
57 mountres3_ok mountinfo;
58 default:
59 void;
60};
61
8e9d7dde
RS
62
63enum mountstat1 {
64 MNT1_OK = 0, /* no error */
65 MNT1ERR_PERM = 1, /* Not owner */
66 MNT1ERR_NOENT = 2, /* No such file or directory */
67 MNT1ERR_IO = 5, /* I/O error */
68 MNT1ERR_ACCES = 13, /* Permission denied */
69 MNT1ERR_NOTDIR = 20, /* Not a directory */
70 MNT1ERR_INVAL = 22, /* Invalid argument */
71 MNT1ERR_NAMETOOLONG = 63, /* Filename too long */
72 MNT1ERR_NOTSUPP = 10004, /* Operation not supported */
73 MNT1ERR_SERVERFAULT = 10006 /* A failure on the server */
74};
75
76const FHSIZE = 32;
77typedef opaque fhandle1[FHSIZE];
78
79struct mountres1_ok {
80 fhandle1 fhandle;
81};
82
83union mountres1 switch (mountstat1 fhs_status) {
84 case MNT1_OK:
85 mountres1_ok mountinfo;
86 default:
87 void;
88};
89
84004dbf 90program MOUNT_PROGRAM {
8e9d7dde
RS
91 version MOUNT_V1 {
92 void MOUNT1_NULL(void) = 0;
93 mountres1 MOUNT1_MNT(dirpath) = 1;
94 mountlist MOUNT1_DUMP(void) = 2;
95 void MOUNT1_UMNT(dirpath) = 3;
96 void MOUNT1_UMNTALL(void) = 4;
97 exports MOUNT1_EXPORT(void) = 5;
98 } = 1;
84004dbf
RS
99 version MOUNT_V3 {
100 void MOUNT3_NULL(void) = 0;
101 mountres3 MOUNT3_MNT(dirpath) = 1;
102 mountlist MOUNT3_DUMP(void) = 2;
103 void MOUNT3_UMNT(dirpath) = 3;
104 void MOUNT3_UMNTALL(void) = 4;
105 exports MOUNT3_EXPORT(void) = 5;
106 } = 3;
107} = 100005;