'\" t .\" Title: __dev_get_by_name .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Network device support .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "__DEV_GET_BY_NAME" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "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" __dev_get_by_name \- find a device by its name .SH "SYNOPSIS" .HP \w'struct\ net_device\ *\ __dev_get_by_name('u .BI "struct net_device * __dev_get_by_name(struct\ net\ *\ " "net" ", const\ char\ *\ " "name" ");" .SH "ARGUMENTS" .PP \fInet\fR .RS 4 the applicable net namespace .RE .PP \fIname\fR .RS 4 name to find .RE .SH "DESCRIPTION" .PP Find an interface by name\&. Must be called under RTNL semaphore or \fIdev_base_lock\fR\&. If the name is found a pointer to the device is returned\&. If the name is not found then \fBNULL\fR is returned\&. The reference counters are not incremented so the caller must be careful with locks\&. .SH "COPYRIGHT" .br