Re: What is the point of a host-reachability test that doesn't test the reachability of the host?
Re: What is the point of a host-reachability test that doesn't test the reachability of the host?
- Subject: Re: What is the point of a host-reachability test that doesn't test the reachability of the host?
- From: John Joyce <email@hidden>
- Date: Wed, 1 Jun 2011 19:57:10 -0500
On Jun 1, 2011, at 7:52 PM, Conrad Shultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 6/1/11 5:34 PM, G S wrote:
>> But since this test doesn't actually check the routes to these
>> hosts, how would it be able to provide meaningful results even in
>> these cases?
>
> Note: I am _not_ an SCNetworkReachability guru, so take this all with a
> grain of salt.
>
> How do you know that the routes aren't tested? Quoting from your first
> message:
>
> "A remote host is considered reachable when a data packet, sent by an
> application into the network stack, can leave the local device."
>
> If the kernel cannot route the packet, this would be interpreted by any
> sane implementation as "cannot leave the local device."
>
> A kernel routing table lookup would cover VPN availability issues, LANs
> with no gateway (or otherwise defined default route), etc.
>
>> I figured the specific-host test pinged the host.
>
> I can't imagine it would. Ping would lead to many, many false negatives
> regarding host availability. A great many sites block ICMP echo
> requests (I just tried "ping apple.com" for example - and get no response).
>
> Since the OS has no way of knowing what particular port/service is of
> interest, your only good option is to try to connect to the service of
> interest and handle failure appropriately.
>
> (Of course, even if you seemingly can't connect by this approach, it is
> fundamentally unknowable whether the receiving host actually got your
> test message: http://en.wikipedia.org/wiki/Two_Generals'_Problem)
>
> - --
> Conrad Shultz
Totally right.
Reachability may not be the best name for it. Think of it as Request-Response-Receivability (Can I get response from the host when I request it? and does that response not have any error in the header?)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden