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

Defined struct's

header defined in line 3; used 8 times
pack defined in line 17; used 40 times
piocb defined in line 120; never used

Defined macros

BADFRAME defined in line 78; used 1 times
B_COPY defined in line 87; used 5 times
B_MARK defined in line 88; used 6 times
B_NULL defined in line 83; used 4 times
B_READ defined in line 94; used 1 times
B_READY defined in line 84; used 3 times
B_RESID defined in line 86; used 2 times
B_SENT defined in line 85; used 3 times
B_SHORT defined in line 89; used 5 times
B_WRITE defined in line 93; used 2 times
CHECK defined in line 52; used 3 times
CLOSE defined in line 99; never used
DEAD defined in line 66; never used
DOWN defined in line 76; used 6 times
DRAINO defined in line 74; used 2 times
HDRSIZ defined in line 11; used 7 times
INITA defined in line 105; never used
INITB defined in line 104; never used
INITC defined in line 103; never used
INITa defined in line 67; used 2 times
INITab defined in line 69; used 2 times
INITb defined in line 68; used 1 times
ISCNTL defined in line 55; used 1 times
LIVE defined in line 70; used 9 times
MIN defined in line 58; used 2 times
MOD8 defined in line 54; used 4 times
M_CLOSE defined in line 107; used 1 times
M_INITA defined in line 112; used 2 times
M_INITB defined in line 113; used 4 times
M_INITC defined in line 111; used 2 times
M_RJ defined in line 108; used 1 times
M_RR defined in line 110; used 7 times
M_SRJ defined in line 109; never used
NPLINES defined in line 115; used 4 times
PACKSIZE defined in line 12; used 4 times
PDEBUG defined in line 73; never used
RCLOSE defined in line 77; used 3 times
RJ defined in line 100; never used
RR defined in line 102; never used
RREJ defined in line 72; never used
RXMIT defined in line 71; used 5 times
SRJ defined in line 101; never used
SYN defined in line 53; used 2 times
TAILSIZE defined in line 15; used 5 times
WAITO defined in line 75; used 3 times
WINDOWS defined in line 13; used 1 times

Usage of this include

Last modified: 1987-07-20
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1022
Valid CSS Valid XHTML 1.0 Strict