home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / lan / soss.arj / SRC / MOUNTD.H < prev    next >
C/C++ Source or Header  |  1991-02-22  |  2KB  |  72 lines

  1. /*
  2.  *  mountd.h -- header file for PC NFS mount daemon
  3.  *
  4.  *  Author:
  5.  *      See-Mong Tan, 6/12/88]
  6.  */
  7.  
  8.   /* mount path name to file handle */
  9. extern bool_t mntpntofh();
  10.   /* initialization */
  11. extern bool_t mountd_init();
  12.   /* mount dispatch */
  13. extern void mountd_dispatch();
  14.   /* mount a filesystem */
  15. extern void mount();
  16.   /* unmount a filesystem */
  17. extern void unmount();
  18.  
  19. #define MOUNTPROG ((u_long) 100005)
  20. #define MOUNTPORT ((u_short) 1058)
  21. #define NULLPROC 0
  22. #define MOUNTPROC_MNT 1
  23. #define MOUNTPROC_DUMP 2
  24. #define MOUNTPROC_UMNT 3
  25. #define MOUNTPROC_UMNTALL 4
  26. #define MOUNTPROC_EXPORT 5
  27. #define MOUNTPROC_EXPORTALL 6
  28. #define MOUNTVERS_ORIG 1
  29. #define MOUNTVERS ((u_long) 1)
  30.  
  31. #ifndef svc_getcaller
  32. #define svc_getcaller(x) (&(x)->xp_raddr)
  33. #endif
  34.  
  35. bool_t xdr_path();
  36. bool_t xdr_fhandle();
  37. bool_t xdr_fhstatus();
  38. bool_t xdr_mountlist();
  39. bool_t xdr_exports();
  40.  
  41. struct mountlist {              /* what is mounted */
  42.         char *ml_name;
  43.         char *ml_path;
  44.         struct mountlist *ml_nxt;
  45. };
  46.  
  47. struct fhstatus {
  48.         int fhs_status;
  49.         fhandle_t fhs_fh;
  50. };
  51.  
  52. /*
  53.  * List of exported directories
  54.  * An export entry with ex_groups
  55.  * NULL indicates an entry which is exported to the world.
  56.  */
  57. struct exports {
  58.         dev_t             ex_dev;       /* dev of directory */
  59.         char             *ex_name;      /* name of directory */
  60.         struct groups    *ex_groups;    /* groups allowed to mount this entry */
  61.         struct exports   *ex_next;
  62.         short             ex_rootmap;   /* id to map root requests to */
  63.         short             ex_flags;     /* bits to mask off file mode */
  64. };
  65.  
  66. struct groups {
  67.         char            *g_name;
  68.         struct groups   *g_next;
  69. };
  70.  
  71.  
  72.