.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "REGISTER_NETDEVICE" "" "06 October 2005" "" ""
.SH NAME
register_netdevice \- register a network device
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int register_netdevice (struct net_device * \fIdev\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIdev\fB\fR
device to register
.SH "DESCRIPTION"
.PP
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.
.PP
Callers must hold the rtnl semaphore. See the comment at the
end of Space.c for details about the locking. You may want
\fBregister_netdev\fR instead of this.
.SH "BUGS"
.PP
The locking appears insufficient to guarantee two parallel registers
will not get the same name.