[PATCH] new applet gethostbyname

ralda at gmx.de ralda at gmx.de
Wed Jul 4 06:21:58 UTC 2012


Hi Eial !

> in that case I think that keeping it the host format is the right
> thing to do.

It does not depend on the output format, it depends on how you query
the IP address. The host command only queries the remote DNS server and
does NOT use local libc functions for name query. That is you directly
send network packets to DNS server and parse server responses. On the
other side this functionality is provided by the glibc library
(resolver) hidden behind functions like gethostbyname or getaddrinfo,
so you do not need manual DNS server query ... and then (if you use
such functions) you shall model your output/applet after the 'getent
hosts' command.

--
Harald 


More information about the busybox mailing list