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