[PATCH] new applet gethostbyname

Joshua Judson Rosen jrosen at harvestai.com
Tue Jul 3 14:39:48 UTC 2012


On 2012-07-03 05:11, Baruch Siach wrote:
> Hi Eial,
>
> On Tue, Jul 03, 2012 at 10:57:50AM +0300, Eial Czerwacki wrote:
>> I'd like to propose a new applet, gethostbyname.
>> all this applet does is to get a host name and return the first ip address.
>
> IMHO, this applet should be called 'host', just like the similarly named BIND
> utility.

No, they're different things: BIND's `host' utility specifically queries 
DNS--and only DNS:
it doesn't resolve names via /etc/hosts, NIS, mDNS, etc.

gethostbyname() uses whatever resolver backends are available in libc (i.e.: 
nsswitch).

So it might be a good idea for Eial to model this new applet on glibc's "getent" 
command
(both in name and behaviour).

-- 
"Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))."


More information about the busybox mailing list