X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppstats%2Fpppstats.c;h=1a6eb9d603f924eac444a2353359dbeb497d660c;hp=8dcdb03fbaf2601f65f64cbd087098ea028bd96c;hb=47be928f50accd8136c6d0222cf6c14d1c8ab007;hpb=59f3284d28adecab0d664932ea8da0a68d6f257b diff --git a/pppstats/pppstats.c b/pppstats/pppstats.c index 8dcdb03..1a6eb9d 100644 --- a/pppstats/pppstats.c +++ b/pppstats/pppstats.c @@ -36,7 +36,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: pppstats.c,v 1.9 1995/06/01 02:23:39 paulus Exp $"; +static char rcsid[] = "$Id: pppstats.c,v 1.10 1995/06/30 01:58:25 paulus Exp $"; #endif #include @@ -289,6 +289,12 @@ get_ppp_stats(curp) { struct ifpppstatsreq req; +#ifdef _linux_ + req.stats_ptr = &req.stats; +#undef ifr_name +#define ifr_name ifr__name +#endif + sprintf(req.ifr_name, "ppp%d", unit); if (ioctl(s, SIOCGPPPSTATS, &req) < 0) { if (errno == ENOTTY) @@ -305,6 +311,12 @@ get_ppp_cstats(csp) { struct ifpppcstatsreq creq; +#ifdef _linux_ + creq.stats_ptr = &creq.stats; +#undef ifr_name +#define ifr_name ifr__name +#endif + sprintf(creq.ifr_name, "ppp%d", unit); if (ioctl(s, SIOCGPPPCSTATS, &creq) < 0) { if (errno == ENOTTY) {