diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-04-17 20:48:52 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-04-17 20:48:52 +0000 |
commit | 243a389a6ab4dfd405e3acb44510c86c9f0427af (patch) | |
tree | 3ee231eed6be924567c56bb3e98b8a07477c284f /usr.bin/netstat | |
parent | 168c1fd50290b3cac3b75ebfeb69d1a4f531a191 (diff) |
Use struct ipsec_level within inpcb.
Instead of passing around u_char[4], introduce struct ipsec_level
that contains 4 ipsec levels. This provides better type safety.
The embedding struct inpcb is globally visible for netstat(1), so
put struct ipsec_level outside of #ifdef _KERNEL.
OK deraadt@ mvs@
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/inet.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index a5bcd793822..88d37be055e 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.c,v 1.181 2024/02/13 12:22:09 bluhm Exp $ */ +/* $OpenBSD: inet.c,v 1.182 2024/04/17 20:48:51 bluhm Exp $ */ /* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */ /* @@ -1489,10 +1489,10 @@ inpcb_dump(u_long off, short protocol, int af) printf("ro_dst %s\n ", raddr); p("%#.8x", inp_flags, "\n "); p("%d", inp_hops, "\n "); - p("%u", inp_seclevel[0], ", "); - p("%u", inp_seclevel[1], ", "); - p("%u", inp_seclevel[2], ", "); - p("%u", inp_seclevel[3], "\n "); + p("%u", inp_seclevel.sl_auth, ", "); + p("%u", inp_seclevel.sl_esp_trans, ", "); + p("%u", inp_seclevel.sl_esp_network, ", "); + p("%u", inp_seclevel.sl_ipcomp, "\n "); p("%u", inp_ip_minttl, "\n "); p("%d", inp_cksum6, "\n "); pp("%p", inp_icmp6filt, "\n "); |