---
name: "dev_get_by_flags"
section: "9"
platform: "linux"
package: "linux-manual-2.6.32"
version: "2.6.32-48squeeze6"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/dev_get_by_flags"
---

# dev\_get\_by\_flags(9)

find any device with given flags

## NAME

dev\_get\_by\_flags - find any device with given flags

## SYNOPSIS

**struct net\_device \* dev\_get\_by\_flags(struct net \*** *net***, unsigned short** *if\_flags***, unsigned short** *mask***);**

## ARGUMENTS

*net*

the applicable net namespace

*if\_flags*

IFF\_\* values

*mask*

bitmask of bits in if\_flags to check

## DESCRIPTION

Search for any interface with the given flags. Returns NULL if a device is not found or a pointer to the device. The device returned has had a reference added and the pointer is safe until the user calls dev\_put to indicate they have finished with it.

## COPYRIGHT
