Mac Developer Library

Developer

SystemConfiguration Framework Reference DHCPClientPreferences Reference

Options
Deployment Target:

On This Page

DHCPClientPreferences Reference

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable

Objective-C

@import SystemConfiguration;

The DHCPClientPreferences programming interface allows applications to get and update DHCP preferences. DHCP preferences are in the form of DHCP option codes, which are defined in RFC 2132.

Functions

  • Returns the list of options for the specified application ID.

    Declaration

    Objective-C

    UInt8 * DHCPClientPreferencesCopyApplicationOptions ( CFStringRef applicationID, CFIndex *count );

    Parameters

    applicationID

    The application’s preference ID (for example, “com.apple.SystemPreferences”).

    count

    The number of elements in the list of options.

    Return Value

    The list of options for the specified application ID, or NULL if no options are defined or if an error occurred. Use free(3) to release a non-NULL return value.

    Import Statement

    Objective-C

    @import SystemConfiguration;

    Availability

    Available in OS X v10.1 and later.

  • Updates the DHCP client preferences to include the specified list of options for the specified application ID.

    Declaration

    Objective-C

    Boolean DHCPClientPreferencesSetApplicationOptions ( CFStringRef applicationID, UInt8 *options, CFIndex count );

    Parameters

    applicationID

    The application’s preference ID (for example, “com.apple.SystemPreferences”).

    options

    An array of 8-bit values containing the DHCP option codes for the specified application ID (see RFC 2132 for more information on these codes). Pass NULL to clear the list of options for this application ID.

    count

    The number of elements in options.

    Return Value

    TRUE if the operation succeeded; otherwise, FALSE.

    Import Statement

    Objective-C

    @import SystemConfiguration;

    Availability

    Available in OS X v10.1 and later.