freebsd-dev/sys/netinet6
Gleb Smirnoff fcb3f813f3 netinet*: remove PRC_ constants and streamline ICMP processing
In the original design of the network stack from the protocol control
input method pr_ctlinput was used notify the protocols about two very
different kinds of events: internal system events and receival of an
ICMP messages from outside.  These events were coded with PRC_ codes.
Today these methods are removed from the protosw(9) and are isolated
to IPv4 and IPv6 stacks and are called only from icmp*_input().  The
PRC_ codes now just create a shim layer between ICMP codes and errors
or actions taken by protocols.

- Change ipproto_ctlinput_t to pass just pointer to ICMP header.  This
  allows protocols to not deduct it from the internal IP header.
- Change ip6proto_ctlinput_t to pass just struct ip6ctlparam pointer.
  It has all the information needed to the protocols.  In the structure,
  change ip6c_finaldst fields to sockaddr_in6.  The reason is that
  icmp6_input() already has this address wrapped in sockaddr, and the
  protocols want this address as sockaddr.
- For UDP tunneling control input, as well as for IPSEC control input,
  change the prototypes to accept a transparent union of either ICMP
  header pointer or struct ip6ctlparam pointer.
- In icmp_input() and icmp6_input() do only validation of ICMP header and
  count bad packets.  The translation of ICMP codes to errors/actions is
  done by protocols.
- Provide icmp_errmap() and icmp6_errmap() as substitute to inetctlerrmap,
  inet6ctlerrmap arrays.
- In protocol ctlinput methods either trust what icmp_errmap() recommend,
  or do our own logic based on the ICMP header.

Differential revision:	https://reviews.freebsd.org/D36731
2022-10-03 20:53:04 -07:00
..
dest6.c
frag6.c frag6: use callout(9) directly instead of pr_slowtimo 2022-08-17 11:50:31 -07:00
icmp6.c netinet*: remove PRC_ constants and streamline ICMP processing 2022-10-03 20:53:04 -07:00
icmp6.h
in6_cksum.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
in6_fib_algo.c Fix dpdk/ldradix fib lookup algorithm preference calculation. 2021-03-07 22:17:53 +00:00
in6_fib.c routing: refactor private KPI 2022-08-01 10:02:12 +00:00
in6_fib.h Add modular fib lookup framework. 2020-12-25 11:33:17 +00:00
in6_gif.c net: Introduce IPV6_DSCP(), IPV6_ECN() and IPV6_TRAFFIC_CLASS() macros 2021-03-04 20:56:48 +01:00
in6_ifattach.c nd6: Mark several callouts as MPSAFE 2021-08-09 13:27:52 -04:00
in6_ifattach.h
in6_jail.c sysent: Get rid of bogus sys/sysent.h include. 2022-05-28 20:52:17 +03:00
in6_mcast.c Correct IPv6 MLD group state string table 2022-09-19 09:01:36 -04:00
in6_pcb.c netinet*: remove PRC_ constants and streamline ICMP processing 2022-10-03 20:53:04 -07:00
in6_pcb.h netinet*: de-void control input IP protocol methods 2022-10-03 20:53:04 -07:00
in6_proto.c netinet6: retire ip6protosw.h 2022-10-03 20:53:04 -07:00
in6_rmx.c routing: add nhop(9) kpi. 2022-08-01 08:52:26 +00:00
in6_rss.c Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816" 2021-12-02 14:45:04 -08:00
in6_rss.h Implement flowid calculation for outbound connections to balance 2020-10-18 17:15:47 +00:00
in6_src.c netinet6: simplify selectroute() 2022-07-08 11:27:16 +00:00
in6_var.h netinet*: remove PRC_ constants and streamline ICMP processing 2022-10-03 20:53:04 -07:00
in6.c netinet6: factor interface addition code to the dedicated function 2022-09-27 13:23:34 +00:00
in6.h protosw: separate pr_input and pr_ctlinput out of protosw 2022-08-17 11:50:31 -07:00
ip6_ecn.h
ip6_fastfwd.c net: employ newly added pfil_mbuf_{in,out} where approriate 2022-09-08 16:21:08 +00:00
ip6_forward.c net: employ newly added pfil_mbuf_{in,out} where approriate 2022-09-08 16:21:08 +00:00
ip6_gre.c udp: allow udp_tun_func_t() to indicate it did not eat the packet 2022-04-12 10:04:59 +02:00
ip6_id.c
ip6_input.c netinet*: remove PRC_ constants and streamline ICMP processing 2022-10-03 20:53:04 -07:00
ip6_mroute.c raw ip: fix regression with multicast and RSVP 2022-09-02 12:17:09 -07:00
ip6_mroute.h
ip6_output.c netinet6: retire ip6protosw.h 2022-10-03 20:53:04 -07:00
ip6_var.h netinet*: remove PRC_ constants and streamline ICMP processing 2022-10-03 20:53:04 -07:00
ip6.h
ip_fw_nat64.h
ip_fw_nptv6.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
mld6_var.h mld6: use callout(9) directly instead of pr_slowtimo, pr_fasttimo 2022-08-17 11:50:31 -07:00
mld6.c mld6: use callout(9) directly instead of pr_slowtimo, pr_fasttimo 2022-08-17 11:50:31 -07:00
mld6.h
nd6_nbr.c netinet6: call lle_event eventhandler after updating state 2022-09-05 13:01:27 +00:00
nd6_rtr.c Revert "routing: install prefix and loopback routes using new nhop-based KPI." 2022-08-29 16:20:42 +00:00
nd6.c routing: constantify @rc in rib_decompose_notification(). 2022-08-29 18:12:24 +00:00
nd6.h netinet6: fix SIOCSPFXFLUSH_IN6 by skipping manually-configured prefixes 2022-08-24 13:59:13 +00:00
pim6_var.h
pim6.h
raw_ip6.c netinet*: remove PRC_ constants and streamline ICMP processing 2022-10-03 20:53:04 -07:00
raw_ip6.h
route6.c
scope6_var.h Make net.inet6.ip6.deembed_scopeid behaviour default & remove sysctl. 2020-08-15 11:37:44 +00:00
scope6.c ifnet_byindex() actually requires network epoch 2021-12-06 09:32:31 -08:00
sctp6_usrreq.c netinet*: remove PRC_ constants and streamline ICMP processing 2022-10-03 20:53:04 -07:00
sctp6_var.h netinet*: de-void control input IP protocol methods 2022-10-03 20:53:04 -07:00
send.c protosw: refactor protosw and domain static declaration and load 2022-08-17 11:50:32 -07:00
send.h
tcp6_var.h netinet*: de-void control input IP protocol methods 2022-10-03 20:53:04 -07:00
udp6_usrreq.c netinet*: remove PRC_ constants and streamline ICMP processing 2022-10-03 20:53:04 -07:00
udp6_var.h netinet*: de-void control input IP protocol methods 2022-10-03 20:53:04 -07:00