logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

socket_getifidx - get interface number

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.

Name

       socket_getifidx - get interface number

See Also

socket_getifname(3), socket_connect6(3)

                                                                                              socket_getifidx(3)

Syntax

#include<libowfat/socket.h>

       int socket_getifidx(const char* ifname);

See Also