[PATCH] new applet gethostbyname

ralda at gmx.de ralda at gmx.de
Fri Jul 6 00:03:11 UTC 2012


Hi Eial !

> for me it does, way to big when one can get the same behavior in a
> fraction of the size.

You are not right. It is not the same behavior!

You can find the IP address of a name with less code, correct, but this
uses the libc implementation of the resolver and does not the same kind
of work a DNS client does. So the decision is first, which kind of work
you need -> In your case: Simple IP address lookup with libc function.

In case you would need a full fledged DNS query (seperate from libc
implementation), Laurent would be right. I don't think you are able to
write a full DNS query with less code.

So please keep in mind: Things tend to look different if viewed from a
more global point, and you need to use the correct language to
describe your problem, otherwise anybody will misunderstand something
and complain or point you in a wrong direction.

Beside this, Busybox has nslookup. What is wrong with that? Only
different output format? In case you complain because the many
information it displays: What about an option for nslookup, lets say -s
(for short) to display only single line of output (if only one address
returned from query)? Just as an unverified idea. What about this?

--
Harald


More information about the busybox mailing list