Re: does SCNetworkCheckReachabilityByName work?
Re: does SCNetworkCheckReachabilityByName work?
- Subject: Re: does SCNetworkCheckReachabilityByName work?
- From: Chris Silverberg <email@hidden>
- Date: Mon, 19 Aug 2002 18:46:54 -0700
- Organization: Silverberg.Net
on 8/19/02 6:28 PM, Allan Nathanson at email@hidden wrote:
>
That's not the answer I would have expected. Can you exec the
>
following command and send the resulting output:
>
>
scutil -d -r <hostname>
>
Hi Allan,
Thanks for your quick response. Here's the code snippit:
SCNetworkConnectionFlags flags;
return( SCNetworkCheckReachabilityByName( "cgi.aladdinsys.com", &flags )
&& (flags & kSCNetworkFlagsReachable) );
(when calling this, SCNetworkCheckReachabilityByName returns true, flags is
zero.)
Here is the output from scutil:
[zuma:/usr/include/sys] chris% scutil -d -r cgi.aladdinsys.com
checkAddress(216.52.26.204)
status = isReachable (my subnet)
service id = 1
device = en0
checkAddress(216.52.26.205)
status = isReachable (my subnet)
service id = 1
device = en0
check DNS for "cgi.aladdinsys.com"
checkAddress(63.251.238.170)
status = isReachable via default route (my subnet)
service id = 1
device = en0
flags = 0x2 (Reachable)
So clearly I should be getting back kSCNetworkFlagsReachable which is what
I'd expect. I'm just stumped as to why I'm not getting that.
Also, is this function guaranteed to return quickly? I dont want to lockup
the application waiting for this to return if I can help it.
thanks,
-Chris
_______________________________________________
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.