Period= 5*1000, /* period of retransmit process (in ms) */
Timeout= 20, /* xmit timeout (in Periods) */
Buflen= 4096,
MAX_STATES= 16, /* van jacobson compression states */
Defmtu= 1450, /* default that we will ask for */
Minmtu= 128, /* minimum that we will accept */
Maxmtu= 2000, /* maximum that we will accept */
};
struct Pstate
{
int proto; /* protocol type */
int timeout; /* for current state */
int rxtimeout; /* for current retransmit */
ulong flags; /* options received */
uchar id; /* id of current message */
uchar confid; /* id of current config message */
uchar termid; /* id of current termination message */
uchar rcvdconfid; /* id of last conf message received */
uchar state; /* PPP link state */
ulong optmask; /* which options to request */
int echoack; /* recieved echo ack */
int echotimeout; /* echo timeout */
};
/* server chap state */
struct Chap
{
int proto; /* chap proto */
int state; /* chap state */
uchar id; /* id of current message */
int timeout; /* for current state */
AuthInfo *ai;
Chalstate *cs;
};
int ipfd; /* fd to ip stack */
int ipcfd; /* fd to control channel of ip stack */
int mediain; /* fd to media */
int mediaout; /* fd to media */
char *net; /* ip stack to use */
int framing; /* non-zero to use framing characters */
Ipaddr local;
Ipaddr curlocal;
int localfrozen;
Ipaddr remote;
Ipaddr curremote;
int remotefrozen;
Block* inbuf; /* input buffer */
Block* outbuf; /* output buffer */
QLock outlock; /* and its lock */
ulong magic; /* magic number to detect loop backs */
ulong rctlmap; /* map of chars to ignore in rcvr */
ulong xctlmap; /* map of chars to excape in xmit */
int phase; /* PPP phase */
Pstate* lcp; /* lcp state */
Pstate* ccp; /* ccp state */
Pstate* ipcp; /* ipcp state */
Chap* chap; /* chap state */
Tcpc* ctcp; /* tcp compression state */
ulong mtu; /* maximum xmit size */
ulong mru; /* maximum recv size */
/* data compression */
int ctries; /* number of negotiation tries */
Comptype *ctype; /* compression virtual table */
void *cstate; /* compression state */
Uncomptype *unctype; /* uncompression virtual table */
void *uncstate; /* uncompression state */
/* encryption key */
uchar sendkey[16];
uchar recvkey[16];
int sendencrypted;
/* authentication */
char chapname[256]; /* chap system name */
/* link quality monitoring */
int period; /* lqm period */
int timeout; /* time to next lqm packet */
Qualstats in; /* local */
Qualstats out;
Qualstats pin; /* peer */
Qualstats pout;
Qualstats sin; /* saved */