home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / rf_adv.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  3.1 KB  |  93 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ident    "@(#)/usr/include/sys/rf_adv.h.sl 1.1 4.0 12/08/90 10223 AT&T-USL"
  11.  
  12. #ifndef _SYS_RF_ADV_H
  13. #define _SYS_RF_ADV_H
  14.  
  15. /*
  16.  * Resource structure, supplants both advertise table and server mount
  17.  * table.  Each advertised resource has an entry in this table holding
  18.  * necessary info, including a list of info about each remote mount of
  19.  * the resource.
  20.  */
  21.  
  22. #define RFS_NMSZ 15        /* size of advertised name */
  23.  
  24. typedef struct sr_mount {
  25.     struct sr_mount *srm_nextp;    /* ptr to next in list */
  26.     struct sr_mount *srm_prevp;    /* ptr to prev in list */
  27.     sysid_t     srm_sysid;    /* which client */
  28.     ushort      srm_flags;    /* see sr_flag values below */
  29.     long         srm_mntid;    /* denotes mounted resource on client */
  30.     int         srm_kbcnt;    /* Kbytes read/written by this client */
  31.     int         srm_refcnt;    /* number of outstanding gifts */
  32.     int        srm_slpcnt;    /* used by fumount, recover */
  33. } sr_mount_t;
  34.  
  35. /* sr_flag values */
  36. #define    SRM_RDONLY    1    /* This mount is read only */
  37. #define SRM_LINKDOWN     2    /* Link to client is down */ 
  38. #define SRM_FUMOUNT    4    /* being fumounted */
  39. #define SRM_CACHE    8    /* this client is cacheing this resource */
  40.  
  41. typedef struct rf_resource {
  42.     struct rf_resource *r_nextp;    /* ptr to next in list */
  43.     struct rf_resource *r_prevp;    /* ptr to prev in list */
  44.     /*
  45.      * r_mountp heads the list of sr_mount structures for this resource.
  46.      */
  47.     struct sr_mount *r_mountp;    
  48.     int        r_flags;        /* see values below */
  49.     struct vnode   *r_rootvp;        /* root vnodep */
  50.     char        r_name[RFS_NMSZ];    /* sent to name server */
  51.     struct    rcvd   *r_queuep;        /* receive queue */
  52.     char           *r_clistp;        /* authorization list */
  53.     /*
  54.      * Pre-release 4 clients expect to be given an index into the server's
  55.      * srmount table when they mount a resource, then pass that back
  56.      * to the server with each request.  The srmount table is no longer
  57.      * used in RFS, so a replacement to that index is r_mntid which is a
  58.      * pseudo index used for the same purpose.
  59.      */
  60.     long        r_mntid;    
  61. } rf_resource_t;
  62.  
  63. /* r_flag values */
  64. #define R_RDONLY    1    /* advertised read only */
  65. #define R_CACHEOK        2    /* files are cacheable */
  66. #define R_UNADV        4    /* unadvertised, but not free yet */
  67. #define R_FUMOUNT    8    /* being fumounted */
  68.  
  69. typedef struct rf_resource_head {
  70.     rf_resource_t *rh_nextp;
  71.     rf_resource_t *rh_prevp;
  72. } rf_resource_head_t;
  73.  
  74. extern rf_resource_head_t rf_resource_head;
  75.  
  76. extern int    nsrmount;    /* configurable limit on srmounts */
  77. extern uint    srm_count;    /* number of extant srmounts */
  78.  
  79. extern rf_resource_t *ind_to_rsc();
  80. extern rf_resource_t *vp_to_rsc();
  81. extern rf_resource_t *name_to_rsc();
  82. extern char *rsc_nm();
  83. extern int localrsrc();
  84. extern rf_resource_t *allocrsc();
  85. extern int insertrsc();
  86. extern void freersc();
  87. extern sr_mount_t *id_to_srm();
  88. extern int srm_alloc();
  89. extern int srm_remove();
  90. extern void srm_free();
  91.  
  92. #endif    /* _SYS_RF_ADV_H */
  93.