File: socket_getifidx.3

package info (click to toggle)
libowfat 0.22-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,148 kB
  • ctags: 976
  • sloc: ansic: 10,424; makefile: 42
file content (19 lines) | stat: -rw-r--r-- 529 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
.TH socket_getifidx 3
.SH NAME
socket_getifidx \- get interface number
.SH SYNTAX
.B #include <socket.h>

int \fBsocket_getifidx\fP(const char* \fIifname\fR);
.SH 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.

.SH "SEE ALSO"
socket_getifname(3), socket_connect6(3)