• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best practices for interpreting network reachability flags?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best practices for interpreting network reachability flags?


  • Subject: Re: Best practices for interpreting network reachability flags?
  • From: Allan Nathanson <email@hidden>
  • Date: Mon, 10 Sep 2007 08:17:41 -0400


On Sep 9, 2007, at 7:17 PM, Rich Siegel wrote:

On 9/9/07 at 7:05 PM, email@hidden (Allan Nathanson) wrote:

What you are likely running into is a system which HAS a modem service
enabled. In this case, if the system is not currently connected to an
ethernet/wireless network the modem "can" still provide a path off the
system (but you'd have to "connect" first). This is indicated by the
kSCNetworkFlagsConnectionRequired flag.


The test most applications will want to make is the following :

if ((flags & kSCNetworkFlagsReachable)
&& !(flags & kSCNetworkFlagsConnectionRequired)) {
// target is reachable
}

Great, thanks very much for the info. If I understand your example correctly, though, testing kSCNetworkFlagsReachable by itself is all I need to do. Is that right? And if so, how do I reconcile that with the beta reports that their networking is running correctly and yet kSCNetworkFlagsReachable is off? (I'm already testing that flag, and _only_ that flag.)

If you only check kSCNetworkFlagsReachable than your application may attempt to use the network only to be blocked because the modem service needs to be connected. Unless you also want to add code to establish the connection you will also want to check that the kSCNetworkFlagsConnectionRequired flag is *NOT* set.


- Allan

_______________________________________________
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


  • Follow-Ups:
    • Re: Best practices for interpreting network reachability flags?
      • From: Rich Siegel <email@hidden>
References: 
 >Re: Best practices for interpreting network reachability flags? (From: Rich Siegel <email@hidden>)

  • Prev by Date: Re: Best practices for interpreting network reachability flags?
  • Next by Date: Re: Best practices for interpreting network reachability flags?
  • Previous by thread: Re: Best practices for interpreting network reachability flags?
  • Next by thread: Re: Best practices for interpreting network reachability flags?
  • Index(es):
    • Date
    • Thread