The SCNetworkReachability programming interface allows an application to determine the status of a system's current network configuration and the reachability of a target host. A remote host is considered reachable when a data packet, sent by an application into the network stack, can leave the local device. Reachability does not guarantee that the data packet will actually be received by the host.

The SCNetworkReachability programming interface supports a synchronous and an asynchronous model. In the synchronous model, you get the reachability status by calling the SCNetworkReachabilityGetFlags function. In the asynchronous model, you can schedule the SCNetworkReachability object on the run loop of a client object’s thread. The client implements a callback function to receive notifications when the reachability status of a given remote host changes. Note that these functions follow Core Foundation naming conventions. A function that has "Create" or "Copy" in its name returns a reference you must release with the CFRelease function.

For information about detecting and interpreting errors generated by calling these functions, see System Configuration.


Creating a Reachability Reference


Creates a reachability reference to the specified network address.


Creates a reachability reference to the specified network address.


Creates a reachability reference to the specified network host or node name.

Determining Reachability Status


Determines if the specified network target is reachable using the current network configuration.

Preparing to Determine Reachability


Returns the type identifier of all SCNetworkReachability instances.


Assigns a client to the specified target, which receives callbacks when the reachability of the target changes.


Schedules the specified network target with the specified run loop and mode.


Unschedules the specified target from the specified run loop and mode.


Schedules callbacks for the specified target on the specified dispatch queue.



Type of callback function used when the reachability of a network address or name changes.

Data Types


The handle to a network address or name.


Structure containing user-specified data and callbacks used with SCNetworkReachabilitySetCallback.



Flags that indicate the reachability of a network node name or address, including whether a connection is required, and whether some user intervention might be required when establishing a connection.