home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 9.ddi / usr / include / sys / ws / chan.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  3.2 KB  |  86 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/ws/chan.h.sl 1.1 4.0 12/08/90 52727 AT&T-USL"
  11.  
  12. #ifndef    _SYS_WS_CHAN_H
  13. #define    _SYS_WS_CHAN_H
  14.  
  15. /*
  16.  * Channel protocol definitions for the IWE. All control/special data messages
  17.  * exchanged between IWE modules/drivers are of this format.
  18.  */
  19.  
  20. struct ch_protocol {
  21.     long    chp_type,    /* type of message */
  22.         chp_tstmp,    /* timestamp of message */
  23.         chp_stype,    /* message sub-type (used for control msgs) */
  24.         chp_stype_cmd,    /* message sub-type cmd (for control msgs) */
  25.         chp_stype_arg,    /* message sub-type arg (for control msgs) */
  26.         chp_chan;    /* channel ID -- will be set by CHANMUX
  27.                  *    and is write-side only */
  28. };
  29.  
  30. typedef struct ch_protocol ch_proto_t;
  31.  
  32. /* chp_type ID */
  33. #define CH_DATA    1    /* ch_protocol data message identifier */
  34. #define CH_CTL    2    /* ch_protocol control message identifier */
  35.  
  36. /* messages from CHANMUX to principal stream; chp_stype CH_CHAN and
  37.  * its chp_stype_cmds. chp_type should be CH_CTL
  38.  */
  39. #define CH_CHAN    ( ('C'<<16) | ('H'<<8) | ('N') )
  40. #define CH_CHANCLOSE    1
  41. #define CH_CHANOPEN    2
  42.  
  43. /* chp_stype CH_MSE to indicate mouse events; chp_type should be CH_DATA */
  44. #define CH_MSE    ( ('M'<<16) | ('S'<<8) | ('E') )
  45.  
  46. /* chp_stype CH_NOSCAN to indicate already-scanned data. The attached message
  47.  * block is raw data suitable to be forwarded on the read side to upper
  48.  * modules of the STREAMS TTY sub-system. chp_type is CH_DATA
  49.  */
  50. #define CH_NOSCAN    ( ('N'<<16) | ('S'<<8) | ('C') )
  51.  
  52. /* messages to the CHANMUX driver from the principal stream;
  53.  * chp_stype CH_PRINCSTRM and its chp_stype_cmds. chp_type should be CH_CTL
  54.  */
  55. #define CH_PRINC_STRM    ( ('P'<<16) | ('S'<<8) | ('T') )
  56. #define CH_CHANGE_CHAN    1
  57. #define CH_CLOSE_ACK    2
  58. #define CH_OPEN_RESP    3
  59.  
  60. /* CH_CTL messages for CHAR module; chp_stype CH_CHR and its chp_stype_cmds */
  61. #define CH_CHR    ( ('C' << 16) | ('H' << 8) | 'R')
  62. #define CH_CHRMAP    ( ('C'<<24) | ('M'<<16) | ('A'<<8) | 'P' )
  63. #define CH_SCRMAP    ( ('S'<<24) | ('M'<<16) | ('A'<<8) | 'P' )
  64. #define CH_LEDSTATE    ('L' << 8 | 'D')
  65. #ifdef MERGE386
  66. #define CH_SETMVPI    ( ('M'<<24) | ('3'<<16) | ('8'<<8) | '6' )
  67. #define CH_DELMVPI    ( ('3'<<24) | ('8'<<16) | ('6'<<8) | 'M' )
  68. #endif /* MERGE386 */
  69.  
  70. /* chp_stype CH_TCL; its stype_cmds are in sys/ws/tcl.h. These commands
  71.  * come from the ANSI module or its equivalent. All are ch_type CH_CTL
  72.  */
  73. #define CH_TCL ( ('T' << 16) | ('C' << 8) | 'L')
  74.  
  75. /* chp_stype CH_XQ and its chp_stype_cmds. They are part of the X queue handling
  76.  * message protocol and are exchanged between the principal stream and CHAR or
  77.  * its equivalent. All are of ch_type CH_CTL */
  78.  
  79. #define CH_XQ ( ('X' << 8) | 'Q')
  80. #define    CH_XQENAB    1    /* from principal stream to CHAR */
  81. #define CH_XQDISAB    2    /* from principal stream to CHAR */
  82. #define CH_XQENAB_ACK    3    /* from CHAR to principal stream */
  83. #define CH_XQENAB_NACK    4    /* from CHAR to principal stream */
  84. #define CH_XQDISAB_ACK    5    /* from CHAR to principal stream */
  85. #endif /* _SYS_WS_CHAN_H */
  86.