1socket_getifidx(3) Library Functions Manual socket_getifidx(3)
2
3
4
6 socket_getifidx - get interface number
7
9 #include <socket.h>
10
11 int socket_getifidx(const char* ifname);
12
14 socket_getifidx returns the interface number for a symbolic network
15 interface name (like "eth0" on Linux, for example).
16
17 The interface number can be used as scope_id for IPv6 communications on
18 link-local addresses.
19
20 If something goes wrong, socket_getifidx returns -1, setting errno
21 appropriately.
22
23
25 socket_getifname(3), socket_connect6(3)
26
27
28
29 socket_getifidx(3)