ADC Home > Reference Library > Reference > Networking > System Configuration Framework Reference

 


DHCPClientPreferences

Includes:
<sys/cdefs.h>
<CoreFoundation/CFString.h>

Overview

The DHCPClientPreferences API 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
DHCPClientPreferencesSetApplicationOptions

DHCPClientPreferencesCopyApplicationOptions


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 returned array.
Return Value

Returns the list of options for the given application ID, or NULL if no options are defined or an error occurred.

When you are finished, use free() to release a non-NULL return value.

Discussion

Copies the requested DHCP options for the given application ID.


DHCPClientPreferencesSetApplicationOptions


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 (see RFC 2132) for this application ID. A NULL value will clear the list of options for this application ID.
count
The number of elements in the options parameter.
Return Value

Returns TRUE if the operation succeeded, FALSE otherwise.

Discussion

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


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-03-11