This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: if_nameindex with 2.2 kernel


On Wed, 2002-07-24 at 12:21, Roland McGrath wrote:
> What is the reason for preferring AF_UNIX over AF_INET at all?

AF_UNIX is always available.  While using AF_INET might cause a module
to be loaded.  Unlikely but there were cases.  Some people really have
machines with only other network protocols.

> 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.

You are taling about a normal setup as we know it.  But there are really
other people with strange environments.

> 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).

Why the latter?  And maybe the __opensock interface needs to be revised.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

Attachment: signature.asc
Description: This is a digitally signed message part


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]