Subject: Re: Multiple IP addresses for a single host in "/etc/hosts"
To: None <tech-net@netbsd.org>
From: Matthias Scheler <tron@lyssa.owl.de>
List: tech-net
Date: 05/30/1999 23:38:13
In article <Pine.NEB.4.10.9905301931340.24827-100000@server.duh.org>,
	Todd Vierling <tv@pobox.com> writes:
>: if a host has multiple entries in "/etc/hosts" right now gethostbyname()
>: returns only the first IP address. I think about enhancing _gethtbyname2()
>: to build a "struct hostent *" with all IP addresses. To maintain backward
>: compatibility the IP addresses will be in exact the same order as in
>: "/etc/hosts". Opinions?
> 
> `struct hostent' already allows for an address *list*.  Why the need for
> another call?

I don't want to invent another call. I want to enhance the existing
implementation of _gethtbyname2(). Actually it calls _gethostent()
which parse a single line until it finds a match.

-- 
Matthias Scheler                                http://home.owl.de/~tron/