---
name: "device_get_sysctl"
section: "9"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/device_get_sysctl"
---

# device\_get\_sysctl(9)

manipulate the sysctl oid tree for driver specific sysctl nodes

## NAME

**device\_get\_sysctl\_ctx**, **device\_get\_sysctl\_tree** – manipulate the sysctl oid tree for driver specific sysctl nodes

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/bus.h\>**

*struct sysctl\_ctx\_list \**\

**device\_get\_sysctl\_ctx**(*device\_t dev*);

*struct sysctl\_oid \**\

**device\_get\_sysctl\_tree**(*device\_t dev*);

## DESCRIPTION

The newbus system automatically adds a sysctl node for each device in the system. This node can be accessed with the **device\_get\_sysctl\_tree**() function. The context for the node can be obtained with the **device\_get\_sysctl\_ctx**() function.

## SEE ALSO

[device(9)](/device/9.md)

## AUTHORS

This manual page was written by Warner Losh.
