new tool: getaddrinfo frontend #7827
RavuAlHemio
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Hi! I'll start of by saying that the I think the standard |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Greetings,
it might be interesting to provide a new tool: a frontend for the
getaddrinfo
function.There are copious amounts of DNS clients out there --
nslookup
,dig
,drill
andhost
, to name a few -- but mechanisms such as/etc/nsswitch.conf
allow to completely change a system's name resolution behavior, prioritizing other mechanisms over DNS or replacing it outright, to say nothing of caching behavior, and most programs do not perform DNS resolution themselves, relying on functionality provided by the C library instead. This creates a discrepancy between the information provided by the DNS clients and that provided by the C library.As I understand it, the C functions
getaddrinfo
andgetnameinfo
are the most flexible interfaces to the C library's name resolution facility, with older functions such asgethostbyname
andgethostbyaddr
accessing the same data but providing fewer options to influence the lookup. To my knowledge, whilegetaddrinfo
andgetnameinfo
are absolutely great for C programs (as well as programs in other programming languages that have access to the C library), there is currently no executable whose primary purpose is querying this name resolution facility, and I think it might be a good idea to introduce one.The most important purpose of this tool would be troubleshooting, e.g. identifying discrepancies between DNS and whatever data the system resolver is using.
What's the uutils team's opinion on this?
Beta Was this translation helpful? Give feedback.
All reactions