Looks like a good approach on a firt glance. Some initial notes: - Please use the GNU C coding style, i.e. we write:
foo = 123; if (foo) not: if ( foo = 123 ) - Please use autoconf checks instead of constructs as: #if defined (__linux__) || defined (__FreeBSD__) hints.ai_flags += AI_ADDRCONFIG; #endif This will not work on GNU/Hurd, GNU/kFreeBSD, other BSDs, Solaris, etc, that might have AI_ADDRCONFIG defined. But for testing or discussion purposes this is fine, we can add the check later. - inet6_helper.[ch] is a bit misleading, since the functions don't help with inet6 specifically. Maybe sockaddr_aux.[ch] would be a better name. - If you plan on sending patches for inclusion, please write a ChangeLog entry. See the GNU Coding Standards for details (I don't have the URL at hand). Happy hacking.