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

# devclass\_get\_softc(9)

translate unit number to driver private structure

## NAME

**devclass\_get\_softc** – translate unit number to driver private structure

## SYNOPSIS

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

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

*void* *\**\

**devclass\_get\_softc**(*devclass\_t dc*, *int unit*);

## DESCRIPTION

This function retrieves the driver private instance variables for the device with the given unit number and returns it.

## RETURN VALUES

If the device exists, its driver-private variables are returned, otherwise NULL is returned.

## SEE ALSO

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

## AUTHORS

This manual page was written by Doug Rabson.
