'\" t .\" Title: dev_get_by_index .\" 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 "DEV_GET_BY_INDEX" "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" dev_get_by_index \- find a device by its ifindex .SH "SYNOPSIS" .HP \w'struct\ net_device\ *\ dev_get_by_index('u .BI "struct net_device * dev_get_by_index(struct\ net\ *\ " "net" ", int\ " "ifindex" ");" .SH "ARGUMENTS" .PP \fInet\fR .RS 4 the applicable net namespace .RE .PP \fIifindex\fR .RS 4 index of device .RE .SH "DESCRIPTION" .PP Search for an interface by index\&. Returns NULL if the device is not found or a pointer to the device\&. The device returned has had a reference added and the pointer is safe until the user calls dev_put to indicate they have finished with it\&. .SH "COPYRIGHT" .br