DHCPClientPreferences Reference

Framework
Declared in
DHCPClientPreferences.h

Overview

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

DHCPClientPreferencesCopyApplicationOptions

Returns the list of options for the specified application ID.

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.

Availability
  • Available in OS X v10.1 and later.
Declared In
DHCPClientPreferences.h

DHCPClientPreferencesSetApplicationOptions

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

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.

Availability
  • Available in OS X v10.1 and later.
Declared In
DHCPClientPreferences.h