1: struct {
2: char sync;
3: char ksize;
4: short sum;
5: char cntl;
6: char ccntl;
7: };
8: #define HDRSIZ 6
9:
10: struct pack {
11: short p_state; /* line state */
12: short p_bits; /* mask for getepack */
13: short p_rsize; /* input packet size */
14: short p_xsize; /* output packet size */
15: struct header p_ihbuf; /* input header */
16: struct header p_ohbuf; /* output header */
17: char *p_rptr;
18: char p_mode;
19: char **p_ipool;
20: char p_xcount; /* # active output buffers */
21: char p_rcount;
22: char p_nout, p_tout;
23: char p_lpsize; /* log(psize/32) */
24: char p_timer;
25: char p_obusy;
26: char p_srxmit;
27: char p_rwindow; /* window size */
28: char p_swindow;
29: char p_msg; /* control msg */
30: char p_rmsg; /* repeated control msg */
31: char p_ps, p_pr; /* last packet sent, recv'd */
32: char p_rpr;
33: char p_nxtps; /* next output seq number */
34: char p_imap; /* bit map of input buffers */
35: char p_pscopy; /* newest output packet */
36: char *p_ob[8]; /* output buffers */
37: char *p_ib[8]; /* input buffers */
38: char p_os[8]; /* output buffer status */
39: char p_is[8]; /* input buffer status */
40: short p_osum[8]; /* output checksums */
41: short p_isum[8]; /* input checksums */
42: DSYSTEM;
43: };
44: #define CHECK 0125252
45: #define SYN 020
46: #define MOD8 7
47: #define ISCNTL(a) ((a & 0300)==0)
48: #ifndef MIN
49: #define MIN(a,b) (((a)<(b))? (a):(b))
50: #endif
51:
52: char next[8];
53: char mask[8];
54: short npbits;
55: short pkactive;
56:
57: /*
58: * driver state
59: */
60: #define DEAD 0
61: #define INITa 1
62: #define INITb 2
63: #define INITab 3
64: #define LIVE 010
65: #define RXMIT 020
66: #define RREJ 040
67: #define PDEBUG 0200
68: #define DRAINO 0400
69: #define WAITO 01000
70: #define DOWN 02000
71: #define RCLOSE 04000
72: #define BADFRAME 020000
73:
74: /*
75: * io buffer states
76: */
77: #define B_NULL 0
78: #define B_READY 1
79: #define B_SENT 2
80: #define B_RESID 010
81: #define B_COPY 020
82: #define B_MARK 040
83: #define B_SHORT 0100
84:
85: /*
86: * control messages
87: */
88: #define CLOSE 1
89: #define RJ 2
90: #define SRJ 3
91: #define RR 4
92: #define INITC 5
93: #define INITB 6
94: #define INITA 7
95:
96: #define M_RJ 4
97: #define M_SRJ 010
98: #define M_RR 020
99: #define M_INITC 040
100: #define M_CLOSE 2
101: #define M_INITA 0200
102: #define M_INITB 0100
103:
104:
105:
106: #define PKOPRI 31
107: #define PKIPRI 30
108:
109: #define NPLINES 8
110:
111: /*
112: * packet ioctl buf
113: */
114: struct piocb {
115: u_short t;
116: short psize;
117: short mode;
118: short state;
119: char window;
120: };
121:
122: short pkdebug;
123: short pksizes[];
Defined variables
mask
defined in line
53;
never used
next
defined in line
52;
never used
Defined struct's
defined in line
1; used 4 times
pack
defined in line
10;
never used
Defined macros
CHECK
defined in line
44;
never used
CLOSE
defined in line
88;
never used
DEAD
defined in line
60;
never used
DOWN
defined in line
70;
never used
HDRSIZ
defined in line
8;
never used
INITA
defined in line
94;
never used
INITB
defined in line
93;
never used
INITC
defined in line
92;
never used
INITa
defined in line
61;
never used
INITb
defined in line
62;
never used
LIVE
defined in line
64;
never used
MIN
defined in line
49; used 1 times
MOD8
defined in line
46;
never used
M_RJ
defined in line
96;
never used
M_RR
defined in line
98;
never used
M_SRJ
defined in line
97;
never used
RJ
defined in line
89;
never used
RR
defined in line
91;
never used
RREJ
defined in line
66;
never used
RXMIT
defined in line
65;
never used
SRJ
defined in line
90;
never used
SYN
defined in line
45;
never used
WAITO
defined in line
69;
never used