Re: Macnetworkprog Digest, Vol 1, Issue 74
Re: Macnetworkprog Digest, Vol 1, Issue 74
- Subject: Re: Macnetworkprog Digest, Vol 1, Issue 74
- From: Justin Walker <email@hidden>
- Date: Thu, 16 Dec 2004 18:18:11 -0800
On Dec 16, 2004, at 18:03, Ryan M Joseph wrote:
[snip]
On Thursday, December 16, 2004, at 02:26 PM, Mike Cohen wrote:
It's a BSD function defined /usr/include/netdb.h
In the terminal, the doc is available via 'man gethostbyname'.
Here's a short example:
Just a side note (this part of the thread slipped past while I wasn't
watching):
gethostbyname() is going to work in "simple" environments, but you
should really be using "getaddrinfo()" or "gethostinfo()", depending on
your needs. See TN 1145 (Living in a Dynamic TCP/IP Environment) for
some discussion of the issues of having hosts with multiple active
interfaces and multiple IP addresses per interface.
These calls give you more complexity, but either you work out the
details, or your users have to, and the latter is usually not going to
work. "gethostbyname()" can cause problems in the New World Order.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | When LuteFisk is outlawed
| Only outlaws will have
| LuteFisk
*--------------------------------------*-------------------------------*
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden