Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/netstat/inet.c
Context not available. | |||||
"Proto", "Recv-Q", "Send-Q", | "Proto", "Recv-Q", "Send-Q", | ||||
"Local Address", "Foreign Address"); | "Local Address", "Foreign Address"); | ||||
if (!xflag && !Rflag) | if (!xflag && !Rflag) | ||||
xo_emit(" (state)"); | xo_emit(" {T:/%-11.11s}", "(state)"); | ||||
} | } | ||||
if (xflag) { | if (xflag) { | ||||
xo_emit(" {T:/%-6.6s} {T:/%-6.6s} {T:/%-6.6s} " | xo_emit(" {T:/%-6.6s} {T:/%-6.6s} {T:/%-6.6s} " | ||||
Context not available. | |||||
xo_emit(" {T:/%8.8s} {T:/%5.5s}", | xo_emit(" {T:/%8.8s} {T:/%5.5s}", | ||||
"flowid", "ftype"); | "flowid", "ftype"); | ||||
} | } | ||||
if (Pflag) | |||||
xo_emit(" {T:/%s}", "Log ID"); | |||||
xo_emit("\n"); | xo_emit("\n"); | ||||
first = 0; | first = 0; | ||||
} | } | ||||
Context not available. | |||||
} | } | ||||
if (istcp && !Lflag && !xflag && !Tflag && !Rflag) { | if (istcp && !Lflag && !xflag && !Tflag && !Rflag) { | ||||
if (tp->t_state < 0 || tp->t_state >= TCP_NSTATES) | if (tp->t_state < 0 || tp->t_state >= TCP_NSTATES) | ||||
xo_emit("{:tcp-state/%d}", tp->t_state); | xo_emit("{:tcp-state/%-11d}", tp->t_state); | ||||
else { | else { | ||||
xo_emit("{:tcp-state/%s}", | xo_emit("{:tcp-state/%-11s}", | ||||
tcpstates[tp->t_state]); | tcpstates[tp->t_state]); | ||||
#if defined(TF_NEEDSYN) && defined(TF_NEEDFIN) | #if defined(TF_NEEDSYN) && defined(TF_NEEDFIN) | ||||
/* Show T/TCP `hidden state' */ | /* Show T/TCP `hidden state' */ | ||||
Context not available. | |||||
inp->inp_flowid, | inp->inp_flowid, | ||||
inp->inp_flowtype); | inp->inp_flowtype); | ||||
} | } | ||||
if (istcp && Pflag) | |||||
xo_emit(" {:log-id/%s}", tp->xt_logid[0] == '\0' ? | |||||
"-" : tp->xt_logid); | |||||
xo_emit("\n"); | xo_emit("\n"); | ||||
xo_close_instance("socket"); | xo_close_instance("socket"); | ||||
} | } | ||||
Context not available. |