static void
info(register int verbose)
{
- struct pcap_stat stat;
+ struct pcap_stat stats;
/*
* Older versions of libpcap didn't set ps_ifdrop on some
* platforms; initialize it to 0 to handle that.
*/
- stat.ps_ifdrop = 0;
- if (pcap_stats(pd, &stat) < 0) {
+ stats.ps_ifdrop = 0;
+ if (pcap_stats(pd, &stats) < 0) {
(void)fprintf(stderr, "pcap_stats: %s\n", pcap_geterr(pd));
infoprint = 0;
return;
fputs(", ", stderr);
else
putc('\n', stderr);
- (void)fprintf(stderr, "%u packet%s received by filter", stat.ps_recv,
- PLURAL_SUFFIX(stat.ps_recv));
+ (void)fprintf(stderr, "%u packet%s received by filter", stats.ps_recv,
+ PLURAL_SUFFIX(stats.ps_recv));
if (!verbose)
fputs(", ", stderr);
else
putc('\n', stderr);
- (void)fprintf(stderr, "%u packet%s dropped by kernel", stat.ps_drop,
- PLURAL_SUFFIX(stat.ps_drop));
- if (stat.ps_ifdrop != 0) {
+ (void)fprintf(stderr, "%u packet%s dropped by kernel", stats.ps_drop,
+ PLURAL_SUFFIX(stats.ps_drop));
+ if (stats.ps_ifdrop != 0) {
if (!verbose)
fputs(", ", stderr);
else
putc('\n', stderr);
(void)fprintf(stderr, "%u packet%s dropped by interface\n",
- stat.ps_ifdrop, PLURAL_SUFFIX(stat.ps_ifdrop));
+ stats.ps_ifdrop, PLURAL_SUFFIX(stats.ps_ifdrop));
} else
putc('\n', stderr);
infoprint = 0;