1<net/if.h>(0P) POSIX Programmer's Manual <net/if.h>(0P)
2
3
4
6 net/if.h - sockets local interfaces
7
9 #include <net/if.h>
10
12 The <net/if.h> header shall define the if_nameindex structure that
13 includes at least the following members:
14
15
16 unsigned if_index Numeric index of the interface.
17 char *if_name Null-terminated name of the interface.
18
19 The <net/if.h> header shall define the following macro for the length
20 of a buffer containing an interface name (including the terminating
21 NULL character):
22
23 IF_NAMESIZE
24 Interface name length.
25
26
27 The following shall be declared as functions and may also be defined as
28 macros. Function prototypes shall be provided.
29
30
31 unsigned if_nametoindex(const char *);
32 char *if_indextoname(unsigned, char *);
33 struct if_nameindex *if_nameindex(void);
34 void if_freenameindex(struct if_nameindex *);
35
36 The following sections are informative.
37
39 None.
40
42 None.
43
45 None.
46
48 The System Interfaces volume of IEEE Std 1003.1-2001, if_freenameinā
49 dex(), if_indextoname(), if_nameindex(), if_nametoindex()
50
52 Portions of this text are reprinted and reproduced in electronic form
53 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
54 -- Portable Operating System Interface (POSIX), The Open Group Base
55 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
56 Electrical and Electronics Engineers, Inc and The Open Group. In the
57 event of any discrepancy between this version and the original IEEE and
58 The Open Group Standard, the original IEEE and The Open Group Standard
59 is the referee document. The original Standard can be obtained online
60 at http://www.opengroup.org/unix/online.html .
61
62
63
64IEEE/The Open Group 2003 <net/if.h>(0P)