--- James Cameron <quozl at us.netrek.org> wrote: > > Not really. Both are standard calls, and they differ. > The first is for > obtaining the IP address of a host given a name, and the > second is for > obtaining the host name of the host executing the > program. > > Some programs need to have the host name that they will > be perceived as > by their peers when communicating over TCP/IP. For > these, they may use > getsockname() to find the IP address through which the > connection leaves > the machine, and then gethostbyaddr() to find the host > name corresponding > to this IP. This sometimes doesn't work, because > gethostbyaddr() may use > /etc/hosts to find the name, and the peer doesn't have > our /etc/hosts. Ah. I see. Thanks for the clarification! Zach __________________________________ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html _______________________________________________ vanilla-devel mailing list vanilla-devel at us.netrek.org https://mailman.real-time.com/mailman/listinfo/vanilla-devel