Function

CFNetDiagnosticCopyNetworkStatusPassively

Gets a network status value.

Declaration

CFNetDiagnosticStatus CFNetDiagnosticCopyNetworkStatusPassively(CFNetDiagnosticRef details, CFStringRef  _Nullable *description);

Parameters

details

CFNetDiagnosticRef, created by CFNetDiagnosticCreateWithStreams or CFNetDiagnosticCreateWithURL, for which the Network Diagnostics status is to be obtained.

description

If not NULL, upon return contains a localized string containing a description of the current network status. Ownership follows the The Create Rule.

Return Value

A network status value.

Discussion

This function returns a status value that can be used to display basic information about the connection, and optionally gets a localized string containing a description of the current network status.

This function is guaranteed not to generate network activity.

Special Considerations

This function is thread safe as long as another thread does not alter the same CFNetDiagnosticRef at the same time.

See Also

Network Diagnostics

CFNetDiagnosticRef

An opaque reference representing a CFNetDiagnostic.

CFNetDiagnosticStatusValues

Constants for diagnostic status values.

Deprecated
CFNetDiagnosticCreateWithStreams

Creates a network diagnostic object from a pair of CFStreams.

Deprecated
CFNetDiagnosticCreateWithURL

Creates a CFNetDiagnosticRef from a CFURLRef.

Deprecated
CFNetDiagnosticDiagnoseProblemInteractively

Opens a Network Diagnostics window.

Deprecated
CFNetDiagnosticSetName

Overrides the displayed application name.

Deprecated