Re: How can we trigger a reachability callback?
Re: How can we trigger a reachability callback?
- Subject: Re: How can we trigger a reachability callback?
- From: Stéphane <email@hidden>
- Date: Wed, 7 May 2008 17:35:30 +0200
On May 7, 2008, at 5:00 PM, Allan Nathanson wrote:
On May 7, 2008, at 10:31 AM, Stephane Sudre wrote:
Would there be a way for a 3rd party to trigger a network
reachability callback?
The situation is the following one:
Let's say I have a 3rd party firewall running and it's blocking
network access.
In another user application project, during initialization I check
the connection flags with SCNetworkReachabilityGetFlags and then
install a SCNetworkReachabilityCallBack through the usual APIs.
The call to SCNetworkReachabilityGetFlags correctly sees that the
network is down.
Then I change the 3rd party firewall settings and allows all
network communications.
The problem is the reachability callback is not called as it would
be if, for instance, I had un-plugged the Ethernet cable.
So:
- is there a way to trigger a reachability callback?
There is currently no "API" that will trigger the reachability
callbacks but it does sound like something we should explore. Can
you please file a bug (enhancement) report.
Done. Bug ID# 5916833
But, knowing a bit about the implementation, you should be able to
use something like the following to get the process started.
key = SCDynamicStoreKeyCreateNetworkGlobalEntity(NULL,
kSCDynamicStoreDomainState,
kSCEntNetDNS);
ok = SCDynamicStoreNotifyValue(store, key);
CFRelease(key);
if (!ok) {
// if you could not post the notification
}
I will test this.
_______________________________________________
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