home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / include / sys / mx.h < prev    next >
Encoding:
C/C++ Source or Header  |  1979-05-05  |  2.0 KB  |  146 lines

  1. #define    NGROUPS        10    /* number of mpx files permitted at one time */
  2. #define    NCHANS        20    /* number of channel structures */
  3. #define    NPORTS        30    /* number of channels to i/o ports */
  4. #define    CNTLSIZ        10
  5. #define    NLEVELS        4
  6. #define    NMSIZE        50    /* max size of mxlstn file name */
  7.  
  8. /*
  9.  * header returned on read of mpx
  10.  */
  11. struct    rh {
  12.     short    index;
  13.     short    count;
  14.     short    ccount;
  15. };
  16.  
  17. /*
  18.  * head expected on write of mpx
  19.  */
  20. struct    wh {
  21.     short    index;
  22.     short    count;
  23.     short    ccount;
  24.     char    *data;
  25. };
  26.  
  27. struct    mx_args {
  28.     char    *m_name;
  29.     int    m_cmd;
  30.     int    m_arg[3];
  31. };
  32.  
  33.  
  34. #ifdef KERNEL
  35. /*
  36.  * internal structure for channel
  37.  */
  38.  
  39. struct chan {
  40.     short    c_flags;
  41.     char    c_index;
  42.     char    c_line;
  43.     struct    group    *c_group;
  44.     struct    file    *c_fy;
  45.     struct    tty    *c_ttyp;
  46.     struct    clist    c_ctlx;
  47.     int    c_pgrp;
  48.     struct    tty    *c_ottyp;
  49.     char    c_oline;
  50.     union {
  51.         struct    clist    datq;
  52.     } cx;
  53.     union {
  54.         struct    clist    datq;
  55.         struct    chan    *c_chan;
  56.     } cy;
  57.     struct    clist    c_ctly;
  58. };
  59.  
  60. struct schan {
  61.     short    c_flags;
  62.     char    c_index;
  63.     char    c_line;
  64.     struct    group    *c_group;
  65.     struct    file    *c_fy;
  66.     struct    tty    *c_ttyp;
  67.     struct    clist    c_ctlx;
  68.     int    c_pgrp;
  69. };
  70.  
  71.  
  72. /*
  73.  * flags
  74.  */
  75. #define    INUSE    01
  76. #define COPEN    02
  77. #define    XGRP    04
  78. #define    YGRP    010
  79. #define    WCLOSE    020
  80. #define    ISGRP    0100
  81. #define    BLOCK    0200
  82. #define    EOTMARK    0400
  83. #define    SIGBLK    01000
  84. #define    BLKMSG    01000
  85. #define    ENAMSG    02000
  86. #define    WFLUSH    04000
  87. #define    NMBUF    010000
  88. #define    PORT    020000
  89. #define    ALT    040000
  90.  
  91. #endif
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101. /*
  102.  * mpxchan command codes
  103.  */
  104. #define    MPX    5
  105. #define    MPXN    6
  106. #define    CHAN    1
  107. #define JOIN    2
  108. #define EXTR    3
  109. #define    ATTACH    4
  110. #define    CONNECT    7
  111. #define    DETACH    8
  112. #define    DISCON    9
  113. #define DEBUG    10
  114. #define    NPGRP    11
  115. #define    CSIG    12
  116. #define PACK    13
  117.  
  118. #define NDEBUGS    30
  119. /*
  120.  * control channel message codes
  121.  */
  122. #define M_WATCH 1
  123. #define M_CLOSE 2
  124. #define    M_EOT    3
  125. #define    M_OPEN    4
  126. #define    M_BLK    5
  127. #define    M_UBLK    6
  128. #define    DO_BLK    7
  129. #define    DO_UBLK    8
  130. #define    M_IOCTL    12
  131. #define    M_SIG    14
  132.  
  133.  
  134. /*
  135.  * debug codes other than mpxchan cmds
  136.  */
  137. #define MCCLOSE 29
  138. #define MCOPEN    28
  139. #define    ALL    27
  140. #define SCON    26
  141. #define    MSREAD    25
  142. #define    SDATA    24
  143. #define    MCREAD    23
  144. #define MCWRITE    22
  145.  
  146.