|const ttUser8Bit * eui64IdPtr,|
This function only supports IPv6. This function sets or resets the IPv6 interface ID to the specified interface ID in EUI-64 format (i.e. 64-bit IEEE global identifier). Note that this function inverts the "u" (universal/local) bit of the EUI-64 identifier to convert it into an interface ID. If your EUI-64 identifier has local significance only (i.e. it is not globally unique), then to indicate this you must set bit 6 to "1" where bit 0 is the most significant bit. A universally administered (i.e. globally unique) EUI-64 identifier is indicated by setting bit 6 to "0". ([RFC 2464], [RFC 2373])
This function may only be called on an interface that is closed or that has IPv6 disabled. When the Treck stack is running in dual IP layer mode, "IPv6 disabled" means that the interface is opened for IPv4,and therefore the link-layer and device driver are open (i.e. IPv4 and IPv6 share the same link-layer and device driver on the interface). However, there is no link-local IPv6 address configured on the interface so the IPv6 part of the interface cannot be used by the application. Typically, this is the case when you have not yet opened the interface for IPv6 by calling tfNgOpenInterface() specifying an IPv6 address to configure.
When the Treck stack is running in IPv6-only mode, "IPv6 disabled" means that you opened the interface for IPv6, however either the link-local address generated by IPv6 stateless address auto-configuration was detected to be in use by a different node (i.e. Duplicate Address Detection failed), or you intentionally un-configured the link-local address by calling tfNgUnConfigInterface(). In any case, there is no link-local IPv6 address configured on the interface, so the IPv6 part of the interface cannot be used by the application. When the interface has IPv6 disabled, recovery usually entails either setting a different interface ID by calling tf6Eui64SetInterfaceId() and then attempting to restart the IPv6 part of the interface by calling tfNgOpenInterface() specifying an IPv6 address of all 0's (i.e. the IPv6 unspecified address), or by manually configuring a link-local IPv6 address on the interface. However, it is possible that you get this failure because your network controller hardware does not support filtering of its own multicasts but instead does loopback of its own multicasts, which would cause Duplicate Address Detection to always fail. If this is the case, then you must specify the IPv6-specific device flag TM_6_DEV_MCAST_HW_LOOPBACK when you open the interface. ([RFC 2373])
The IPv6 interface ID is used to generate a tentatively unique IPv6 addresses to assign to the interface during stateless address auto-configuration, which occurs when the interface is opened. Part of stateless address auto-configuration is Duplicate Address Detection, which is done to ensure that the auto-configured IPv6 addresses are unique. Note that if an interface ID of 0 is set, stateless address auto-configuration of global scope and site-local scope IPv6 addresses will not be performed when the interface is opened, because otherwise the auto-configured IPv6 addresses would conflict with the Subnet-Router anycast addresses for the same prefixes. In this case, the only auto-configured IPv6 address assigned to the interface by stateless address auto-configuration could be the link-local scope IPv6 address. In other words, 0 is a bad choice for the interface ID. ([RFC 2373])
If you are using the null link-layer and you want to use IPv6 on the interface, then you should call tf6Eui64SetInterfaceId(), typically done in your device driver open function in which case calledFromFlag is set to TM_6_DEV_CALLED_FROM_DRIVER. Otherwise, if the interface ID is not set before the interface is opened, then IPv6 stateless address auto-configuration will not be performed, which may result in the IPv6 interface not being opened depending on what IPv6 addresses have been manually configured on the interface (i.e. at least one link-local IPv6 address is required). ([RFC 2373])
If your interface link-layer type is Ethernet, then you should not call this function, since the interface ID will be automatically derived from the IEEE 48-bit MAC address you provide via your driverGetPhysicalAddress() function (refer to the drvGetPhysAddrFuncPtr parameter of the function tfAddInterface()).
- Interface handle of an interface for which we want to set the interface ID
- Pointer to the 8-byte interface ID in EUI-64 format (i.e. 64-bit IEEE global identifier).
- Specifies whether this function is being called from the device driver, typically from the device driver open function. It is very important to set this correctly. If you are calling this function from the device driver, set calledFromFlag to TM_6_DEV_CALLED_FROM_DRIVER, otherwise set it to TM_6_DEV_CALLED_FROM_APP.
- One of the parameters was invalid.
- The interface specified by interfaceHandle was open for IPv6, and the IPv6 part was not disabled. This function may only be called on an interface that is closed or that has IPv6 disabled.