]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-osf.c
remove a couple of ansi-C-isms.
[ppp.git] / pppd / sys-osf.c
index 30930b25743cccf6d7c78efe366dc5aac111a751..c25e33921afdc3eb4b1139d11748c02b9e837304 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-osf.c,v 1.21 1999/03/19 01:29:46 paulus Exp $";
+static char rcsid[] = "$Id: sys-osf.c,v 1.22 1999/03/19 04:23:49 paulus Exp $";
 #endif
 
 #include <stdio.h>
@@ -754,7 +754,8 @@ wait_input(timo)
 /*
  * add_fd - add an fd to the set that wait_input waits for.
  */
-void add_fd(int fd)
+void add_fd(fd)
+    int fd;
 {
     int n;
 
@@ -772,7 +773,8 @@ void add_fd(int fd)
 /*
  * remove_fd - remove an fd from the set that wait_input waits for.
  */
-void remove_fd(int fd)
+void remove_fd(fd)
+    int fd;
 {
     int n;
 
@@ -1009,6 +1011,21 @@ get_idle_time(u, ip)
     return strioctl(pppfd, PPPIO_GIDLE, ip, 0, sizeof(struct ppp_idle)) >= 0;
 }
 
+/*
+ * get_ppp_stats - return statistics for the link.
+ */
+int
+get_ppp_stats(u, stats)
+    int u;
+    struct ppp_stats *stats;
+{
+    if (strioctl(pppfd, PPPIO_GETSTAT, stats, 0, sizeof(*stats)) < 0) {
+       error("Couldn't get link statistics: %m");
+       return 0;
+    }
+    return 1;
+}
+
 
 /*
  * ccp_fatal_error - returns 1 if decompression was disabled as a