diff options
Diffstat (limited to '')
-rw-r--r-- | man3/getifaddrs.3 | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/man3/getifaddrs.3 b/man3/getifaddrs.3 index 3f82c93..e8c2bde 100644 --- a/man3/getifaddrs.3 +++ b/man3/getifaddrs.3 @@ -14,7 +14,7 @@ .\" for glibc specificities, provide an example. .\" 2009-01-14 mtk, many edits and changes, rewrote example program. .\" -.TH getifaddrs 3 2023-07-20 "Linux man-pages 6.05.01" +.TH getifaddrs 3 2023-10-31 "Linux man-pages 6.7" .SH NAME getifaddrs, freeifaddrs \- get interface addresses .SH LIBRARY @@ -24,7 +24,7 @@ Standard C library .nf .B #include <sys/types.h> .B #include <ifaddrs.h> -.PP +.P .BI "int getifaddrs(struct ifaddrs **" "ifap" ); .BI "void freeifaddrs(struct ifaddrs *" "ifa" ); .fi @@ -38,7 +38,7 @@ and stores the address of the first item of the list in The list consists of .I ifaddrs structures, defined as follows: -.PP +.P .in +4n .EX struct ifaddrs { @@ -59,19 +59,19 @@ struct ifaddrs { }; .EE .in -.PP +.P The .I ifa_next field contains a pointer to the next structure on the list, or NULL if this is the last item of the list. -.PP +.P The .I ifa_name points to the null-terminated interface name. .\" The constant .\" .B IF NAMESIZE .\" indicates the maximum length of this field. -.PP +.P The .I ifa_flags field contains the interface flags, as returned by the @@ -80,7 +80,7 @@ field contains the interface flags, as returned by the operation (see .BR netdevice (7) for a list of these flags). -.PP +.P The .I ifa_addr field points to a structure containing the interface address. @@ -89,14 +89,14 @@ field points to a structure containing the interface address. subfield should be consulted to determine the format of the address structure.) This field may contain a null pointer. -.PP +.P The .I ifa_netmask field points to a structure containing the netmask associated with .IR ifa_addr , if applicable for the address family. This field may contain a null pointer. -.PP +.P Depending on whether the bit .B IFF_BROADCAST or @@ -111,12 +111,12 @@ will contain the broadcast address associated with (if applicable for the address family) or .I ifa_dstaddr will contain the destination address of the point-to-point interface. -.PP +.P The .I ifa_data field points to a buffer containing address-family-specific data; this field may be NULL if there is no such data for this interface. -.PP +.P The data returned by .BR getifaddrs () is dynamically allocated and should be freed using @@ -157,7 +157,6 @@ T{ .BR freeifaddrs () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS None. .SH HISTORY @@ -179,7 +178,7 @@ differs on various systems. .\" appears to be confused and obsolete on this point. .\" i.e., commonly it still says one of them will be NULL, even if .\" the ifa_ifu union is already present -.PP +.P .BR getifaddrs () first appeared in glibc 2.3, but before glibc 2.3.3, the implementation supported only IPv4 addresses; @@ -210,7 +209,7 @@ The program below demonstrates the use of and .BR getnameinfo (3). Here is what we see when running this program on one system: -.PP +.P .in +4n .EX $ \fB./a.out\fP |