tfNgUnConfigInterface

Jump to: navigation, search

Table of Contents >> IPv6 Programmer's Reference


#include <trsocket.h>


int tfNgUnConfigInterface (
ttUserInterface interfaceHandle,
int addrFamily,
unsigned int multiHomeIndex
);


Function Description

Next Generation API replaces tfUnConfigInterface(). When addrFamily is set to AF_INET4, this API may be used to un-configure an IPv4 address manually configured on the interface by the user. When addrFamily is set to AF_INET6, this API may be used to un-configure an auto-configured IPv6 address, as well as IPv6 addresses manually configured on the interface by the user. See the description of tfNgGetIpAddress() for information on what values of mHomeIndex correspond to auto-configured IPv6 addresses. When the Treck stack is running in dual IP layer mode, if there is an IPv4-compatible IPv6 address configured in the list of multi-homed IPv6 addresses on the interface at the specified mHomeIndex, and the corresponding embedded IPv4 address is configured at the same mHomeIndex in the list of multi-homed IPv4 addresses on the interface, then both the IPv4-compatible IPv6 address and the embedded IPv4 address are removed from the interface.


Parameters

  • interfaceHandle
    The device entry as returned by tfAddInterface().
  • addrFamily
    A pointer to the sockaddr_storage structure containing the IPv4 or IPv6 address to be configured.
  • mHomeIndex
    The index for this IP address for multihoming. Zero must be the first multihome index used.


Returns

  • TM_EAFNOSUPPORT
    addrFamily was not set to either AF_INET or AF_INET6.
  • TM_EPERM
    mHomeIndex indicates a DHCPv6 multihome, but DHCPv6 has not been started
  • TM_EINPROGRESS
    (only when TM_DHCP_CB_RELEASE is defined) You are unconfiguring a DHCP autoconfigured address and the operation was delayed until Treck can send a DHCP Release message to inform the DHCP server that you are no longer using the address. You will receive notification by way of a TM_ENETDOWN error passed to your DHCP callback function (see tfUseDhcp()) when the send is complete (successful or not).


Table of Contents >> IPv6 Programmer's Reference