Chapter 2. General Architecture

2.1. Linux core concept

The Linux operating system implements the standard Berkeley socket API, which has its origins in the BSD Unix developments (4.2/4.3/4.4 BSD) RUSL99.

The Linux Network Subsystem architecture is shown on Figure 2-1[BTSPEC]. The standard components of the Linux network subsystem are Berkeley socket interface and Network Device Driver Interface.

The Berkeley Socket Interface allows user space programs to open communication endpoint to remote devices. Socket is a network abstraction of the channel endpoint. Socket is associated with the protocol. Usually, the PF_INET is used to associate a socket with the TCP/IP protocol.

Network Device Driver Interface enables multiple network devices to be used at the same time. Device driver registers device in the system. And each device has appropriate type to distinguish class of devices like Ethernet, PPP, X.25, etc.

The network driver interface includes packet scheduler interface. Packet scheduler implements queuing discipline for different type of devices.

The protocol component is an actual protocol implementation. Each protocol should registers itself in the socket interface with appropriate protocol family (PF_XXX) and in the network device driver interface with the appropriate protocol type. Each packet received will be delivered to the appropriate protocol layer.

The networking layer is fairly object-oriented in its design, as indeed is much of the Linux kernel. The core structure of the networking code goes back to the initial networking and socket implementations by Ross Biro and Orest Zborowski. The key objects are: