socket_getifidx

Langue: en

Version: 151414 (fedora - 05/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

socket_getifidx - get interface number

SYNTAX

#include <socket.h>

int socket_getifidx(const char* ifname);

DESCRIPTION

socket_getifidx returns the interface number for a symbolic network interface name (like "eth0" on Linux, for example).

The interface number can be used as scope_id for IPv6 communications on link-local addresses.

If something goes wrong, socket_getifidx returns -1, setting errno appropriately.

SEE ALSO

socket_getifname(3), socket_connect6(3)