]> rtime.felk.cvut.cz Git - orte.git/commit
Use portable and type-safe way to obtain network interface addresses where available
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Sat, 14 Sep 2013 17:16:12 +0000 (19:16 +0200)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Sat, 14 Sep 2013 17:16:12 +0000 (19:16 +0200)
commit9dcbee7e43b02d28786f2bb01b0c2dfbf240e555
treeed2e38273cfd1cd77bce475e7a87beca59d6a170
parent168fd05086ade8d3f1c4902b950d38d69e3feed6
Use portable and type-safe way to obtain network interface addresses where available

Use of SIOCGIFCONF is quite error prone. It fills fixed sized
elements array on Linux filled only by IPv4 (AF_INET).
On the other hand on BSD it returns all addresses including
hardware ones and IPv6. It requires variable size for
entries where address does not fit into struct sockaddr.
But switching rules seems to differ even between BSD flavors.

On the other hand getifaddrs() and struct ifaddrs
are defined with potability and extendability in mind.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
configure.ac
orte/include/orte/orte_config_omk_linux.h
orte/liborte/sock.c