---
name: "container_of"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/container_of"
---

# container\_of(9)

cast a member of a structure out to the containing structure

## NAME

container\_of - cast a member of a structure out to the containing structure

## SYNOPSIS

**container\_of(***ptr***,** *type***,** *member***);**

## ARGUMENTS

*ptr*

the pointer to the member.

*type*

the type of the container struct this is embedded in.

*member*

the name of the member within the struct.

## COPYRIGHT
