The Big Picture
Figure 25-7 shows the kernel subsystems with which the ICMP protocol interacts. The figure shows only the two common transport protocols, TCP and UDP, but many others also interact with ICMP, such as the various tunnel protocols (IPIP, GRE), the protocols of the IPsec suite (AH, ESP, IPcomp), etc.

Figure 25-7. The big picture
Here are some examples of interactions between protocols:
- IP protocol
The
ip_local_deliver_finishroutine, described in Chapter 24, delivers ingress ICMP messages to the receive routineicmp_rcvregistered by the ICMP protocol, but it also delivers them to the raw IP sockets that registered against the ICMP protocol (raw_v4_input). Transmission requests are submitted to the IP layer via theip_append_dataandip_push_pending_framesroutines described in detail in Chapter 21. The figure does not show the points where the IP protocol or the routing subsystem callicmp_send.- Routing subsystem
ICMP messages are transmitted with
icmp_replyandicmp_send. Both are described in the section "Transmitting ICMP Messages." These routines consult the routing table with theip_route_output_keyfunction described in Chapter 33. Also, the routines that process ingress ICMP messages may need to interact with the routing subsystem, such as by usingip_rt_redirectandip_rt_frag_needed, to process the information received with an ICMP message.- Socket layer
When an ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access