diff options
Diffstat (limited to 'man3/if_nameindex.3')
-rw-r--r-- | man3/if_nameindex.3 | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/man3/if_nameindex.3 b/man3/if_nameindex.3 index 39b72a0..7f4c42e 100644 --- a/man3/if_nameindex.3 +++ b/man3/if_nameindex.3 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH if_nameindex 3 2023-07-20 "Linux man-pages 6.05.01" +.TH if_nameindex 3 2023-10-31 "Linux man-pages 6.7" .SH NAME if_nameindex, if_freenameindex \- get network interface names and indexes .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <net/if.h> -.PP +.P .BI "struct if_nameindex *if_nameindex(" void ); .BI "void if_freenameindex(struct if_nameindex *" "ptr" ); .fi @@ -27,14 +27,14 @@ about one of the network interfaces on the local system. The .I if_nameindex structure contains at least the following entries: -.PP +.P .in +4n .EX unsigned int if_index; /* Index of interface (1, 2, ...) */ char *if_name; /* Null\-terminated name ("eth0", etc.) */ .EE .in -.PP +.P The .I if_index field contains the interface index. @@ -46,7 +46,7 @@ The end of the array is indicated by entry with set to zero and .I if_name set to NULL. -.PP +.P The data structure returned by .BR if_nameindex () is dynamically allocated and should be freed using @@ -67,7 +67,7 @@ if: .TP .B ENOBUFS Insufficient resources available. -.PP +.P .BR if_nameindex () may also fail for any of the errors specified for .BR socket (2), @@ -93,14 +93,13 @@ T{ .BR if_freenameindex () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS POSIX.1-2008, RFC\ 3493. .SH HISTORY glibc 2.1. POSIX.1-2001. BSDi. -.PP +.P Before glibc 2.3.4, the implementation supported only interfaces with IPv4 addresses. Support of interfaces that don't have IPv4 addresses is available only @@ -109,7 +108,7 @@ on kernels that support netlink. The program below demonstrates the use of the functions described on this page. An example of the output this program might produce is the following: -.PP +.P .in +4n .EX $ \fB./a.out\fI |