On Sun, Dec 09, 2001 at 06:36:14PM -0800, Terry Lambert wrote:
> Dima Dorfman wrote:
> > Here's an updated patch which is a result of comments from a few
> > people.  The changes are: (a) deconfuse the usage message by not
> > naming two arguments as "hostname" (that was sloppiness on my part),
> > and (b) remove a redundant inet_aton call (gethostbyname(3) will DTRT
> > with an IP address) [1].
> > 
> > [1] It probably shouldn't, since as others have pointed out to me,
> > "1.1.1.1" is a valid DNS name.  The correct solution would be to have
> > a flag which makes it explicit whether the argument is an IP address
> > or DNS name, but few, if any, other programs in the system do this,
> > and I don't think this is a good place to start.
> 
> This is why the inte_aton() call is still necessary.
[snip]
> Please call inet_aton(), and then _only_ if that fails, call the
> gethostbyname().

How about inet_pton() and getnameinfo()?

G'luck,
Peter

-- 
If I had finished this sentence,

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to