Subject: Re: sethostent(1): is it really that useful with a DNS?
To: Chuck Cranor <chuck@research.att.com>
From: Andrew Brown <atatat@atatdot.net>
List: tech-userlevel
Date: 06/11/2001 11:49:23
>what is this sethostent(1) really buying us?    the man page says:
>
>     The sethostent() function may be used to request the use of a connected
>     TCP socket for queries.  If the stayopen flag is non-zero, this sets the
>     option to send all queries to the name server using TCP and to retain the
>     connection after each call to gethostbyname(), gethostbyname2() or
>     gethostbyaddr().  Otherwise, queries are performed using UDP datagrams.

i imagine you get slightly more robust performance from the dns via
tcp than via udp.  combine that with the fact that netstat (when not
using -n) will be doing a lot of lookups, and it probably *is* useful,
even if slightly strange looking to the uninitiated.

on the other hand, if netstat was using udp...might it not be
continually looking up the names of the addresses of the udp sockets
it was continually opening up to look up the names of the addresses of
the udp socket that it just used to look up the last names...

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."