#define OLDPACKSIZE 128
#define PACKSIZE 64
#define MINPACKSIZE 32
#define MAXPACKSIZE 4096
#define WINDOWS 7
#define MINWINDOWS 1
#define MAXWINDOWS 7
struct header {
char sync;
char ksize;
unsigned short sum;
char cntl;
char ccntl;
};
#define HDRSIZ 6
struct pack {
short p_state;
short p_bits;
short p_rsize;
short p_xsize;
struct header p_ihbuf;
struct header p_ohbuf;
char *p_rptr;
char **p_ipool;
char p_xcount;
char p_rcount;
char p_nout,p_tout;
char p_lpsize;
char p_timer;
char p_obusy;
char p_srxmit;
char p_rwindow;
char p_swindow;
char p_msg;
char p_rmsg;
char p_ps,p_pr;
char p_rpr;
char p_nxtps;
char p_imap;
char p_pscopy;
char *p_ob[8];
char *p_ib[8];
char p_os[8];
char p_is[8];
short p_osum[8];
short p_isum[8];
int p_ifn, p_ofn;
};
#define CHECK 0125252
#define SYN 020
#define MOD8 7
#define ISCNTL(a) ((a & 0300)==0)
#ifndef MIN
#define MIN(a,b) ((a<b)? a:b)
#endif
extern char next[8];
extern char mask[8];
extern int npbits;
extern int pkactive;
extern int pkdebug;
extern int pksizes[];
extern struct pack *Pk;
#define DEAD 0
#define INITa 1
#define INITb 2
#define INITab 3
#define LIVE 010
#define RXMIT 020
#define RREJ 040
#define PDEBUG 0200
#define DRAINO 0400
#define WAITO 01000
#define DOWN 02000
#define RCLOSE 04000
#define BADFRAME 020000
#define B_NULL 0
#define B_READY 1
#define B_SENT 2
#define B_RESID 010
#define B_COPY 020
#define B_MARK 040
#define B_SHORT 0100
#define CLOSE 1
#define RJ 2
#define RR 4
#define INITC 5
#define INITB 6
#define INITA 7
#define M_RJ 4
#define M_RR 020
#define M_INITC 040
#define M_CLOSE 2
#define M_INITA 0200
#define M_INITB 0100
struct piocb {
unsigned t;
short psize;
short mode;
short state;
char window;
};