Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
The Linux TCP/IP stack : networking for embedded systems
Herbert T., Charles River Media, Inc., Rockland, MA, 2004. Type: Book (9781584502845)
Date Reviewed: Oct 21 2004

This is a guide to the transmission control protocol/Internet protocol (TCP/IP) code in the 2.6 Linux kernel. Herbert presents the salient data structures, major code flows, and the internals and interfaces of the major networking subsystems. The book includes a CD, which contains the kernel source code, as well as the relevant requests for comments (RFCs) that describe the IP protocol suite.

The book starts with a brief review of networking and TCP/IP. It then examines the code at the bottom of the protocol stack: network interfaces and device drivers. The author describes how devices are initialized and how the software registers itself with other layers in the Linux kernel, and provides an overview of the driver code that handles the transmission and reception of packets. After describing the bottom of the stack, the book moves to the top of the protocol stack, with a description of the Linux sockets interface. The author describes the sockets application programming interface (API), reviews the major protocol families, and shows how the sockets APIs are implemented.

The next two chapters describe the internal data structures and services that are used to implement the actual TCP/IP code. Topics addressed include kernel threading, the routing and addressing caches, packet queueing, and de-multiplexing. The author also describes kernel memory allocation, and the structure and use of socket buffers; these are the core data structures that hold the data that is sent and received.

Next, the author presents the code that implements the TCP and user datagram protocol (UDP). The first chapter in this section begins by explaining how the TCP and UDP code interfaces to the socket layer, and how the code is initialized. The chapter then traces the control flow through the code for sending TCP and UDP packets. For TCP, the author also presents the Linux code that implements retransmissions, keepalive, and flow control.

The next chapter follows the packet send path into the code that implements the IP layer. The author begins by describing the functions of IP: routing, address resolution, and IP layer protocols, such as Internet group management protocol (IGMP) and address resolution protocol (ARP). The chapter gives a detailed description of the forwarding information base that stores the routing information, and how input and output packets are routed. The last part of the chapter describes how incoming packets destined for the local node are delivered to TCP or UDP.

The book continues by examining the TCP and UDP code that is invoked to receive an incoming packet from the IP code beneath. This is the converse of the TCP/UDP send code described earlier. The author describes the protocol code, and shows how the data is passed up to the socket layer above. This completes the walkthrough of the code that both sends and receives data from the sockets interface down to the network and device interface. The final chapter describes the changes introduced by Internet protocol version 6 (IPv6).

Overall, the book did a good job of describing how the Linux networking code works. I like the approach of walking through the code that is involved when a packet passes through each protocol layer. For example, the examination of how a packet gets handed from the sockets layer to the UDP layer, and the internal processing that goes on before it is passed to the IP layer, really gives the reader a good understanding of what this part of the code does.

In addition to the runtime aspects, the author also explains how the various subsystems (for example, sockets and TCP) are configured, or “wired together.” This is important, because it can be difficult to follow the control flow of the code across these interfaces. The reader should come away with a good understanding of the major code modules, and how they relate to each other. It must be noted that, while the book explains how the code works, it does not spend as much time on the design choices that led to this implementation, or on the detailed workings of TCP/IP protocol. Readers who are interested in these topics would do well to consult some other sources.

Reviewer:  W. Hu Review #: CR130309 (0506-0643)
Bookmark and Share
  Featured Reviewer  
 
Network Communication (D.4.4 ... )
 
 
Linux (D.4.0 ... )
 
 
Real-Time Systems And Embedded Systems (D.4.7 ... )
 
 
TCP/ IP (C.2.2 ... )
 
 
General (D.4.0 )
 
 
Network Protocols (C.2.2 )
 
  more  
Would you recommend this review?
yes
no
Other reviews under "Network Communication": Date
Communication networks management
Terplan K., Prentice-Hall, Inc., Upper Saddle River, NJ, 1987. Type: Book (9780131530652)
Dec 1 1987
A communication system supporting large datagrams on a local area network
Linton A., Panzieri F. Software--Practice & Experience 16(3): 278-289, 1986. Type: Article
Oct 1 1986
Efficient implementation of rendezvous
Schiper A., Simon R., Desarzens P., Sengstag J. The Computer Journal 32(3): 267-272, 1989. Type: Article
Jun 1 1990
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy