It translates IP addresses to physical MAC addresses, or locates a gateway through which a machine may be located. TCP applications will not need to access ARP directly. The TCPOpen function will handle both ARP and DNS operations transparently. UDP applications however will likely need to use ARP. Responses to incoming ARP requests are processed automatically. Resolution of ARP requests follows a simple state machine, as indicated in the following diagram.
Files | |
file | ARP.c |
Address Resolution Protocol (ARP) Client and Server Module for Microchip TCP/IP Stack. | |
file | ARP.h |
ARP Module Defs for Microchip TCP/IP Stack. | |
Functions | |
void | ARPResolve (IP_ADDR *IPAddr) |
Transmits an ARP request to resolve an IP address. | |
BOOL | ARPIsResolved (IP_ADDR *IPAddr, MAC_ADDR *MACAddr) |
Determines if an ARP request has been resolved yet. | |
void | ARPFlush (void) |
Flushes the ARP cache. |
BOOL ARPIsResolved | ( | IP_ADDR * | IPAddr, | |
MAC_ADDR * | MACAddr | |||
) |
Determines if an ARP request has been resolved yet.
This function checks if an ARP request has been resolved yet, and if so, stores the resolved MAC address in the pointer provided.
IPAddr | - The IP address to be resolved | |
MACAddr | - A buffer to store the corresponding MAC address |
TRUE | The IP address has been resolved and MAC address indicates the response. | |
FALSE | The IP address is not resolved. |
void ARPResolve | ( | IP_ADDR * | IPAddr | ) |
Transmits an ARP request to resolve an IP address.
This function transmits and ARP request to determine the hardware address of a given IP address.
IPAddr | - The IP address to be resolved |