---
name: "device_get_sysctl"
section: "9freebsd"
platform: "linux"
package: "freebsd-manpages"
version: "12.2-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/device_get_sysctl/9freebsd"
---

# device\_get\_sysctl(9freebsd)

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.
