home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / bsd / nfs / export.h next >
C/C++ Source or Header  |  1993-10-19  |  2KB  |  94 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 addresses */
  26.     struct sockaddr *addrvec;    /* pointer to array of addresses */
  27. };
  28.  
  29. /*
  30.  * Associated with AUTH_UNIX is an array of internet addresses
  31.  * to check root permission.
  32.  */
  33. #if    NeXT
  34. /*
  35.  * NeXT: Make upper-bound a more reasonable number
  36.  */
  37. #define EXMAXROOTADDRS    1024        /* should be config option */
  38. #else    NeXT
  39. #define EXMAXROOTADDRS    10        /* should be config option */
  40. #endif    NeXT
  41. struct unixexport {
  42.     struct exaddrlist rootaddrs;
  43. };
  44.  
  45. /*
  46.  * Associated with AUTH_DES is a list of network names to check
  47.  * root permission, plus a time window to check for expired
  48.  * credentials.
  49.  */
  50. #if    NeXT
  51. /*
  52.  * NeXT: Make upper-bound a more reasonable number
  53.  */
  54. #define EXMAXROOTNAMES 1024           /* should be config option */
  55. #else    NeXT
  56. #define EXMAXROOTNAMES 10           /* should be config option */
  57. #endif    NeXT
  58. struct desexport {
  59.     unsigned nnames;
  60.     char **rootnames;
  61.     int window;
  62. };
  63.  
  64.  
  65. /*
  66.  * The export information passed to exportfs()
  67.  */
  68. struct export {
  69.     int ex_flags;    /* flags */
  70.     int ex_anon;    /* uid for unauthenticated requests */
  71.     int ex_auth;    /* switch */
  72.     union {
  73.         struct unixexport exunix;    /* case AUTH_UNIX */
  74.         struct desexport exdes;        /* case AUTH_DES */
  75.     } ex_u;
  76.     struct exaddrlist ex_writeaddrs;
  77. };
  78. #define ex_des ex_u.exdes
  79. #define ex_unix ex_u.exunix
  80.  
  81. #ifdef KERNEL
  82. /*
  83.  * A node associated with an export entry on the list of exported
  84.  * filesystems.
  85.  */
  86. struct exportinfo {
  87.     struct export exi_export;
  88.     fsid_t exi_fsid;
  89.     struct fid *exi_fid;
  90.     struct exportinfo *exi_next;
  91. };
  92. extern struct exportinfo *findexport();
  93. #endif
  94.