TCPIP_ARP_Probe Function
C
TCPIP_ARP_RESULT TCPIP_ARP_Probe(
TCPIP_NET_HANDLE hNet,
IPV4_ADDR* IPAddr,
IPV4_ADDR* srcAddr,
TCPIP_ARP_OPERATION_TYPE opType
);
Description
This function transmits and ARP probe to determine the hardware address of a given IP address. The packet will use the type of operation and the source address specified as parameters.
Preconditions
The ARP module should have been initialized.
Parameters
Parameters | Description |
---|---|
hNet | Interface to use. |
IPAddr | The IP address to be resolved. The address must be specified in network byte order (big endian). |
srcAddr | The source address to be used in the ARP packet. |
opType | Operation code to be set in the outgoing ARP packet. |
Returns
ARP_RES_ENTRY_SOLVED - if the required entry is already solved.
ARP_RES_ENTRY_QUEUED - if the required entry was already queued.
ARP_RES_ENTRY_NEW - if the operation succeeded and a new entry was added (and queued for resolving).
ARP_RES_CACHE_FULL - if new entry could not be inserted, the cache was full.
ARP_RES_BAD_ADDRESS - bad address specified.
ARP_RES_NO_INTERFACE - no such interface.
Remarks
This function is a more advanced version of TCPIP_ARP_Resolve. It allows the caller to specify the operation type and the source address of the outgoing ARP packet. It also supports the ARP flags defined in TCPIP_ARP_OPERATION_TYPE.
No check is done for IPAddr to be valid.
To retrieve the ARP query result, call the TCPIP_ARP_IsResolved function.