Ethernet Device Framework
The following diagram shows the network device framework in the Linux kernel.
The framework has the following layers.
- Protocol Interface Layer: The layer provides unified data send and receive interfaces. The interface dev_queue_xmit() is used for sending data and netif_rx() is used for receiving data.
- Device Interface Layer: The layer provides the unified structure of net_device which is used to describe network device attributes and operation details. The structure works as a container for all functions in the device driver layer.
- Device Driver Layer: The layer realizes the functional operation pointers of defined in the structure of net_device. And then the operations are handed over to hardware drivers for execution.
- Device Media Layer: The layer contains as the physical elements which completes the data packet sending and receiving tasks, including the network transmission adapter and the media used for transmission.