Mac Developer Library

Developer

SystemConfiguration Framework Reference SCDynamicStoreCopyDHCPInfo Reference

Options
Deployment Target:

On This Page

SCDynamicStoreCopyDHCPInfo Reference

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable

Objective-C

@import SystemConfiguration;

The functions of the SCDynamicStoreCopyDHCPInfo programming interface provide access to information returned by the DHCP or BootP server.

Functions

  • Returns the DHCP information for the specified service.

    Declaration

    Objective-C

    CFDictionaryRef SCDynamicStoreCopyDHCPInfo ( SCDynamicStoreRef store, CFStringRef serviceID );

    Parameters

    store

    The dynamic store session that should be used for communication with the server. If this is NULL, a temporary session is used.

    serviceID

    The service ID. Pass NULL to retrieve information for the primary service.

    Return Value

    A dictionary containing DHCP information if successful, or NULL if unsuccessful. You must use the CFRelease function to release return values other than NULL.

    Discussion

    Use DHCPInfoGetOptionData to extract individual options from the dictionary returned by this function.

    Import Statement

    Objective-C

    @import SystemConfiguration;

    Availability

    Available in OS X v10.1 and later.

  • Returns DHCP option data, if present.

    Declaration

    Objective-C

    CFDataRef DHCPInfoGetOptionData ( CFDictionaryRef info, UInt8 code );

    Parameters

    info

    The DHCP information dictionary returned by SCDynamicStoreCopyDHCPInfo. Do not pass in a NULL dictionary.

    code

    The DHCP option code to get data for. (See RFC 2132 for more information on this code.)

    Return Value

    The DHCP option data if present, or NULL if the data is not present. You must not release the return value.

    Import Statement

    Objective-C

    @import SystemConfiguration;

    Availability

    Available in OS X v10.1 and later.

  • Returns the lease start time data.

    Declaration

    Objective-C

    CFDateRef DHCPInfoGetLeaseStartTime ( CFDictionaryRef info );

    Parameters

    info

    The DHCP information dictionary returned by SCDynamicStoreCopyDHCPInfo. Do not pass in a NULL dictionary.

    Return Value

    Data that corresponds to the lease start time, if this information is present, or NULL if the information is not present or if the configuration method is not DHCP.

    Import Statement

    Objective-C

    @import SystemConfiguration;

    Availability

    Available in OS X v10.1 and later.