---
name: "netdev_has_upper_dev"
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/netdev_has_upper_dev"
---

# netdev\_has\_upper\_dev(9)

Check if device is linked to an upper device

## NAME

netdev\_has\_upper\_dev - Check if device is linked to an upper device

## SYNOPSIS

**bool netdev\_has\_upper\_dev(struct net\_device \*** *dev***, struct net\_device \*** *upper\_dev***);**

## ARGUMENTS

*dev*

device

*upper\_dev*

upper device to check

## DESCRIPTION

Find out if a device is linked to specified upper device and return true in case it is. Note that this checks only immediate upper device, not through a complete stack of devices. The caller must hold the RTNL lock.

## COPYRIGHT
