summaryrefslogtreecommitdiffstats
path: root/kppp/pppstats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kppp/pppstats.cpp')
-rw-r--r--kppp/pppstats.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/kppp/pppstats.cpp b/kppp/pppstats.cpp
index 29a87e77..eb209990 100644
--- a/kppp/pppstats.cpp
+++ b/kppp/pppstats.cpp
@@ -56,6 +56,9 @@
#include <netinet/in.h>
#ifdef __DragonFly__
#include <net/ppp_layer/ppp_defs.h>
+#elif defined(__FreeBSD__)
+#include <net/if.h>
+#include <net/ppp_defs.h>
#else
#include <net/ppp_defs.h>
#endif
@@ -261,6 +264,7 @@ bool PPPStats::doStats() {
return false;
}
+# if !defined(__FreeBSD__)
// "in" "pack" "comp" "uncomp" "err"
// IN PACK VJCOMP VJUNC VJERR
@@ -284,12 +288,13 @@ bool PPPStats::doStats() {
packetsoutunc = cur.p.ppp_opackets - cur.vj.vjs_packets;
return true;
+# endif
}
#ifndef STREAMS
bool PPPStats::get_ppp_stats(struct ppp_stats *curp){
-
+# if !defined(__FreeBSD__)
struct ifpppstatsreq req;
if(s==0)
@@ -310,6 +315,9 @@ bool PPPStats::get_ppp_stats(struct ppp_stats *curp){
}
*curp = req.stats;
return true;
+# else
+ return false;
+# endif
}
#else /* STREAMS */