X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fsys-svr4.c;h=461e53640979373dbe328928a5c591fec4da4784;hp=c87c9d060e763cde474fd94b3a4f38b90713077b;hb=ab7cff041f1b8054ae5691df236fe18c1d23bfe6;hpb=fdc0c58f5a318a320f15e922f4df879b6bd75c71 diff --git a/pppd/sys-svr4.c b/pppd/sys-svr4.c index c87c9d0..461e536 100644 --- a/pppd/sys-svr4.c +++ b/pppd/sys-svr4.c @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-svr4.c,v 1.27 1999/03/19 01:29:50 paulus Exp $"; +static char rcsid[] = "$Id: sys-svr4.c,v 1.28 1999/03/19 04:23:52 paulus Exp $"; #endif #include @@ -683,7 +683,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; @@ -701,7 +702,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; @@ -930,6 +932,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; +} + #if 0 /* * set_filters - transfer the pass and active filters to the kernel.