]> git.ozlabs.org Git - ppp.git/commitdiff
split stats ioctl into two
authorPaul Mackerras <paulus@samba.org>
Sat, 22 Oct 1994 11:56:19 +0000 (11:56 +0000)
committerPaul Mackerras <paulus@samba.org>
Sat, 22 Oct 1994 11:56:19 +0000 (11:56 +0000)
include/net/if_ppp.h
include/net/ppp_defs.h
include/net/ppp_str.h

index 1632d7d6e71c223a8248613eca68ea27f5f98806..6231e01c26481019be2ed072f884bb831fcf1680 100644 (file)
@@ -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
index 7e6c62f793b853d380e95d1bfd094c70659e5936..ccd4f6e8c5b2eb2b0b48c751de4fdf880ffe96ff 100644 (file)
@@ -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 */
 };
index 760e7376ded2a4daa3fd7a9904ceb135f559acbb..d3caba8c2e1a108092791335333eba23a530b104 100644 (file)
@@ -5,8 +5,6 @@
   See copyright statement in NOTES
 */
 
-#include       <sys/ioccom.h>
-
 /*
  * 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
 
 /*