Your Question: How Does Network Driver Work in Linux?

Your Question: How Does Network Driver Work in Linux?
Contents

A network driver is in principle a simple thing: its purpose is to provide the kernel with the means to transmit and receive data packets to and from network using a physical network interface. The driver is loaded into the kernel as a network module.

How do drivers work in Linux?

Linux drivers are built with the kernel, compiled in or as a module. Alternatively, drivers can be built against the kernel headers in a source tree. You can see a list of currently installed kernel modules by typing lsmod and, if installed, take a look at most devices connected through the bus by using lspci .

How do I write network driver in Linux?

The open method should register any system resources it needs (I/O ports, IRQ, DMA, etc.), turn on the hardware and increment module usage count. stop – This is a pointer to a function that stops the interface. This function is called whenever ifconfig deactivates the device (for example, “ifconfig eth0 down”).

James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.