From 74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Fri, 22 Dec 2006 21:39:35 +0000 Subject: 20060303 --- os/ip/ppp.h | 258 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 258 insertions(+) create mode 100644 os/ip/ppp.h (limited to 'os/ip/ppp.h') diff --git a/os/ip/ppp.h b/os/ip/ppp.h new file mode 100644 index 00000000..4f1e00de --- /dev/null +++ b/os/ip/ppp.h @@ -0,0 +1,258 @@ +typedef struct PPP PPP; +typedef struct Pstate Pstate; +typedef struct Lcpmsg Lcpmsg; +typedef struct Lcpopt Lcpopt; +typedef struct Qualpkt Qualpkt; +typedef struct Qualstats Qualstats; +typedef struct Tcpc Tcpc; + +typedef uchar Ipaddr[IPaddrlen]; + +enum +{ + HDLC_frame= 0x7e, + HDLC_esc= 0x7d, + + /* PPP frame fields */ + PPP_addr= 0xff, + PPP_ctl= 0x3, + PPP_initfcs= 0xffff, + PPP_goodfcs= 0xf0b8, + + /* PPP phases */ + Pdead= 0, + Plink, /* doing LCP */ + Pauth, /* doing chap */ + Pnet, /* doing IPCP, CCP */ + Pterm, /* closing down */ + + /* PPP protocol types */ + Pip= 0x21, /* internet */ + Pvjctcp= 0x2d, /* compressing van jacobson tcp */ + Pvjutcp= 0x2f, /* uncompressing van jacobson tcp */ + Pcdata= 0xfd, /* compressed datagram */ + Pipcp= 0x8021, /* ip control */ + Pecp= 0x8053, /* encryption control */ + Pccp= 0x80fd, /* compressed datagram control */ + Plcp= 0xc021, /* link control */ + Ppap= 0xc023, /* password auth. protocol */ + Plqm= 0xc025, /* link quality monitoring */ + Pchap= 0xc223, /* challenge/response */ + + /* LCP codes */ + Lconfreq= 1, + Lconfack= 2, + Lconfnak= 3, + Lconfrej= 4, + Ltermreq= 5, + Ltermack= 6, + Lcoderej= 7, + Lprotorej= 8, + Lechoreq= 9, + Lechoack= 10, + Ldiscard= 11, + + /* Lcp configure options */ + Omtu= 1, + Octlmap= 2, + Oauth= 3, + Oquality= 4, + Omagic= 5, + Opc= 7, + Oac= 8, + Obad= 12, /* for testing */ + + /* authentication protocols */ + APmd5= 5, + + /* lcp flags */ + Fmtu= 1<