Hello Rob, > FWIW - have written and tested 2 files for AIX 5.3 which may be useful to > gnulib (libc)
Indeed this getifaddrs/freeifaddrs API is a portability problem. From the gnulib documentation [1][2] you can see that this API is also missing on other platforms: Solaris and Cygwin, in particular. For making an API portable, implementing it only for AIX is not sufficient. Rather, implementing it on all Unix platforms is desirable, so that people can really rely on this API. Would you be willing to look how to implement in on other platforms? If you cannot find the right system calls, invoking /sbin/ifconfig and parsing its output would also be acceptable (slow, but better a slow implementation than none). Maybe an 'strace ifconfig' (or 'truss ifconfig' on Solaris) can give you hints how the native ifconfig program does it. Would you also be willing to give to the FSF the copyright on your ifaddrs replacement, so that gnulib could incorporate it? Thanks for all you can do. Bruno [1] http://www.gnu.org/software/gnulib/manual/html_node/ifaddrs_002eh.html [2] http://www.gnu.org/software/gnulib/manual/html_node/getifaddrs.html