Socket Interface to Network Facilities

This section explains the socket interprocess communication (IPC) facilities.

The socket interprocess communication (IPC) facilities, illustrated by the Operating System Layer Examples figure (Figure 1), are layered on top of networking facilities. Data flows from an application program through the socket layer to the networking support. A protocol-related state is maintained in auxiliary data structures that are specific to the supporting protocols. The socket level passes responsibility for storage associated with transmitted data to the network level.

Figure 1. Operating System Layer Examples
This diagram shows three layers on the left as follows from the top: socket layer, network protocols, and network interfaces. The three layers on the right are as follows from the top: stream socket, TCP/IP protocols, and 10M-bit Ethernet. Data flows both ways between layers of the same level (for example, between the socket layer and the stream socket).

Some of the communication domains supported by the socket IPC facility provide access to network protocols. These protocols are implemented as a separate software layer logically below the socket software in the kernel. The kernel provides ancillary services, such as buffer management, message routing, standardized interfaces to the protocols, and interfaces to the network interface drivers for the use of the various network protocols.

User request and control output subroutines serve as the interface from the socket subroutines to the communication protocols.

Note: Socket error codes issued for network communication errors are defined as codes 57 through 81 and are in the /usr/include/sys/errno.h file.