Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/netstat/inet.c
Show First 20 Lines • Show All 377 Lines • ▼ Show 20 Lines | "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-45.45s} {T:/%-45.45s}"), | ||||
if (Pflag) | if (Pflag) | ||||
xo_emit(" {T:/%s}", "Log ID"); | xo_emit(" {T:/%s}", "Log ID"); | ||||
xo_emit("\n"); | xo_emit("\n"); | ||||
first = 0; | first = 0; | ||||
} | } | ||||
if (Lflag && so->so_qlimit == 0) | if (Lflag && so->so_qlimit == 0) | ||||
continue; | continue; | ||||
xo_open_instance("socket"); | xo_open_instance("socket"); | ||||
if (Aflag) { | if (Aflag) | ||||
if (istcp) | xo_emit("{q:address/%*lx} ", 2 * (int)sizeof(void *), | ||||
xo_emit("{q:address/%*lx} ", | |||||
2 * (int)sizeof(void *), | |||||
(u_long)inp->inp_ppcb); | |||||
else | |||||
xo_emit("{q:address/%*lx} ", | |||||
2 * (int)sizeof(void *), | |||||
(u_long)so->so_pcb); | (u_long)so->so_pcb); | ||||
} | |||||
#ifdef INET6 | #ifdef INET6 | ||||
if ((inp->inp_vflag & INP_IPV6) != 0) | if ((inp->inp_vflag & INP_IPV6) != 0) | ||||
vchar = ((inp->inp_vflag & INP_IPV4) != 0) ? | vchar = ((inp->inp_vflag & INP_IPV4) != 0) ? | ||||
"46" : "6"; | "46" : "6"; | ||||
else | else | ||||
#endif | #endif | ||||
vchar = ((inp->inp_vflag & INP_IPV4) != 0) ? | vchar = ((inp->inp_vflag & INP_IPV4) != 0) ? | ||||
"4" : ""; | "4" : ""; | ||||
▲ Show 20 Lines • Show All 1,149 Lines • Show Last 20 Lines |