Use struct ipsec_level within inpcb.
authorbluhm <bluhm@openbsd.org>
Wed, 17 Apr 2024 20:48:51 +0000 (20:48 +0000)
committerbluhm <bluhm@openbsd.org>
Wed, 17 Apr 2024 20:48:51 +0000 (20:48 +0000)
commitace0f1891f538e34a7abe4c36dddbf6f6515f1bb
tree4efd67e392bcf9b4ba2d04da4ff885deae22db6e
parent0a1c2042fdcee46fd65a8b9c6bcf29b7870156f5
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@
16 files changed:
sys/netinet/in_pcb.c
sys/netinet/in_pcb.h
sys/netinet/ip_ipsp.h
sys/netinet/ip_output.c
sys/netinet/ip_spd.c
sys/netinet/ip_var.h
sys/netinet/raw_ip.c
sys/netinet/tcp_input.c
sys/netinet/tcp_output.c
sys/netinet/tcp_subr.c
sys/netinet/udp_usrreq.c
sys/netinet6/ip6_output.c
sys/netinet6/ip6_var.h
sys/netinet6/raw_ip6.c
sys/netinet6/udp6_output.c
usr.bin/netstat/inet.c