lkml.org 
[lkml]   [2015]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subjectdev_get_by_name example
From
Hello,

How should we use dev_get_by_name ?
What should be the 1st parameter should it be a pointer ? (without
allocation required) ?
struct net_device *dev_get_by_name(struct net *net, const char *name);
I get an exception when using it for unallocated pointer in 1st
argument, but succeeded with the following:
ndev = dev_get_by_name(&init_net, "eth0");
Is it alloweed to use init_net ?

Regards,
Ran


\
 
 \ /
  Last update: 2015-03-08 14:41    [W:0.048 / U:14.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site