1: /* mx.h 3.2 6/6/80 */
2:
3: #define NGROUPS 10 /* number of mpx files permitted at one time */
4: #define NCHANS 20 /* number of channel structures */
5: #define NPORTS 30 /* number of channels to i/o ports */
6: #define CNTLSIZ 10
7: #define NLEVELS 4
8: #define NMSIZE 50 /* max size of mxlstn file name */
9:
10: /*
11: * header returned on read of mpx
12: */
13: struct rh {
14: short index;
15: short count;
16: short ccount;
17: };
18:
19: /*
20: * head expected on write of mpx
21: */
22: struct wh {
23: short index;
24: short count;
25: short ccount;
26: char *data;
27: };
28:
29: struct mx_args {
30: char *m_name;
31: short m_cmd;
32: short m_arg[3];
33: };
34:
35:
36: /*
37: * internal structure for channel
38: */
39:
40: struct chan {
41: short c_flags;
42: char c_index;
43: char c_line;
44: struct group *c_group;
45: struct file *c_fy;
46: struct tty *c_ttyp;
47: struct clist c_ctlx;
48: short c_pgrp;
49: struct tty *c_ottyp;
50: char c_oline;
51: union {
52: struct clist datq;
53: } cx;
54: union {
55: struct clist datq;
56: struct chan *c_chan;
57: } cy;
58: struct clist c_ctly;
59: };
60:
61: struct schan {
62: short c_flags;
63: char c_index;
64: char c_line;
65: struct group *c_group;
66: struct file *c_fy;
67: struct tty *c_ttyp;
68: struct clist c_ctlx;
69: short c_pgrp;
70: };
71:
72:
73: /*
74: * flags
75: */
76: #define INUSE 01
77: #define SIOCTL 02
78: #define XGRP 04
79: #define YGRP 010
80: #define WCLOSE 020
81: #define ISGRP 0100
82: #define BLOCK 0200
83: #define EOTMARK 0400
84: #define SIGBLK 01000
85: #define BLKMSG 01000
86: #define ENAMSG 02000
87: #define WFLUSH 04000
88: #define NMBUF 010000
89: #define PORT 020000
90: #define ALT 040000
91: #define FBLOCK 0100000
92:
93: /*
94: * mpxchan command codes
95: */
96: #define MPX 5
97: #define MPXN 6
98: #define CHAN 1
99: #define JOIN 2
100: #define EXTR 3
101: #define ATTACH 4
102: #define CONNECT 7
103: #define DETACH 8
104: #define DISCON 9
105: #define DEBUG 10
106: #define NPGRP 11
107: #define CSIG 12
108: #define PACK 13
109:
110: #define NDEBUGS 30
111: /*
112: * control channel message codes
113: */
114: #define M_WATCH 1
115: #define M_CLOSE 2
116: #define M_EOT 3
117: #define M_OPEN 4
118: #define M_BLK 5
119: #define M_UBLK 6
120: #define DO_BLK 7
121: #define DO_UBLK 8
122: #define M_IOCTL 12
123: #define M_IOANS 13
124: #define M_SIG 14
125:
126: /*
127: * debug codes other than mpxchan cmds
128: */
129: #define MCCLOSE 29
130: #define MCOPEN 28
131: #define ALL 27
132: #define SCON 26
133: #define MSREAD 25
134: #define SDATA 24
135: #define MCREAD 23
136: #define MCWRITE 22
Defined struct's
chan
defined in line
40; used 90 times
- in line 56(2)
- in /usr/src/sys/dev/Others/mx1.c line
36-40(4),
50-58(6),
94-98(4),
105(2),
129(2),
270(2),
467(2),
550(2)
- in /usr/src/sys/dev/Others/mx2.c line
20(2),
33(2),
61(2),
115(2),
142(2),
218(2),
313(2),
401(2),
426(2),
452(2),
491(2),
556(2),
581(2),
594(2),
693(2),
718(2),
732(2),
759(2),
777(2),
795(2),
826(2),
848(2),
860-868(6),
884(2),
907(2),
913(2)
- in /usr/src/sys/dev/ttyold.c line
120(2)
- in /usr/src/sys/sys/fakemx.c line
19(2),
34(2),
40(2)
rh
defined in line
13; used 10 times
schan
defined in line
61; used 2 times
wh
defined in line
22; used 4 times
Defined macros
ALL
defined in line
131; used 1 times
ALT
defined in line
90; used 2 times
BLOCK
defined in line
82; used 3 times
CHAN
defined in line
98; used 1 times
CSIG
defined in line
107; used 1 times
EXTR
defined in line
100; used 1 times
INUSE
defined in line
76; used 2 times
ISGRP
defined in line
81; used 9 times
JOIN
defined in line
99; used 1 times
MPX
defined in line
96; used 1 times
MPXN
defined in line
97; used 2 times
NCHANS
defined in line
4; used 3 times
NMBUF
defined in line
88; used 5 times
NMSIZE
defined in line
8; used 2 times
NPORTS
defined in line
5; used 2 times
PACK
defined in line
108;
never used
PORT
defined in line
89; used 6 times
SCON
defined in line
132;
never used
WCLOSE
defined in line
80; used 11 times
XGRP
defined in line
78; used 4 times
YGRP
defined in line
79; used 2 times
Usage of this include