The Linux operating system was originally conceived and written by Linux Torvalds with the assistance of many people all over the world. It was intended to be an open source replacement for Unix and is compatible with Unix in almost every respect. The TCP/IP stack is implemented as part of the Linux kernel. It is also compatible with all the applicable Posix standards. Almost all programs written for Unix readily port to Linux without modification. Like the rest of the operating system, the TCP/IP stack was specifically designed for compatibility. In addition, it is completely interoperable with other TCP/IP implementations. It provides a socket interface that is compatible with Berkeley sockets. The code in Linux TCP/IP is very stable, and this is demonstrated by how few changes there are to the TCP/IP code in recent revisions.
In this, we will show how the Linux sources are organized and where to find sources that are referenced in this book. Then, we will introduce a brief history of data communication. We will introduce the OSI seven-layer model and how it forms a basis for examining networking protocols of all types. We will discuss connection-oriented and connectionless protocols.Following this will be a discussion of the difference between local area networks (LANs) and broadband or wide area networks (WANs). In this chapter, we will talk about networking standards and provide a guide for navigating among the various standards bodies. The Linux TCP/IP Source Code
In this section, when we refer to pathnames, we use the term linux to mean the top-level directory in the Linux source tree. For example, if the 2.6 kernel sources are placed in the traditional place for linux kernels, /usr/src, in our case, linux would expand to /usr/src/linux- 2.6.0-test10. In this book, we are concerned primarily with the source and header files related to networking and TCP/IP. The TCP/IP sources are in the linux/net directory. Most of the core networking source files that are not specific to either IPv4 or IPv6 are in the linux/core directory, which contains fundamental networking infrastructure definitions and functions used by both IPv4 and IPv6 and other protocols. The directory linux/net/ipv4 contains IPv4 sources and the protocols TCP and UDP. Most of the IPv6 files are in linux/net/ipv6.
The network interface drivers are in linux/drivers/net. In some cases, there is a separate directory in linux/drivers/net for each specific network interface hardware type. Most drivers, like the tunnel pseudo-driver tun.c, are found in the linux/net/drivers directory. The generic device initialization functions and definitions in net_init.c are in linux/net/drivers as well. The companion CD-ROM does not include all the drivers in the Linux source but does have sources for the drivers discussed in this book.