Show divert(4) sockets as well.

This commit is contained in:
Ruslan Ermilov 2004-12-05 14:17:14 +00:00
parent f642006ecc
commit 2cfbdf89b7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138391

View File

@ -204,6 +204,10 @@ gather_inet(int proto)
varname = "net.inet.udp.pcblist";
protoname = "udp";
break;
case IPPROTO_DIVERT:
varname = "net.inet.divert.pcblist";
protoname = "div";
break;
default:
abort();
}
@ -248,6 +252,7 @@ gather_inet(int proto)
so = &xtp->xt_socket;
break;
case IPPROTO_UDP:
case IPPROTO_DIVERT:
xip = (struct xinpcb *)xig;
if (xip->xi_len != sizeof *xip) {
warnx("struct xinpcb size mismatch");
@ -620,6 +625,7 @@ main(int argc, char *argv[])
if (opt_4 || opt_6) {
gather_inet(IPPROTO_TCP);
gather_inet(IPPROTO_UDP);
gather_inet(IPPROTO_DIVERT);
}
if (opt_u) {
gather_unix(SOCK_STREAM);