tfConfigAutoIp
Table of Contents >> Optional Protocols >> AutoIP Configuration
#include <trsocket.h> |
int tfConfigAutoIp | ( |
ttUserInterface interfaceHandle, | |
int mhomeIndex | |
); |
Function Description
This function is provided as an example.
This function picks an AUTO IP v4 address, and calls tfUseCollisionDetection() passing the selected IP address, a call back function (namely tfAutoIpFinish()[1]), with a call back function parameter, specifying the selected mhome index. If tfUseCollisionDetection() is successful, that information will be stored in the Treck stack. Next, it calls tfUserStartArpSend() using the default values for the number of ARP probes (4), and ARP probe time interval (2 seconds), so that the Treck stack can start sending ARP probes, to check for collisions on the IP address.
Parameters
- interfaceHandle
- The interface on which to send the ARP probe(s)/request(s).
- mhomeIndex
- The multihome index of the IP address to be configured on the interface.
Returns
- TM_ENOERROR
- Success.
- TM_ENOENT
- Could not pick a valid IP v4 IP address.
- TM_EALREADY
- tfUseCollisionDetection() has already been called for that IP address.
- TM_ENOBUFS
- Not enough memory to allocate a collision detection entry or a timer.
- TM_EPERM
- Interface is not a LAN interface, i.e. ARP not permitted on that interface.
- TM_ENXIO
- Interface has not been opened.
Notes
- ↑ Please see examples/txautoip.c for the an example implementation of this callback function.
Table of Contents >> Optional Protocols >> AutoIP Configuration