Linux Kernel Architecture

(Jacob Rumans) #1

Chapter 12: Networks


A very large number of standard protocols are defined for the Internet. Usually, they are defined
inRequest for Comments(RFC) documents and must be implemented by applications wishing to
use or offer a particular service. Most protocols can be tested with thetelnettool because they
operate with simple text commands. A typical example of the communication flow between a
browser and web server is shown below.
wolfgang@meitner>telnet 192.168.1.20 80
Trying 192.168.1.20...
Connected to 192.168.1.20.
Escape character is ’^]’.

GET /index.html HTTP/1.1
Host: http://www.sample.org
Connection: close

HTTP/1.1 200 OK
Date: Wed, 09 Jan 2002 15:24:15 GMT
Server: Apache/1.3.22 (Unix)
Content-Location: index.html.en
Vary: negotiate,accept-language,accept-charset
TCN: choice
Last-Modified: Fri, 04 May 2001 00:00:38 GMT
ETag: "83617-5b0-3af1f126;3bf57446"
Accept-Ranges: bytes
Content-Length: 1456
Connection: close
Content-Type: text/html
Content-Language: en

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
...
</html>
telnetis used to set up a TCP connection on port 80 of computer192.168.1.20. All user input
is forwarded via the network connection to the process associated with this address (which is
uniquely identified by the IP address and the port number). A response is sent once the request
has been received. The contents of the desired HTML page are output together with a header
with information on the document and other stuff. Web browsers use exactly the same proce-
dure to access data transparently to users.
As a result of the systematic division of network functionality into layers, applications wishing
to communicate with other computers need concern themselves with only a very few details.
The actual link between the computers is implemented by lower layers, and all the application
has to do is read and generate text strings — regardless of whether the two computers are sitting
side by side in the same room or are located on different continents.

The layer structure of the network is reflected in the kernel by the fact that the individual levels are
implemented in separate sections of code that communicate with each other via clearly defined interfaces
to exchange data or forward commands.

Free download pdf