TCP/IP Illustrated Vol I - Chapter 4 - ARP RFC 826
More...
|
|
#define | ARP_PACKET_SIZE (sizeof(struct ethernet_header) + sizeof(struct arp_header)) |
| | The maximum total size of an ARP packet.
|
| |
◆ arp_hw_type
| Enumerator |
|---|
| ARP_HW_ETHERNET | Ethernet MAC address.
|
◆ arp_operation
| Enumerator |
|---|
| ARP_REQUEST | Request. Sent first to try and find a MAC address.
|
| ARP_REPLY | Reply. Sent back to the sender if a match was found.
|
◆ arp_add()
- Parameters
-
| ip | The IP address (in network order) |
| mac | The MAC address associated with the IP |
◆ arp_get()
- Parameters
-
| ip | The IP address (in network order) |
- Returns
- The MAC address, or NULL if the IP isn't inside the table
◆ arp_header_size()
| static size_t arp_header_size |
( |
struct arp_header * |
hdr | ) |
|
|
inlinestatic |
The ARP protocol header size is of variable length, always use this function instead of the usual sizeof(struct arp_header).