---
name: "dev_get_by_name"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/dev_get_by_name"
---

# dev\_get\_by\_name(9)

find a device by its name

## NAME

dev\_get\_by\_name - find a device by its name

## SYNOPSIS

**struct net\_device \* dev\_get\_by\_name(struct net \*** *net***, const char \*** *name***);**

## ARGUMENTS

*net*

the applicable net namespace

*name*

name to find

## DESCRIPTION

Find an interface by name. This can be called from any context and does its own locking. The returned handle has the usage count incremented and the caller must use **dev\_put** to release it when it is no longer needed. **NULL** is returned if no matching device is found.

## COPYRIGHT
