Transmitting and Receiving ARP Packets
The functions used to send and receive ARP packets are:
-
arp_send The neighboring subsystem calls
neigh_ops->solicitto transmit a solicitation request. In the case of ARP, thesolicitfunction (arp_solicit) is a simple wrapper aroundarp_send.arp_sendfills in the ARP header and payload and uses thedev_queue_xmitfunction to transmit the request.-
arp_rcv Because ARP is a protocol in its own right (unlike ND for IPv6), it registers a handler in
arp_init. The next section describesarp_rcvin detail, along with how the two main ARP packet types are processed.
As shown in Figure 28-13, both transmission and reception of ARP packets can be controlled by Netfilter.
The dotted lines between arp_rcv and arp_send indicate that in some cases, the reception of an ARP
packet triggers the transmission of at least one other ARP packet. This occurs when:
Bridging is configured. A bridge receiving an ARP packet may just forward it to other bridge interfaces without processing it.
The ingress packet is an
ARPOP_REQUESTand the neighboring subsystem decides it can reply according to its configuration. The subsystem generates anARPOP_REPLY.
As Figure 28-13 shows, arp_send is also triggered by external events and a few kernel
features such as bonding; details are provided in later sections.
Transmitting ARP Packets: Introduction to arp_send
arp_send is the routine provided by ARP to
transmit both solicitation requests and replies, as shown in Figure 28-14. Chapter ...
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