in reply to Re: Getting list of network interfaces
in thread Getting list of network interfaces
This function first appeared in BSDi and is present on the BSD systems, but with slightly different semantics documented— returning one entry per interface, not per address. This means ifa_addr and other fields can actually be NULL if the interface has no address, and no link-level address is returned if the interface has an IP address assigned. Also, the way of choosing either ifa_broadaddr or ifa_dstaddr differs on various systems.getifaddrs() first appeared in glibc 2.3, but before glibc 2.3.3, the implementation supported only IPv4 addresses; IPv6 support was added in glibc 2.3.3. Support of address families other than IPv4 is available only on kernels that support netlink.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Getting list of network interfaces
by Marshall (Canon) on Apr 03, 2026 at 12:48 UTC |