]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-osf.c
Add pty, notty and record options.
[ppp.git] / pppd / sys-osf.c
index c25e33921afdc3eb4b1139d11748c02b9e837304..94b3dd2576d41902d54aad8c17cfec28dc4cb640 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-osf.c,v 1.22 1999/03/19 04:23:49 paulus Exp $";
+static char rcsid[] = "$Id: sys-osf.c,v 1.23 1999/03/22 05:55:38 paulus Exp $";
 #endif
 
 #include <stdio.h>
@@ -1017,12 +1017,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;
 }