home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 202.img / SCO386N2.TD0 / usr / include / sys / sess.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-18  |  7.1 KB  |  316 lines

  1. /*
  2.  *    @(#) sess.h 2.1 88/05/18 
  3.  *
  4.  *    Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987.
  5.  *    Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987.
  6.  *    Copyright (C) Intel Corporation, 1984.
  7.  *    This Module contains Proprietary Information of
  8.  *    The Santa Cruz Operation, Microsoft Corporation, Intel Corporation,
  9.  *    and AT&T, and should be treated as Confidential.
  10.  */
  11. /***
  12. **
  13. **
  14. **  AUTHOR: Rajiv Chugh 
  15. **
  16. **  Intel Corporation
  17. **  ISO-S
  18. **  2402 W. Beardsley Road
  19. **  Phoenix, Arizona  85027
  20. **
  21. */
  22. /*
  23. * TITLE:  Data structure declarations for the OpenNET Session driver.
  24. * DATE:      December 4, 1984
  25. */
  26.  
  27. /*
  28. * Session request codes
  29. */
  30.  
  31. # define  PASSOP       0x20
  32. # define  ACTOP           0x21
  33. # define  SWRITE       0x24
  34. # define  SREAD           0x22
  35. # define  SEOMWRITE    0x32
  36. # define  GSTAT           0x12
  37. # define  SSTAT           0x26
  38. # define  CLOSEVC      0x27
  39. # define  ABORTVC      0x25
  40. # define  SREADI       0xa2   /* Not available to Application-level user */
  41. # define  PASSOPI      0xa0   /* Not available to Application-level user */
  42. # define  TESTSEND     0x30   /* Not available to Application-level user */
  43. # define  TESTRECEIVE  0x31   /* Not available to Application-level user */
  44.  
  45.  
  46. /*
  47. * defines for Nameserver interface
  48. */
  49.  
  50. # define EADDRSIZE     35   /*    Max length of Ethernet Address */
  51. # define MAXNAMSIZE    17   /*    Maximum process name size */
  52.  
  53. /*
  54. *  Structures to extract parameters passed to Session and return results
  55. */
  56.  
  57. /*
  58. *  Structure to extract parameters passed for ACTIVE OPEN/
  59. *  PASSIVE OPEN and return results
  60. */
  61.  
  62. struct      s_open  
  63.   {
  64.     int           so_rsvd1[2];  /* Reserved */
  65.     unsigned   so_ato;
  66.     unsigned   so_pc;         /* Used only for ACTIVE OPEN */
  67.     unsigned   so_err;
  68.     int         (*so_anr)();    /* Used only by the kernel interface */
  69.     char       so_pnames[MAXNAMSIZE * 2];
  70.   };
  71.  
  72. /*
  73. *  Structure to extract parameters passed for SEND MESSAGE/
  74. *  RECEIVE MESSAGE and return results
  75. */
  76.  
  77. struct s_sr 
  78.   {
  79.     int         (*ssr_anr)();
  80.     caddr_t    ssr_sleep;      /* Used by the kernel RECEIVE interface */
  81.     unsigned   ssr_err;
  82.     unsigned   ssr_count;
  83.     unsigned   ssr_bklen;
  84.     faddr_t    ssr_bkptr;
  85.     unsigned   ssr_eomflag;      /*  Meaningful only for a Receive */
  86.     unsigned   tsr_cid;          /*  Reserved for use by Xenixcomm */
  87.     unsigned   tsr_err;          /*  Reserved for use by Xenixcomm */
  88.     unsigned   tsr_nbks;      /*  Reserved for use by Xenixcomm */
  89.     unsigned   tsr_bytecount;      /*  Reserved for use by Xenixcomm */
  90.     faddr_t    tsr_bkptr;      /*  Reserved for use by Xenixcomm */
  91.     unsigned   tsr_bklen;      /*  Reserved for use by Xenixcomm */
  92.     unsigned   tsr_eomflag;      /*  Reserved for use by Xenixcomm */
  93.     unsigned   tsr_fid;          /*  Reserved for use by Xenixcomm */
  94.   };  
  95.  
  96. /*
  97. *  Structure to return results for GET STATUS
  98. */
  99.  
  100. struct s_gstat 
  101.   {
  102.     unsigned   sg_err;
  103.     unsigned   sg_state;
  104.     unsigned   sg_lnet;
  105.     unsigned   sg_lhost[3];
  106.     unsigned   sg_lport;
  107.     unsigned   sg_rnet;
  108.     unsigned   sg_rhost[3];
  109.     unsigned   sg_rport;
  110.     unsigned   sg_pc;
  111.     unsigned   sg_ato;
  112.     unsigned   sg_nsent;
  113.     unsigned   sg_nrec;
  114.     int           (*sg_anr)();      /* Used only by the kernel interface */
  115.     char       sg_pnames[MAXNAMSIZE * 2];
  116.   };
  117.  
  118. /*
  119. *  Structure to extract parameters for SET STATUS
  120. */
  121.  
  122. struct s_sstat 
  123.   {
  124.     int           ss_rsvd[2];
  125.     int           (*ss_anr)();      /* Used only by the kernel interface */
  126.     unsigned   ss_nsent;
  127.     unsigned   ss_nrec;
  128.   };
  129.  
  130. struct s_acvc 
  131.   {
  132.     int           sa_rsvd[2];
  133.     unsigned   sa_err;
  134.   };  
  135.  
  136. /*
  137. *---------------------------------------------------------------------------
  138. *  The structures below this line need not concern an Application-level
  139. *  user.
  140. */
  141.  
  142. /*
  143. * Misc Constants.
  144. */
  145.  
  146. # define PSESS        PRIBIO           /* PRIBIO is declared in param.h */
  147. # define TRUE        1
  148. # define FALSE        0
  149. # define NVC        21      /* Maximum number of VCs + 1 */
  150. # define S_KERN        0x40
  151. # define D_KERN        0
  152. # define D_USER        1
  153. # define SPL        spl5
  154. # define D_BOOTED   (2)
  155. # define DS_DELAY   200      /* Roughly 0.5 secs. Kludge for iNA problem */
  156.  
  157. /*
  158. * Connection State Enumerated Types 
  159. */
  160.  
  161. # define NORM        1
  162. # define OPEN        2
  163. # define OPEND        3
  164. # define CPEND        4
  165. # define CLOSED        5 
  166. # define ABORT        6
  167.  
  168. /*
  169. * Sundry Constants
  170. */
  171.  
  172. # define REMABORT         0x0E
  173. # define TOUT             0x10
  174.  
  175. /*
  176. * TCL driver request type codes
  177. */
  178.  
  179. # define TRQ_AOPEN    ('c' << 8 | 1)
  180. # define TRQ_POPEN    ('c' << 8 | 2)
  181. # define TRQ_STAT    ('c' << 8 | 3)
  182. # define TRQ_DEFSTAT    ('c' << 8 | 4)
  183. # define TRQ_SEND    ('c' << 8 | 5)
  184. # define TRQ_EOMSEND    ('c' << 8 | 6)
  185. # define TRQ_RECEIVE    ('c' << 8 | 7)
  186. # define TRQ_CLOSE    ('c' << 8 | 8)
  187. # define TRQ_ABORT    ('c' << 8 | 9)
  188. # define TRQ_NORM    ('c' << 8 | 10)
  189.  
  190. struct dcb 
  191.   {
  192.     unsigned   d_state;
  193.     char       d_lname[MAXNAMSIZE];    /* Local Process name */
  194.     char       d_rname[MAXNAMSIZE];        /* Remote Process name */
  195.     unsigned   d_lnet;
  196.     unsigned   d_lhost[3];
  197.     unsigned   d_lport;          /* Local port number for the VC */
  198.     unsigned   d_rnet;          /* Remote net ID */
  199.     unsigned   d_rhost[3];      /* Remote host ID */
  200.     unsigned   d_rport;          /* Remote port number for the VC */
  201.     unsigned   d_cid;
  202.     unsigned   d_pc;
  203.     unsigned   d_ato;
  204.     int           (*d_anr)();
  205.     unsigned   d_nsent;
  206.     unsigned   d_nrec;
  207.   };
  208.  
  209. /*  Structures necessary to interface with the iNA 951 driver */
  210.  
  211. /* Structure of ACTIVE OPEN and PASSIVE OPEN */ 
  212.  
  213. struct    tclopen 
  214.   {
  215.     unsigned  to_lport;
  216.     unsigned  to_rhost[3];
  217.     unsigned  to_rnet;
  218.     unsigned  to_rport;
  219.     unsigned  to_pc;
  220.     unsigned  to_ato;
  221.     unsigned  to_err;
  222.     unsigned  to_cid;
  223.     int          (*to_anr)();
  224.   };
  225.  
  226. /* Structure for STATUS and DEFERRED STATUS */
  227.  
  228. struct    tclstat 
  229.   {
  230.     unsigned   tst_cid;
  231.     faddr_t    tst_bkptr;
  232.     unsigned   tst_bklen;
  233.     unsigned   tst_err;
  234.   };
  235.  
  236. /* structures for SEND and RECEIVE */
  237.  
  238. struct tclsen 
  239.   {
  240.     unsigned   ts_cid;
  241.     unsigned   ts_err;
  242.     unsigned   ts_nbks;
  243.     unsigned   ts_count;
  244.     faddr_t    ts_bkptr;
  245.     unsigned   ts_bklen;
  246.   };
  247.  
  248. struct tclrec 
  249.   {
  250.     unsigned   tr_cid;
  251.     unsigned   tr_err;
  252.     unsigned   tr_nbks;
  253.     unsigned   tr_count;
  254.     faddr_t    tr_bkptr;
  255.     unsigned   tr_bklen;
  256.     unsigned   tr_eomflag;
  257.     unsigned   tr_fid;
  258.   };
  259.  
  260. /* structure to do ABORT/CLOSE */
  261.  
  262. struct tclac  
  263.   {
  264.     unsigned tac_cid;
  265.     unsigned tac_err;
  266.   };
  267.  
  268. /*
  269. *  Structure of the request block passed by Session to an asynchronous
  270. *  notification routine
  271. */
  272.  
  273. struct s_anrargs  
  274.   {
  275.     unsigned    san_fid;
  276.     unsigned    san_err;
  277.     unsigned    san_cmd;
  278.     unsigned    san_count;
  279.     unsigned    san_bklen;
  280.     faddr_t    san_bkptr;
  281.     unsigned    san_eomflag;
  282.   };
  283.  
  284. /*
  285. *  Structure to extract information returned by the driver DEFERRED STATUS
  286. *  Call 
  287. */
  288.  
  289. struct t_retstat 
  290.   {
  291.     char    te_tcl_state;
  292.     unsigned    te_def_ato;
  293.     long    te_def_rt;
  294.     unsigned    te_def_pc;
  295.     char    te_max_cdb;
  296.     char    te_num_cdb;
  297.     unsigned    te_lnet;
  298.     unsigned    te_lhost[3];
  299.     unsigned    te_rsvd1[5];
  300.     char    te_conn_state;
  301.     unsigned    te_lref;
  302.     unsigned    te_lport;
  303.     unsigned    te_rnet;
  304.     unsigned    te_rhost[3];
  305.     unsigned    te_rport;
  306.     unsigned    te_pc;
  307.     unsigned    te_ato;
  308.     unsigned    te_rref;
  309.     long    te_rt;
  310.     unsigned    te_rsvd2[11];
  311.     char    te_options;
  312.     char    te_max_tpdu;
  313.     unsigned    te_max_tpdu_len;
  314.   };
  315.