Make systat -net aware of compressed time_wait sockets.
This commit is contained in:
parent
7655ebdaaa
commit
ba2bc772d1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123800
@ -211,10 +211,18 @@ fetchnetstat_kvm()
|
||||
continue;
|
||||
if (nports && !checkport(&inpcb))
|
||||
continue;
|
||||
KREAD(inpcb.inp_socket, &sockb, sizeof (sockb));
|
||||
if (istcp) {
|
||||
KREAD(inpcb.inp_ppcb, &tcpcb, sizeof (tcpcb));
|
||||
enter_kvm(&inpcb, &sockb, tcpcb.t_state, "tcp");
|
||||
if (inpcb.inp_vflag & INP_TIMEWAIT) {
|
||||
bzero(&sockb, sizeof(sockb));
|
||||
enter_kvm(&inpcb, &sockb, TCPS_TIME_WAIT,
|
||||
"tcp");
|
||||
} else {
|
||||
KREAD(inpcb.inp_socket, &sockb,
|
||||
sizeof (sockb));
|
||||
KREAD(inpcb.inp_ppcb, &tcpcb, sizeof (tcpcb));
|
||||
enter_kvm(&inpcb, &sockb, tcpcb.t_state,
|
||||
"tcp");
|
||||
}
|
||||
} else
|
||||
enter_kvm(&inpcb, &sockb, 0, "udp");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user