Re: NSHost not finding additional addresses
Re: NSHost not finding additional addresses
- Subject: Re: NSHost not finding additional addresses
- From: Wade Tregaskis <email@hidden>
- Date: Thu, 9 Oct 2003 08:36:58 +1000
It sounds like you are reading more into NSHost than is actually there.
Just the documentation.
As I understand it, NSHost is a representation of a host by IP address
or name. It is not guaranteed to be unique (the only representation
of that host), or comprehensive (all possible representations of that
host).
It's not guaranteed to be, but it should still make a decent effort.
The NSHost documentation says it uses all local resources to lookup
hosts, and return all their addresses and names. It stops short of
doing a proper DNS lookup, I believe, but in the localhost case it does
have the local knowledge that my static IP is me. Thus, it should
associate the two together.
In my own experience, NSHost fails to resolve CNames for RFC-2317
reverse delegation so [[NSHost hostWithAddress:xxx] name]
is not functionally equivalent to UNIX gethostbyaddress.
That most likely requires a DNS lookup or similar, which NSHost won't
do. It'd be handy if NSHost had a method to do this, however, so you
could manually look up names and addresses.
Wade Tregaskis
-- Sed quis custodiet ipsos custodes?
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.