Function

CFHostGetAddressing

Gets the addresses from a host.

Declaration

CFArrayRef CFHostGetAddressing(CFHostRef theHost, Boolean *hasBeenResolved);

Parameters

theHost

The CFHost whose addresses are to be obtained. This value must not be NULL.

hasBeenResolved

On return, a pointer to a Boolean that is TRUE if addresses were available and FALSE if addresses were not available. This parameter can be null.

function result

A CFArray of addresses where address is a sockaddr structure wrapped by a CFDataRef, or null if no addresses were available.

Discussion

This function gets the addresses from a CFHost. The CFHost must have been previously resolved. To resolve a CFHost, call CFHostStartInfoResolution.

Special Considerations

This function gets the addresses in a thread-safe way, but the resulting data is not thread-safe. The data is returned as a “get” as opposed to a copy, so the data is not safe if the CFHost is altered from another thread.

See Also

Hosts

CFHostRef

An opaque reference representing an CFHost object.

CFHostInfoType

Values indicating the type of data that is to be resolved or the type of data that was resolved.

CFHostClientContext

A structure containing user-defined data and callbacks for CFHost objects.

CFHostCancelInfoResolution

Cancels the resolution of a host.

CFHostCreateCopy

Creates a new host object by copying.

CFHostCreateWithAddress

Uses an address to create an instance of a host object.

CFHostCreateWithName

Uses a name to create an instance of a host object.

CFHostGetNames

Gets the names from a CFHost.

CFHostGetReachability

Gets reachability information from a host.

CFHostGetTypeID

Gets the Core Foundation type identifier for the CFHost opaque type.

CFHostScheduleWithRunLoop

Schedules a CFHost on a run loop.

CFHostSetClient

Associates a client context and a callback function with a CFHost object or disassociates a client context and callback function that were previously set.

CFHostStartInfoResolution

Starts resolution for a host object.

CFHostUnscheduleFromRunLoop

Unschedules a CFHost from a run loop.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software