X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=include%2Fnet%2Fppp_defs.h;h=4f0e711561cd9337ab829741e54723c64d87780f;hp=9a0a2a16b7846bc8c5deadd716c014cd4e1a0b9a;hb=5079a982cc7f44cf230df1bec5520cbb9f5631ad;hpb=7d1afb88465296310cad5b77582ab304ca2811c7;ds=sidebyside diff --git a/include/net/ppp_defs.h b/include/net/ppp_defs.h index 9a0a2a1..4f0e711 100644 --- a/include/net/ppp_defs.h +++ b/include/net/ppp_defs.h @@ -1,4 +1,4 @@ -/* $Id: ppp_defs.h,v 1.1 1994/09/19 04:18:43 paulus Exp $ */ +/* $Id: ppp_defs.h,v 1.5 1994/12/05 00:32:37 paulus Exp $ */ /* * ppp_defs.h - PPP definitions. @@ -27,6 +27,9 @@ * OR MODIFICATIONS. */ +#ifndef _PPP_DEFS_H_ +#define _PPP_DEFS_H_ + /* * The basic PPP frame. */ @@ -54,8 +57,12 @@ #define PPP_VJC_COMP 0x2d /* VJ compressed TCP */ #define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */ #define PPP_COMP 0xfd /* compressed packet */ -#define PPP_LCP 0xc021 /* Link Control Protocol */ +#define PPP_IPCP 0x8021 /* IP Control Protocol */ #define PPP_CCP 0x80fd /* Compression Control Protocol */ +#define PPP_LCP 0xc021 /* Link Control Protocol */ +#define PPP_PAP 0xc023 /* Password Authentication Protocol */ +#define PPP_LQR 0xc025 /* Link Quality Report protocol */ +#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */ /* * Values for FCS calculations. @@ -71,7 +78,7 @@ #ifdef UINT32_T typedef UINT32_T u_int32_t; #else -typedef unsigned long u_int32_t; +typedef unsigned int u_int32_t; #endif #endif @@ -113,6 +120,11 @@ struct vjstat { u_int vjs_tossed; /* inbound packets tossed because of error */ }; +struct ppp_stats { + struct pppstat p; /* basic PPP statistics */ + struct vjstat vj; /* VJ header compression statistics */ +}; + struct compstat { u_int unc_bytes; /* total uncompressed bytes */ u_int unc_packets; /* total uncompressed packets */ @@ -120,16 +132,23 @@ struct compstat { u_int comp_packets; /* compressed packets */ u_int inc_bytes; /* incompressible bytes */ u_int inc_packets; /* incompressible packets */ - double ratio; /* recent compression ratio */ + u_int ratio; /* recent compression ratio << 8 */ }; -struct ppp_stats { - struct pppstat p; /* basic PPP statistics */ - struct vjstat vj; /* VJ header compression statistics */ +struct ppp_comp_stats { struct compstat c; /* packet compression statistics */ struct compstat d; /* packet decompression statistics */ }; +/* + * The following structure records the time in seconds since + * the last NP packet was sent or received. + */ +struct ppp_idle { + int xmit_idle; /* time since last NP packet sent */ + int recv_idle; /* time since last NP packet received */ +}; + #ifndef __P #ifdef __STDC__ #define __P(x) x @@ -137,3 +156,5 @@ struct ppp_stats { #define __P(x) () #endif #endif + +#endif /* _PPP_DEFS_H_ */