SCDynamicStoreCopyDHCPInfo Reference

Framework
Declared in
SCDynamicStoreCopyDHCPInfo.h

Overview

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

Functions

DHCPInfoGetLeaseStartTime

Returns the lease start time data.

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.

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

DHCPInfoGetOptionData

Returns DHCP option data, if present.

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.

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

SCDynamicStoreCopyDHCPInfo

Returns the DHCP information for the specified service.

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.

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