Linux Implementation
Early Linux kernels had L3 protocols call functions provided by neighboring protocols directly. The IPv4 subsystem, therefore, interacted directly with the ARP code. In recent versions of the kernel, developers have identified common requirements for different protocols and have abstracted them into a new layer called the neighboring infrastructure.
Because the kernel still includes old pieces of code that have not been updated to the
new, protocol-independent layer, you can still find direct calls to a few deprecated
functions of the ARP code (e.g., arp_find), but they
are exceptions. The section "Common Interface
Between L3 Protocols and Neighboring Protocols" in Chapter 27 discusses in detail the interface to
the neighboring infrastructure.
Figure 26-5 shows the key parts of Linux's neighboring subsystems and the other parts of the kernel with which they interact. The L3 protocols interact with the neighboring layer via a common interface, which uses the right neighboring protocol (ARP, ND, etc.) depending on the L3 protocol that is asking for the service.[*]
When transmitting a packet, the following steps take place:
The routing subsystem of the local host selects the L3 destination address (the next hop).

Figure 26-5. The big picture
If according to the routing table, this hop is on the same network (if, that is, the next hop is a neighbor), the neighboring layer ...
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