mount.x 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. %/* This file is copied from RFC1813
  2. % * Copyright 1995 Sun Micrososystems (I assume)
  3. % */
  4. const MNTPATHLEN = 1024; /* Maximum bytes in a path name */
  5. const MNTNAMLEN = 255; /* Maximum bytes in a name */
  6. const FHSIZE3 = 64; /* Maximum bytes in a V3 file handle */
  7. typedef opaque fhandle3<FHSIZE3>;
  8. typedef string dirpath<MNTPATHLEN>;
  9. typedef string name<MNTNAMLEN>;
  10. typedef struct exportnode *exports;
  11. typedef struct groupnode *groups;
  12. typedef struct mountbody *mountlist;
  13. enum 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. struct mountres3_ok {
  26. fhandle3 fhandle;
  27. int auth_flavors<>;
  28. };
  29. union mountres3 switch (mountstat3 fhs_status) {
  30. case MNT3_OK:
  31. mountres3_ok mountinfo;
  32. default:
  33. void;
  34. };
  35. struct mountbody {
  36. name ml_hostname;
  37. dirpath ml_directory;
  38. mountlist ml_next;
  39. };
  40. struct groupnode {
  41. name gr_name;
  42. groups gr_next;
  43. };
  44. struct exportnode {
  45. dirpath ex_dir;
  46. groups ex_groups;
  47. exports ex_next;
  48. };
  49. program MOUNT_PROGRAM {
  50. version MOUNT_V3 {
  51. void MOUNTPROC3_NULL(void) = 0;
  52. mountres3 MOUNTPROC3_MNT(dirpath) = 1;
  53. mountlist MOUNTPROC3_DUMP(void) = 2;
  54. void MOUNTPROC3_UMNT(dirpath) = 3;
  55. void MOUNTPROC3_UMNTALL(void) = 4;
  56. exports MOUNTPROC3_EXPORT(void) = 5;
  57. } = 3;
  58. } = 100005;