<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: 10.1.0 -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SystemConfiguration",
  "identifier" : "/documentation/SystemConfiguration/DHCPInfoGetOptionData",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "System Configuration"
    ],
    "preciseIdentifier" : "c:@F@DHCPInfoGetOptionData"
  },
  "title" : "DHCPInfoGetOptionData"
}
-->

# DHCPInfoGetOptionData

Returns DHCP option data, if present.

```
CFDataRefDHCPInfoGetOptionData(CFDictionaryRef info, UInt8 code);
```

## Parameters

`info`

The DHCP information dictionary returned by [`SCDynamicStoreCopyDHCPInfo`](/documentation/SystemConfiguration/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.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)