home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 9.ddi / usr / include / sys / timod.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  3.8 KB  |  123 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_TIMOD_H
  11. #define _SYS_TIMOD_H
  12.  
  13. #ident    "@(#)/usr/include/sys/timod.h.sl 1.1 4.0 12/08/90 33884 AT&T-USL"
  14.  
  15. /* Internal flags */
  16. #define USED        0x0001    /* data structure in use          */
  17. #define FATAL        0x0002    /* fatal error M_ERROR occurred   */
  18. #define WAITIOCACK    0x0004    /* waiting for info for ioctl act */
  19. #define MORE        0x0008    /* more data */
  20. #define EXPEDITED    0x0010    /* processing expedited TSDU */
  21. #define CLTS        0x0020    /* connectionless transport */
  22. #define COTS        0x0040    /* connection-oriented transport */
  23. #define OPENWAIT    0x0080    /* sleeping in open routine */
  24. #define CONNWAIT    0x0100    /* waiting for connect confirmation */
  25. #define LOCORDREL    0x0200    /* local end has orderly released */
  26. #define REMORDREL    0x0400    /* remote end had orderly released */
  27. #define NAMEPROC    0x0800    /* processing a NAME ioctl */
  28. #define SENDZERO    0x1000    /* provider supports 0-length msg */
  29. #define EXPINLINE    0x2000    /* provider wants expedited data inline */
  30.  
  31. /* Internal buffer size (in bytes) pre-allocated for address fields */
  32. #define PRADDRSZ    128
  33.  
  34. /* Sleep timeout in open */
  35. #define TIMWAIT    (1*HZ)
  36.  
  37. /* Timod ioctls */
  38. #define        TIMOD         ('T'<<8)
  39. #define        TI_GETINFO    (TIMOD|140)
  40. #define        TI_OPTMGMT    (TIMOD|141)
  41. #define        TI_BIND        (TIMOD|142)
  42. #define        TI_UNBIND    (TIMOD|143)
  43. #define        TI_GETMYNAME    (TIMOD|144)
  44. #define        TI_GETPEERNAME    (TIMOD|145)
  45. #define        TI_SETMYNAME    (TIMOD|146)
  46. #define        TI_SETPEERNAME    (TIMOD|147)
  47.  
  48.  
  49. /* TI interface user level structure - one per open file */
  50.  
  51. struct _ti_user {
  52.     ushort    ti_flags;    /* flags              */
  53.     int    ti_rcvsize;    /* rcv buffer size    */
  54.     char   *ti_rcvbuf;    /* rcv buffer         */
  55.     int    ti_ctlsize;    /* ctl buffer size    */
  56.     char   *ti_ctlbuf;    /* ctl buffer         */
  57.     char   *ti_lookdbuf;    /* look data buffer   */
  58.     char   *ti_lookcbuf;    /* look ctl buffer    */
  59.     int    ti_lookdsize;  /* look data buf size */
  60.     int    ti_lookcsize;  /* look ctl buf size  */
  61.     int    ti_maxpsz;    /* TIDU size          */
  62.     long    ti_servtype;    /* service type       */
  63.     int     ti_lookflg;    /* buffered look flag */
  64.     int    ti_state;    /* user level state   */
  65.     int    ti_ocnt;    /* # outstanding connect indications */
  66. };
  67.  
  68. /* Old TI interface user level structure - needed for compatibility */
  69.  
  70. struct _oldti_user {
  71.     ushort    ti_flags;    /* flags              */
  72.     int    ti_rcvsize;    /* rcv buffer size    */
  73.     char   *ti_rcvbuf;    /* rcv buffer         */
  74.     int    ti_ctlsize;    /* ctl buffer size    */
  75.     char   *ti_ctlbuf;    /* ctl buffer         */
  76.     char   *ti_lookdbuf;    /* look data buffer   */
  77.     char   *ti_lookcbuf;    /* look ctl buffer    */
  78.     int    ti_lookdsize;  /* look data buf size */
  79.     int    ti_lookcsize;  /* look ctl buf size  */
  80.     int    ti_maxpsz;    /* TIDU size          */
  81.     long    ti_servtype;    /* service type       */
  82.     int     ti_lookflg;    /* buffered look flag */
  83. };
  84.  
  85.  
  86. /* This should be replaced */
  87. #define OPENFILES     ulimit(4, 0)
  88.  
  89. extern long ulimit();
  90.  
  91. /*
  92.  * Routine to be used by transport providers to process
  93.  * TI_GETMYNAME and TI_GETPEERNAME ioctls.
  94.  */
  95. extern int ti_doname();
  96.  
  97. /*
  98.  * Return values for ti_doname.
  99.  */
  100. #define DONAME_FAIL    0    /* failing ioctl (done) */
  101. #define DONAME_DONE    1    /* done processing */
  102. #define DONAME_CONT    2    /* continue proceesing (not done yet)*/
  103.  
  104. /*
  105.  *    Must include stream.h, since queue_t is typedef'd there.
  106.  */
  107. #include <sys/stream.h>
  108.  
  109. struct tim_tim {
  110.     long      tim_flags;
  111.     queue_t    *tim_rdq;
  112.     mblk_t  *tim_iocsave;
  113.     int     tim_mymaxlen;
  114.     int     tim_mylen;
  115.     caddr_t     tim_myname;
  116.     int     tim_peermaxlen;
  117.     int     tim_peerlen;
  118.     caddr_t     tim_peername;
  119.     mblk_t    *tim_consave;
  120. };
  121.  
  122. #endif    /* _SYS_TIMOD_H */
  123.