1net_if.h(0P)               POSIX Programmer's Manual              net_if.h(0P)
2
3
4

PROLOG

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

NAME

12       net/if.h — sockets local interfaces
13

SYNOPSIS

15       #include <net/if.h>
16

DESCRIPTION

18       The <net/if.h> header shall define the  if_nameindex  structure,  which
19       shall include at least the following members:
20
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
35           void                  if_freenameindex(struct if_nameindex *);
36           char                 *if_indextoname(unsigned, char *);
37           struct if_nameindex  *if_nameindex(void);
38           unsigned              if_nametoindex(const char *);
39
40       The following sections are informative.
41

APPLICATION USAGE

43       None.
44

RATIONALE

46       None.
47

FUTURE DIRECTIONS

49       None.
50

SEE ALSO

52       The  System  Interfaces  volume  of  POSIX.1‐2017,  if_freenameindex(),
53       if_indextoname(), if_nameindex(), if_nametoindex()
54
56       Portions  of  this text are reprinted and reproduced in electronic form
57       from IEEE Std 1003.1-2017, Standard for Information Technology --  Por‐
58       table  Operating System Interface (POSIX), The Open Group Base Specifi‐
59       cations Issue 7, 2018 Edition, Copyright (C) 2018 by the  Institute  of
60       Electrical  and  Electronics Engineers, Inc and The Open Group.  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.opengroup.org/unix/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                  2017                         net_if.h(0P)
Impressum