home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / bsd / nfs / export.h next >
Text File  |  1992-07-29  |  2KB  |  93 lines

  1. /*      @(#)export.h    2.1 88/05/20 NFSSRC4.0 from 1.4 88/02/08 SMI      */
  2.  
  3. /*
  4.  * HISTORY
  5.  *  Peter King (king) at NeXT
  6.  *    Original Sun NFS 4.0 source
  7.  */
  8.  
  9. /*    Copyright (C) 1988 Sun Microsystems Inc.    */
  10. /*
  11.  * exported vfs flags.
  12.  */
  13. #define EX_RDONLY     0x01        /* exported read only */
  14. #define EX_RDMOSTLY   0x02              /* exported read mostly */
  15.  
  16. #if    NeXT
  17. /*
  18.  * NeXT: Make upper-bound a more reasonable number
  19.  */
  20. #define EXMAXADDRS 1024            /* max number in address list */
  21. #else    NeXT
  22. #define EXMAXADDRS 10            /* max number in address list */
  23. #endif    NeXT
  24. struct exaddrlist {
  25.     unsigned naddrs;        /* number of addressesE'C    struct sockaddr *addrvec;    /* pointer to array of addresses */
  26. };
  27.  
  28. /*
  29.  * Associated with AUTH_UNIX is an array of internet addresses
  30.  * to check root permission.
  31.  */
  32. #if    NeXT
  33. /*
  34.  * NeXT: Make upper-bound a more reasonable number
  35.  */
  36. #define EXMAXROOTADDRS    1024        /* should be config option */
  37. #else    NeXT
  38. #define EXMAXROOTADDRS    10        /* should be config option */
  39. #endif    NeXT
  40. struct unixexport {
  41.     struct exaddrlist rootaddrs;
  42. };
  43.  
  44. /*
  45.  * Associated with AUTH_DES is a list of network names to check
  46.  * root permission, plus a time window to check for expired
  47.  * credentials.
  48.  */
  49. #if    NeXT
  50. /*
  51.  * NeXT: Make upper-bound a more reasonable number
  52.  */
  53. #define EXMAXROOTNAMES 1024           /* should be config option */
  54. #else    NeXT
  55. #define EXMAXROOTNAMES 10           /* should be config option */
  56. #endif    NeXT
  57. struct desexport {
  58.     unsigned nnames;
  59.     char **rootnames;
  60.     int window;
  61. };
  62.  
  63.  
  64. /*
  65.  * The export information passed to exportfs()
  66.  */
  67. struct export {
  68.     int ex_flags;    /* flags */
  69.     int ex_anon;    /* uid for unauthenticated requests */
  70.     int ex_auth;    /* switch */
  71.     union {
  72.         struct unixexport exunix;    /* case AUTH_UNIX */
  73.         struct desexport exdes;        /* case AUTH_DES */
  74.     } ex_u;
  75.     struct exaddrlist ex_writeaddrs;
  76. };
  77. #define ex_des ex_u.exdes
  78. #define ex_unix ex_u.exunix
  79.  
  80. #ifdef KERNEL
  81. /*
  82.  * A node associated with an export entry on the list of exported
  83.  * filesystems.
  84.  */
  85. struct exportinfo {
  86.     struct export exi_export;
  87.     fsid_t exi_fsid;
  88.     struct fid *exi_fid;
  89.     struct exportinfo *exi_next;
  90. };
  91. extern struct exportinfo *findexport();
  92. #endif
  93.