version 1.25, 2001/08/26 09:42:04 |
version 1.26, 2001/09/04 23:35:59 |
|
|
int ift_dr; /* drops */ |
int ift_dr; /* drops */ |
} iftot[MAXIF]; |
} iftot[MAXIF]; |
|
|
u_char signalled; /* set if alarm goes off "early" */ |
volatile sig_atomic_t signalled; /* set if alarm goes off "early" */ |
|
|
/* |
/* |
* Print a running summary of interface statistics. |
* Print a running summary of interface statistics. |
|
|
register int line; |
register int line; |
struct iftot *lastif, *sum, *interesting; |
struct iftot *lastif, *sum, *interesting; |
struct ifnet_head ifhead; /* TAILQ_HEAD */ |
struct ifnet_head ifhead; /* TAILQ_HEAD */ |
int oldmask; |
sigset_t emptyset; |
|
|
/* |
/* |
* Find the pointer to the first ifnet structure. Replace |
* Find the pointer to the first ifnet structure. Replace |
|
|
putchar('\n'); |
putchar('\n'); |
fflush(stdout); |
fflush(stdout); |
line++; |
line++; |
oldmask = sigblock(sigmask(SIGALRM)); |
sigemptyset(&emptyset); |
if (! signalled) { |
if (!signalled) |
sigpause(0); |
sigsuspend(&emptyset); |
} |
|
sigsetmask(oldmask); |
|
signalled = NO; |
signalled = NO; |
(void)alarm(interval); |
(void)alarm(interval); |
if (line == 21) |
if (line == 21) |