ipv6lsb

How to get local IPv6 addresses (LSB compliance)


ioctl does not work with IPv6.

getifaddres - unsupported by LSB

netlink sockets - unsupported by LSB

Any ideas?


Solution

  • 1) It may be after LSB version 4.1:

    https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=2143

    2) Parsing the /proc/net tree.

    3) Use the POSIX.1-2001 API getaddrinfo but support is rather limited compared with Win32 which explicitly details the operation to enumerate interfaces.