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

 


SCDynamicStoreCopyDHCPInfo

Includes:
<sys/cdefs.h>
<CoreFoundation/CoreFoundation.h>
<SystemConfiguration/SCDynamicStore.h>

Overview

The functions of the SCDynamicStoreCopyDHCPInfo API provide access to information returned by the DHCP or BOOTP server.



Functions

DHCPInfoGetLeaseStartTime
DHCPInfoGetOptionData
SCDynamicStoreCopyDHCPInfo

DHCPInfoGetLeaseStartTime


CFDateRef DHCPInfoGetLeaseStartTime(
    CFDictionaryRef info);  
Parameters
info
The non-NULL DHCP information dictionary returned by calling SCDynamicStoreCopyDHCPInfo.
Return Value

Returns a non-NULL CFDateRef if lease start time information is present; NULL if the information is not present or if the configuration method is not DHCP.

The return value must NOT be released.

Discussion

Returns a CFDateRef corresponding to the lease start time, if present.


DHCPInfoGetOptionData


CFDataRef DHCPInfoGetOptionData(
    CFDictionaryRef info,
    UInt8 code);  
Parameters
info
The non-NULL DHCP information dictionary returned by calling SCDynamicStoreCopyDHCPInfo.
code
The DHCP option code (see RFC 2132) to return data for.
Return Value

Returns a non-NULL CFDataRef containing the option data; NULL if the requested option data is not present.

The return value must NOT be released.

Discussion

Returns a non-NULL CFDataRef containing the DHCP option data, if present.


SCDynamicStoreCopyDHCPInfo


CFDictionaryRef SCDynamicStoreCopyDHCPInfo(
    SCDynamicStoreRef store,
    CFStringRef serviceID);  
Parameters
store
An SCDynamicStoreRef representing the dynamic store session that should be used for communication with the server. If NULL, a temporary session will be used.
serviceID
A CFStringRef containing the requested service. If NULL, returns information for the primary service.
Return Value

Returns a dictionary containing DHCP information if successful; NULL otherwise. Use the DHCPInfoGetOption function to retrieve individual options from the returned dictionary.

A non-NULL return value must be released using CFRelease().

Discussion

Copies the DHCP information for the requested serviceID, or the primary service if serviceID == NULL.


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