new tool: getaddrinfo frontend #7827
RavuAlHemio
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
|
Hi! I'll start of by saying that the I think the standard |
Beta Was this translation helpful? Give feedback.
3 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
getaddrinfofunction.There are copious amounts of DNS clients out there --
nslookup,dig,drillandhost, to name a few -- but mechanisms such as/etc/nsswitch.confallow 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
getaddrinfoandgetnameinfoare the most flexible interfaces to the C library's name resolution facility, with older functions such asgethostbynameandgethostbyaddraccessing the same data but providing fewer options to influence the lookup. To my knowledge, whilegetaddrinfoandgetnameinfoare 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