-/* $Id: ppp_defs.h,v 1.2 1994/09/21 01:31:06 paulus Exp $ */
+/* $Id: ppp_defs.h,v 1.7 1995/08/10 06:49:35 paulus Exp $ */
/*
* ppp_defs.h - PPP definitions.
/*
* A 32-bit unsigned integral type.
*/
-#ifndef __BIT_TYPES_DEFINED__
+#if !defined(__BIT_TYPES_DEFINED__) && !defined(_BITYPES)
#ifdef UINT32_T
typedef UINT32_T u_int32_t;
#else
-typedef unsigned long u_int32_t;
+typedef unsigned int u_int32_t;
#endif
#endif
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 */
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 {
+ time_t xmit_idle; /* time since last NP packet sent */
+ time_t recv_idle; /* time since last NP packet received */
+};
+
#ifndef __P
#ifdef __STDC__
#define __P(x) x