Re: NSHost not finding additional addresses
Re: NSHost not finding additional addresses
- Subject: Re: NSHost not finding additional addresses
- From: "Peter Sichel" <email@hidden>
- Date: Wed, 8 Oct 2003 10:54:10 -0400
It sounds like you are reading more into NSHost than is actually there.
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).
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.
>
This is giving me quite a headache, since I need to match connections
>
to avoid creating duplicate connections. Is there anything I should be
>
doing to make the host's realise there are alternative addresses for
>
themselves? Even if I delay the comparison [by up to 15 seconds],
>
allowing for any sort of lookup or whatever, nothing changes.
>
>
If this in indeed a bug, does anyone have a workaround? Presumably
>
there's some way to get all the addresses (and optionally names) of a
>
machine [local or remote] without resorting to a lookup?
Not that I know of. At some level the network stack knows all of
its IP addresses. You can get these using the System Configuration
Framework or various other APIs or utilities on the local machine.
For the remote case, you would need some kind of agent like SNMP
to retrieve this information.
The public domain names may not be known or defined by the host
itself, so I don't see how you can avoid a lookup in the most
general case. If you are just interested in Rendezvous enabled
hosts, that's different.
- Peter
_______________________________________________
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.