aboutsummaryrefslogtreecommitdiffstats
path: root/system.c
diff options
context:
space:
mode:
authorreinelt <>2001-02-16 08:23:09 +0000
committerreinelt <>2001-02-16 08:23:09 +0000
commit809874ab240f27ecdf96b29877cdceaf4cc0114e (patch)
tree4b83094161a3cfda48a3abb7f8403fd1e765fc80 /system.c
parent97f92ab56802c16175dc7934a71ce29c9cb271f2 (diff)
downloadlcd4linux-809874ab240f27ecdf96b29877cdceaf4cc0114e.tar.gz
[lcd4linux @ 2001-02-16 08:23:09 by reinelt]
new token 'ic' (ISDN connected) by Carsten Nau <info@cnau.de>
Diffstat (limited to 'system.c')
-rw-r--r--system.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/system.c b/system.c
index 8a55d04..ad24e54 100644
--- a/system.c
+++ b/system.c
@@ -1,4 +1,4 @@
-/* $Id: system.c,v 1.18 2000/11/17 10:36:23 reinelt Exp $
+/* $Id: system.c,v 1.19 2001/02/16 08:23:09 reinelt Exp $
*
* system status retreivement
*
@@ -20,6 +20,10 @@
*
*
* $Log: system.c,v $
+ * Revision 1.19 2001/02/16 08:23:09 reinelt
+ *
+ * new token 'ic' (ISDN connected) by Carsten Nau <info@cnau.de>
+ *
* Revision 1.18 2000/11/17 10:36:23 reinelt
*
* fixed parsing of /proc/net/dev for 2.0 kernels
@@ -665,7 +669,9 @@ int PPP (int unit, int *rx, int *tx)
static int fd=-2;
struct ifpppstatsreq req;
char buffer[16];
-
+
+ static double junk=0;
+
*rx=0;
*tx=0;
@@ -689,9 +695,10 @@ int PPP (int unit, int *rx, int *tx)
snprintf (buffer, sizeof(buffer), "ppp%d_rx", unit);
*rx=smooth(buffer, 500, req.stats.p.ppp_ibytes);
-
snprintf (buffer, sizeof(buffer), "ppp%d_tx", unit);
*tx=smooth(buffer, 500, req.stats.p.ppp_obytes);
+ debug ("ppp_tx=%f smooth=%f", (double)(req.stats.p.ppp_obytes-junk), (double)*tx);
+ junk=req.stats.p.ppp_obytes;
return 0;
}