Make netstat report the correct state for T/TCP.

Submitted by: Andras Olah <olah@cs.utwente.nl>
This commit is contained in:
Garrett Wollman 1995-02-14 03:09:51 +00:00
parent 2f96f1f446
commit 9a94a59774

View File

@ -142,8 +142,14 @@ protopr(off, name)
if (istcp) {
if (tcpcb.t_state < 0 || tcpcb.t_state >= TCP_NSTATES)
printf(" %d", tcpcb.t_state);
else
else {
printf(" %s", tcpstates[tcpcb.t_state]);
#if defined(TF_NEEDSYN) && defined(TF_NEEDSYN)
/* Show T/TCP `hidden state' */
if (tcpcb.t_flags & (TF_NEEDSYN|TF_NEEDFIN))
putchar('*');
#endif /* defined(TF_NEEDSYN) && defined(TF_NEEDSYN) */
}
}
putchar('\n');
prev = next;