X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fsys-sunos4.c;h=d0b1ac00d4e2780cbe358e2b549efa50661dbaf3;hb=daf25780c53da49a0b802242d436c778043d8b56;hp=8a1847faed8d67048b4798faa49a06c4d1ee5350;hpb=ab7cff041f1b8054ae5691df236fe18c1d23bfe6;p=ppp.git diff --git a/pppd/sys-sunos4.c b/pppd/sys-sunos4.c index 8a1847f..d0b1ac0 100644 --- a/pppd/sys-sunos4.c +++ b/pppd/sys-sunos4.c @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-sunos4.c,v 1.17 1999/03/19 04:23:50 paulus Exp $"; +static char rcsid[] = "$Id: sys-sunos4.c,v 1.18 1999/03/22 05:55:39 paulus Exp $"; #endif #include @@ -865,12 +865,16 @@ get_idle_time(u, ip) int get_ppp_stats(u, stats) int u; - struct ppp_stats *stats; + struct pppd_stats *stats; { - if (strioctl(pppfd, PPPIO_GETSTAT, stats, 0, sizeof(*stats)) < 0) { + struct ppp_stats s; + + if (strioctl(pppfd, PPPIO_GETSTAT, &s, 0, sizeof(s)) < 0) { error("Couldn't get link statistics: %m"); return 0; } + stats->bytes_in = s.p.ppp_ibytes; + stats->bytes_out = s.p.ppp_obytes; return 1; }