if_nameindex with 2.2 kernel
Roland McGrath
roland@frob.com
Wed Jul 24 12:21:00 GMT 2002
What is the reason for preferring AF_UNIX over AF_INET at all? An AF_UNIX
socket can do SIOCGIFCONF but none of the other SIOCGIF* calls that are
needed for e.g. getifaddrs or the existing _res_hconf_reorder_addrs
(SIOCGIFNETMASK)--you must use an AF_INET socket for those to work. So in
my tree I have made it try AF_INET first unconditionally, so my getifaddrs
implementation can work (and I noticed along the way that the reorder
option in /etc/host.conf can't possibly be working without that change).
More information about the Libc-hacker
mailing list