<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/IOSysCtlByName",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@F@IOSysCtlByName"
  },
  "title" : "IOSysCtlByName"
}
-->

# IOSysCtlByName

```
kern_return_t IOSysCtlByName(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
```

## Parameters

`name`

An ASCII representation of the sysctl vector

`oldp`

Buffer to receive the system information

`oldlenp`

Length of the buffer receiving the system information

`newp`

Buffer containing the value to be set

`newlen`

Length of the buffer containing the value to be set

## Return Value

kIOReturnSuccess if successful, or an IOReturn code indicating the error

## Discussion

Get or set system information. Depending on the sysctl vector, only priviledged
drivers might be able to set certain system information.

---

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)