diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2020-12-23 22:20:19 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2020-12-23 22:20:19 +0000 |
commit | bda35853e52176dbc66a3efec57f7a744ddcd580 (patch) | |
tree | 9071bb2597bbf8f598db794e28b7fef178547bdb /usr.bin/netstat | |
parent | cbf2326c62f1674f517b35d6f024b2d770a611a7 (diff) |
Print specific headline for TCP state and IP protocol in netstat.
OK claudio@ sthen@
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/inet.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 432647e56c4..2e2a672d2ab 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.c,v 1.168 2020/01/15 14:02:37 mpi Exp $ */ +/* $OpenBSD: inet.c,v 1.169 2020/12/23 22:20:18 bluhm Exp $ */ /* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */ /* @@ -327,9 +327,10 @@ netdomainpr(struct kinfo_file *kf, int proto) if (Bflag && istcp) printf("%-6.6s %-6.6s %-6.6s ", "Recv-W", "Send-W", "Cgst-W"); - printf(" %-*.*s %-*.*s %s\n", + printf(" %-*.*s %-*.*s%s\n", addrlen, addrlen, "Local Address", - addrlen, addrlen, "Foreign Address", "(state)"); + addrlen, addrlen, "Foreign Address", + istcp ? " TCP-State" : type == SOCK_RAW ? " IP-Proto" : ""); } if (Aflag) |