bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-inetutils] A command to query the libc resolver


From: Tanguy Ortolo
Subject: [bug-inetutils] A command to query the libc resolver
Date: Tue, 17 Aug 2010 16:09:02 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello,

I sometimes needed a tool to query the libc network host name resolver,
to know to which host a random program would attempt to connect to if I
give it some host name.

Let me explain. Network client softwares usually do not do name
resolutions by themselves, but rather call libc functions such as
gethostbyname(3) or getaddrinfo(3). The libc, on its side, will use the
nsswitch.conf(5) configuration file to know the resolutions methods to
use, such as static files, mDNS, DNS or LDAP.

To know the result of that resolution, a software such as host(1) is not
appropriate, as it would only do DNS resolution. So, as I found no
software implementing a command-line interface to query the system
resolver, I coded the attached tool. I called it resolv, that may or may
not be a good name.

It is currently quite rough: no localization, no options, and so on. But
I think it just works. Do you think such a tool would be worth being
integrated to some software suite, such as inetutils?

Regards,

-- 
Tanguy Ortolo

Attachment: resolv.tar.xz
Description: Binary data

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]