This function starts sending one or more ARP probes or ARP requests on a given interface.
If the interface is not configured yet with that IP address on any multi-home, then this command instructs the Treck stack to send one or more ARP probes. An ARP probe is an ARP request with the sender net address set to zero.
If the interface has been configured with that IP address on one of its multi-home, then this command instructs the Treck stack to send one or more ARP requests with the configured IP address as the source address.
The user will pass the interface handle, the IP address to check for collision, a maximum number of ARP probes/requests, the interval of time between ARP probes/requests, and a timeout parameter. We send an ARP probe/request on the interface(s) specified by the interface handle, create a timer, and return. If 'numberArpProbes' is bigger than one, then the Treck stack, in the context of the timer task, will send (numberArpProbes - 1) additional ARP probes/requests every time the 'arpProbeInterval' expires.
If a "matching" ARP reply/request/probe is received before all ARP probes have been sent, the Treck stack will stop sending any more ARP probes, cancel the timer, and call the user call back function with a TM_EADDRINUSE error code. If a "matching" ARP reply/request is received before all ARP requests have been sent, the Treck stack will stop sending any more ARP probes, cancel the timer, and call the user call back function with a TM_EADDRINUSE error code.
When the timeout parameter expires, the Treck stack will stop sending any more ARP probe(s) request(s), cancel the timer, and will call the user call back function passed by the user in tfUseCollisionDetection(), with a TM_ENOERROR error code.
tfUserStartArpSend() can be called before the interface has been configured with that IP address. In that case, the user has to have at least opened the interface with another IP address first, or with a zero IP address and the TM_DEV_IP_USER_BOOT flag. If the TM_DEV_IP_USER_BOOT flag has been used to open the interface, then the user need to use tfFinishOpenInterface() to finish the configuration with the selected IP address, when it is determined that no other host uses that IP address.
tfUserStartArpSend() can be called, after the interface has been configured with the IP address parameter. In that case ARP requests are being sent, instead of ARP probes.
|Warning:||tfUseCollisionDetection() must to be called before tfUserStartArpSend() is called.|
- Interface on which to send the ARP probe(s)/request(s).
- Target IP address of the ARP probe(s)/request(s). Sender IP address of the ARP request(s).
- Maximum number of ARP probes/requests to send. Interval between ARP requests is 'arpProbeInterval' in milliseconds. If set to zero, TM_MAX_PROBE (4) is used instead.
- Interval in milliseconds between ARP probes/requests. If set to zero, the default TM_PROBE_INTERVAL (2000 milliseconds) is used for the probe interval.
- Number of milliseconds to wait after sending the first ARP probe/request, and call the user call back function set by the user with tfUseCollisionDetection(). If set to zero, it will be set to the default value of 'numberArpProbes' * 'arpProbeInterval'.
- One of the following:
- 'interfaceHandle' is invalid or NULL.
- 'timeout' is less than 'arpProbeInterval' * 'numberArpProbes'.
- The user is not checking the IP address for collision detection, i.e. the user has not called tfUseCollisionDetection() before calling tfUserStartArpSend().
- tfUserStartArpSend() has already been called for that IP address and it has either not timed out yet or was called using a different interface.
- No memory to allocate a timer.
- Interface is not a LAN interface, i.e. ARP not permitted on that interface.
- Interface has not been opened.