Catch netstat up for the new bpf stats structures. Print 64 bit values
properly. Sponsored by: Seccuris Inc MFC after: 4 months
This commit is contained in:
parent
4d621040ff
commit
582908b314
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177549
@ -113,15 +113,19 @@ bpf_stats(char *ifname)
|
||||
free(bd);
|
||||
return;
|
||||
}
|
||||
printf("%5s %6s %7s %9s %9s %9s %5s %5s %s\n",
|
||||
(void) printf("%5s %6s %7s %9s %9s %9s %5s %5s %s\n",
|
||||
"Pid", "Netif", "Flags", "Recv", "Drop", "Match", "Sblen",
|
||||
"Hblen", "Command");
|
||||
for (d = &bd[0]; d < &bd[size / sizeof(*d)]; d++) {
|
||||
if (d->bd_structsize != sizeof(*d)) {
|
||||
warnx("bpf_stats_extended: version mismatch");
|
||||
return;
|
||||
}
|
||||
if (ifname && strcmp(ifname, d->bd_ifname) != 0)
|
||||
continue;
|
||||
bpf_flags(d, flagbuf);
|
||||
pname = bpf_pidname(d->bd_pid);
|
||||
printf("%5d %6s %7s %9lu %9lu %9lu %5d %5d %s\n",
|
||||
(void) printf("%5d %6s %7s %9ju %9ju %9ju %5d %5d %s\n",
|
||||
d->bd_pid, d->bd_ifname, flagbuf,
|
||||
d->bd_rcount, d->bd_dcount, d->bd_fcount,
|
||||
d->bd_slen, d->bd_hlen, pname);
|
||||
|
Loading…
Reference in New Issue
Block a user