if_nametoindex

if_nametoindex converts the ANSI interface name for a network interface to a local index for the interface.

Syntax

Copy
NET_IFINDEX if_nametoindex(
  [in]    const char* InterfaceName
);

Parameters

[in] InterfaceName

A pointer to a buffer that holds the NULL-terminated ANSI string containing the interface name.

Return Value

If this function succeeds, it returns the local interface index. If this function fails, it returns zero.

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

Winsock2.h RtTcpipApi.lib

See also: