From: Paul Mackerras Date: Sat, 22 Oct 1994 11:56:19 +0000 (+0000) Subject: split stats ioctl into two X-Git-Tag: RELEASE_2_3_6~832 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=29829af57374e99da39f341fd00a0ae2445266d6 split stats ioctl into two --- diff --git a/include/net/if_ppp.h b/include/net/if_ppp.h index 1632d7d..6231e01 100644 --- a/include/net/if_ppp.h +++ b/include/net/if_ppp.h @@ -1,4 +1,4 @@ -/* $Id: if_ppp.h,v 1.7 1994/10/21 06:26:15 paulus Exp $ */ +/* $Id: if_ppp.h,v 1.8 1994/10/22 11:56:19 paulus Exp $ */ /* * if_ppp.h - Point-to-Point Protocol definitions. @@ -84,6 +84,11 @@ struct ifpppstatsreq { struct ppp_stats stats; }; +struct ifpppcstatsreq { + char ifr_name[IFNAMSIZ]; + struct ppp_comp_stats stats; +}; + /* * Ioctl definitions. */ @@ -105,6 +110,7 @@ struct ifpppstatsreq { #define PPPIOCSNPMODE _IOW('t', 75, struct npioctl) /* set NP mode */ #define SIOCGPPPSTATS _IOWR('i', 123, struct ifpppstatsreq) +#define SIOCGPPPCSTATS _IOWR('i', 124, struct ifpppcstatsreq) #if !defined(ifr_mtu) #define ifr_mtu ifr_ifru.ifru_metric diff --git a/include/net/ppp_defs.h b/include/net/ppp_defs.h index 7e6c62f..ccd4f6e 100644 --- a/include/net/ppp_defs.h +++ b/include/net/ppp_defs.h @@ -1,4 +1,4 @@ -/* $Id: ppp_defs.h,v 1.2 1994/09/21 01:31:06 paulus Exp $ */ +/* $Id: ppp_defs.h,v 1.3 1994/10/22 11:56:19 paulus Exp $ */ /* * ppp_defs.h - PPP definitions. @@ -120,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 */ @@ -130,9 +135,7 @@ struct compstat { double ratio; /* recent compression ratio */ }; -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 */ }; diff --git a/include/net/ppp_str.h b/include/net/ppp_str.h index 760e737..d3caba8 100644 --- a/include/net/ppp_str.h +++ b/include/net/ppp_str.h @@ -5,8 +5,6 @@ See copyright statement in NOTES */ -#include - /* * Packet sizes */ @@ -34,6 +32,11 @@ struct ifpppstatsreq { struct ppp_stats stats; }; +struct ifpppcstatsreq { + char ifr_name[IFNAMSIZ]; + struct ppp_comp_stats stats; +}; + /* * Ioctl definitions. */ @@ -61,6 +64,7 @@ struct ifpppstatsreq { #define SIOCSCOMPRESS _IOW('p', 150, struct ppp_option_data) #define SIOCGPPPSTATS _IOWR('i', 123, struct ifpppstatsreq) +#define SIOCGPPPCSTATS _IOWR('i', 124, struct ifpppcstatsreq) #else /* traditional C compiler */ @@ -86,6 +90,7 @@ struct ifpppstatsreq { #define SIOCSCOMPRESS _IOW(p, 150, struct ppp_option_data) #define SIOCGPPPSTATS _IOWR(i, 123, struct ifpppstatsreq) +#define SIOCGPPPCSTATS _IOWR(i, 124, struct ifpppcstatsreq) #endif /*