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

# register\_netdev(9)

register a network device

## NAME

register\_netdev - register a network device

## SYNOPSIS

**int register\_netdev(struct net\_device \*** *dev***);**

## ARGUMENTS

*dev*

device to register

## DESCRIPTION

Take a completed network device structure and add it to the kernel interfaces. A **NETDEV\_REGISTER** message is sent to the netdev notifier chain. 0 is returned on success. A negative errno code is returned on a failure to set up the device, or if the name is a duplicate.

This is a wrapper around register\_netdevice that takes the rtnl semaphore and expands the device name if you passed a format string to alloc\_netdev.

## COPYRIGHT
