home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / rf_cirmgr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  3.5 KB  |  110 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. #ifndef _SYS_RF_CIRMGR_H
  11. #define _SYS_RF_CIRMGR_H
  12.  
  13. #ident    "@(#)/usr/include/sys/rf_cirmgr.h.sl 1.1 4.0 12/08/90 21839 AT&T-USL"
  14.  
  15. #define MAXTOKLEN sizeof(rf_token_t)       /* maximum token length in bytes */
  16.  
  17. struct gdpmisc {
  18.         int    hetero;
  19.         int    version;
  20.         int    ngroups_max;
  21. };
  22. typedef struct gdpmisc gdpmisc_t;
  23.  
  24. struct rf_token {
  25.         int     t_id;    /* token id for differentiating multiple ckts  */
  26.         char    t_uname[MAXDNAME]; /* full domain name of machine */
  27. };
  28. typedef struct rf_token rf_token_t;
  29.  
  30. struct gdp {
  31.     struct queue    *queue;        /* pointer to associated stream head */
  32.     struct file    *file;        /* to stream head we stole */
  33.     short        mntcnt;        /* number of mounts on this stream */
  34.     sysid_t        sysid;
  35.     short        constate;    /* connection info */
  36.     struct {
  37.         char    istate;        /* input state machine */
  38.         int    oneshot : 1;    /* 1 if expect to find entire incoming
  39.                      * message in queue at same time */
  40.         int    mcdecan    : 1;    /* messsage and common headers already
  41.                      * decanonized */
  42.         int    rhdecan : 1;    /* request or response header already
  43.                      * decanonized */
  44.     } input;
  45.     int        hetero;        /* need to canonicalize messages */
  46.     int        version;    /* RFS version at the other end */
  47.     long        timeskew_sec;    /* time skew in sec */
  48.     rf_token_t    token;        /* circuit identification */
  49.     char        *idmap[2];    /* 0=uid=UID_DEV, 1=gid=GID_DEV */
  50.     ushort        timeout;
  51.     struct msgb    *hdr;        /* message header collected so far */
  52.     struct msgb    *idata;        /* request/response collected so far */
  53.     size_t        hlen;        /* header length yet to be collected */
  54.     size_t        rhlen;        /* saved request/response header len */
  55.     size_t        dlen;        /* data length yet to be collected */
  56.     size_t        maxpsz;        /* max TIDU size of the provider */
  57.     int        ngroups_max;    /* max # suppl. groups per user */
  58.     size_t        datasz;        /* max data in RFS message */
  59.     ulong       outseq;
  60.     ulong       inseq;
  61.  
  62. };
  63. typedef struct gdp gdp_t;
  64.  
  65. /*
  66.  * Sysids are unique only among pairs of machines and are constructed
  67.  * as follows:
  68.  *      hibyte:  index on other machine of GDP on that end of virtual
  69.  *               circuit
  70.  *      lobyte:  index of GDP on this end of virtual circuit
  71.  * TO DO:  network-unique sysids
  72.  */
  73. #define SDTOSYSID(sdp)    ((gdp_t *)(sdp)->sd_queue->q_ptr)->sysid
  74. #define QPTOGP(qp)    ((gdp_t *)((queue_t *)(qp))->q_ptr)
  75. extern int maxgdp;
  76. extern gdp_t *gdp;
  77.  
  78.  
  79. /* GDP circuit states */
  80. #define GDPFREE        0
  81. #define GDPCONNECT    1    /* sound circuit */
  82. #define GDPDISCONN    2    /* not yet in recovery */
  83. #define GDPRECOVER    4
  84.  
  85. /* istate */
  86. #define GDPSTGMC    0 /* gathering rf_message_t and rf_common_t headers */
  87. #define GDPSTPMC    1 /* pulling up rf_message_t and rf_common_t headers */
  88. #define GDPSTGR        2 /* gathering rf_request_t or rf_response_t header */
  89. #define GDPSTPR        3 /* pulling up rf_request_t or rf_response_t header */
  90. #define GDPSTGD        4 /* gathering data */
  91.  
  92. /* RFS version numbers */
  93. #define RFS1DOT0    1
  94. #define RFS2DOT0    2
  95.  
  96. #ifdef _KERNEL
  97.  
  98. extern queue_t    *gdp_sysidtoq();
  99. extern int    gdp_get_circuit();
  100. extern void    gdp_put_circuit();
  101. extern int    gdp_init();
  102. extern void    gdp_discon();
  103. extern void    gdp_j_accuse();
  104. extern void    gdp_kill();
  105. extern void    gdp_put_discon();
  106.  
  107. #endif /* _KERNEL */
  108.  
  109. #endif /* _SYS_RF_CIRMGR_H */
  110.