1net_if.h(0P) POSIX Programmer's Manual net_if.h(0P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
11
13 net/if.h — sockets local interfaces
14
16 #include <net/if.h>
17
19 The <net/if.h> header shall define the if_nameindex structure, which
20 shall include at least the following members:
21
22 unsigned if_index Numeric index of the interface.
23 char *if_name Null-terminated name of the interface.
24
25 The <net/if.h> header shall define the following symbolic constant for
26 the length of a buffer containing an interface name (including the ter‐
27 minating NULL character):
28
29 IF_NAMESIZE Interface name length.
30
31 The following shall be declared as functions and may also be defined as
32 macros. Function prototypes shall be provided.
33
34 void if_freenameindex(struct if_nameindex *);
35 char *if_indextoname(unsigned, char *);
36 struct if_nameindex *if_nameindex(void);
37 unsigned if_nametoindex(const char *);
38
39 The following sections are informative.
40
42 None.
43
45 None.
46
48 None.
49
51 The System Interfaces volume of POSIX.1‐2008, if_freenameindex(),
52 if_indextoname(), if_nameindex(), if_nametoindex()
53
55 Portions of this text are reprinted and reproduced in electronic form
56 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
57 -- Portable Operating System Interface (POSIX), The Open Group Base
58 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
59 cal and Electronics Engineers, Inc and The Open Group. (This is
60 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
61 event of any discrepancy between this version and the original IEEE and
62 The Open Group Standard, the original IEEE and The Open Group Standard
63 is the referee document. The original Standard can be obtained online
64 at http://www.unix.org/online.html .
65
66 Any typographical or formatting errors that appear in this page are
67 most likely to have been introduced during the conversion of the source
68 files to man page format. To report such errors, see https://www.ker‐
69 nel.org/doc/man-pages/reporting_bugs.html .
70
71
72
73IEEE/The Open Group 2013 net_if.h(0P)