Fix freebsd support in kppp

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 10 years ago
parent 8068c89c7f
commit 1aeb94bdae

@ -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 */

Loading…
Cancel
Save