'\" t .\" Title: register_netdevice .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Network device support .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "REGISTER_NETDEVICE" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Network device support" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" register_netdevice \- register a network device .SH "SYNOPSIS" .HP \w'int\ register_netdevice('u .BI "int register_netdevice(struct\ net_device\ *\ " "dev" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 device to register .RE .SH "DESCRIPTION" .PP Take a completed network device structure and add it to the kernel interfaces\&. A \fBNETDEV_REGISTER\fR 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\&. .PP Callers must hold the rtnl semaphore\&. You may want \fBregister_netdev\fR instead of this\&. .PP BUGS: The locking appears insufficient to guarantee two parallel registers will not get the same name\&. .SH "COPYRIGHT" .br