Transport Interfaces Programming Guide

TCP/IP Protocol Stack

The TCP/IP protocol suite can be described using a reference model similar to the OSI reference model. Figure 1-4 shows the corresponding OSI layers and some example services at each layer. TCP/IP does not delineate the presentation and session layers as the OSI model does; application code provides the necessary presentation or session functionality.

The TCP/IP protocols are defined in documents called Requests for Comments (RFCs). RFCs are maintained by the Network Information Center (NIC), the organization that handles address registration for the Internet.

RFCs define a number of applications, the most widely used being telnet, a terminal emulation service on remote hosts, and ftp, which allows files to be transferred between systems.

Figure 1-4 TCP/IP Protocol Stack

Graphic

TCP/IP Protocol Stack Description

The following sections describes the parts of the TCP/IP protocol stack.

Device Drivers

The device driver layer (also called the Network Interface) is the lowest TCP/IP layer and is responsible for accepting packets and transmitting them over a specific network. A network interface might consist of a device driver or a complex subsystem that uses its own data link protocol.

Internet Protocol (IP) Layer

The Internet Protocol layer handles communication from one machine to another. It accepts requests to send data from the transport layer along with an identification of the machine to which the data is to be sent. It encapsulates the data into an IP datagram, fills in the datagram header, uses the routing algorithm to determine how to deliver the datagram, and passes the datagram to the appropriate device driver for transmission.

The IP layer corresponds to the network layer in the OSI reference model. IP provides a connectionless, "unreliable" packet-forwarding service that routes packets from one system to another.

Transport Layer

The primary purpose of the transport layer is to provide communication from one application program to another. The transport software divides the stream of data being transmitted into smaller pieces called packets in the ISO terminology and passes each packet along with the destination information to the next layer for transmission.

This layer consists of Transport Control Protocol (TCP), a connection-oriented transport service (COTS), and the user datagram protocol (UDP), a connectionless transport service (CLTS).

Application Layer

The application layer consists of user-invoked application programs that access services available across a TCP/IP Internet. The application program passes data in the required form to the transport layer for delivery.