summaryrefslogtreecommitdiffstats
path: root/kppp/pppstats.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2015-06-26 13:12:00 +0200
committerSlávek Banko <slavek.banko@axis.cz>2015-06-26 13:31:38 +0200
commit6deb0a334c58a1a0511724977f026a1f80fa32c8 (patch)
tree4388654219cdb4d2ea792ce18e8c8ffe25481198 /kppp/pppstats.cpp
parentab50c16da8b9009b135f010dcebef9a4072d5cd5 (diff)
downloadtdenetwork-6deb0a334c58a1a0511724977f026a1f80fa32c8.tar.gz
tdenetwork-6deb0a334c58a1a0511724977f026a1f80fa32c8.zip
Fix freebsd support in kppp
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 1aeb94bdae94e8b164eace8125a61443b01c3784)
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 */