September 2016
Intermediate to advanced
989 pages
24h 10m
English
Network devices are not accessed through device nodes and they do not have major and minor numbers. Instead, a network device is allocated a name by the kernel, based on a string and an instance number. Here is an example of the way a network driver registers an interface:
my_netdev = alloc_netdev(0, "net%d", NET_NAME_UNKNOWN, netdev_setup); ret = register_netdev(my_netdev);
This creates a network device named net0 the first time it is called, net1 the second, and so on. More common names are lo, eth0, and wlan0.
Note that this is the name it starts off with; device managers, such as udev, may change to something different later on.
Usually, the network interface name is only used when configuring the network using utilities such as ...
Read now
Unlock full access