Jump to: navigation, search

Table of Contents >> IPv6 Programmer's Reference

#include <trsocket.h>

int tfCheckOpenInterface (
ttUserInterface interfaceHandle,
int protocolFamily

Function Description

This function supports both IPv4 and IPv6. Check the status of either IPv4 or IPv6 protocol operation on the specified interface.


  • interfaceHandle
    Interface handle of the interface to check the status for.
  • protocolFamily
    The protocol family (i.e. IPv4 or IPv6) to check the status for. Specify PF_INET for IPv4, PF_INET6 for IPv6.


  • 0
    Interface is open/up for the specified protocol family (i.e. IPv4 or IPv6).
    The interface is still being opened for the specified protocol family. If the interface is being opened for use with IPv6, then this error code is returned while Duplicate Address Detection is being performed for the link-local scope IPv6 address.
    Interface is closed for the specified protocol family.
    Interface is disabled for the specified protocol family. When protocolFamily is PF_INET6, this indicates that there is no link-local scope IPv6 address configured on the interface, however the interface is not closed, instead the IPv6 part of the interface is disabled and the application cannot use IPv6 on this interface. This could occur if the link-local IPv6 address generated by IPv6 stateless address auto-configuration was determined to already be in use by a different node (i.e. Duplicate Address Detection failed), in which case recovery usually entails either setting a different interface ID, or manually configuring a link-local IPv6 address on the interface, 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).
    Bad parameter value. Either you specified an invalid interface handle, or the protocol family was not PF_INET or PF_INET6, or the protocol family did not match the mode in which you are running the stack (for example, if you run the stack in IPv4-only mode and specify a protocolFamily of PF_INET6, you will get this error).

Table of Contents >> IPv6 Programmer's Reference