Linux Socket Programming by Example - Warren Gay


Appendix glossary

address family

A set of acceptable address formats for use with a particular network protocol.

ancillary data

Control data that is sent or received with normal data in a packet. Ancillary data normally includes user credentials or file descriptors transmitted over a PF_LOCAL/PF_UNIX socket.


Application Programming Interface.


Advanced Research Projects Agency.

auxiliary data

Another name for ancillary data.


An amateur radio adaptation of the CCITT X.25 network protocol for digital radio transmission.

See also [X.25]


The endian quality describes the byte ordering of a particular piece of digital hardware. Big-endian implies that the most significant byte occurs first in physical placement.


In this book, BPQ refers to AX.25 support over Ethernet, developed by John Wiseman (radio callsign G8BPQ).

canonical hostname

A host machine on a network can be identified by several different names. However, each host must have one official hostname. All other hostnames are considered aliases of the canonical hostname.


Abbreviation for International Telegraph and Telephone Consultative Committee, which is a standardization bureau. This has now been combined into the ITU-T (International Telecommunication Union) standards bureau.

connection-oriented protocol

A protocol that requires that a channel of communication be established. Only after establishing the connection can communication take place. This form of communication is like a telephone call, where the other party must be reached before the conversation can begin.

connectionless protocol

A protocol that requires no prior establishment of a connection. This form of protocol is like mailing letters[md]messages are sent, in the hope that they arrive at their designated destinations.

control data

When discussing PF_LOCAL/PF_UNIX sockets, this means ancillary data.


A kernel testimonial that reliably identifies the userID and group of the requesting process.


A server process that runs without a controlling terminal. Usually a process that is started when the system boots and runs in the background until it is terminated or until the system is shut down. Other daemons are started by the inetd daemon, upon demand.


Defense Advanced Research Projects Agency.


A finite unit of data that is sent and received as one unit. It is a network message that is delivered on a best-effort basis.


Dynamic Host Configuration Protocol.


A division, or the process of dividing into two mutually exclusive or contradictory groups or entities.


In the context of sockets, the domain represents one of a set of possible protocol families. For DNS name servers, a domain represents an area of influence or authority. A domain can also be applied to a set of machines cooperating with the use of NIS.


An address notation that includes four decimal values separated by dots (periods). Also known as dotted-decimal notation; is an example of a dotted-quad address.


This quality describes the byte ordering of a particular piece of digital hardware. There are big- and little-endian CPUs, for example. Mixed-endians can also exist.


End of file.


A name chosen by inventor Bob Metcalfe of Xerox PARC in 1973 to describe a new local area network technology, which was based upon the University of Hawaii's ALOHA system. The word "Ether" was used by nineteenth-century physicists to explain how light passes through the vacuum of space.


Frequently Asked Question.


A firewall is a metaphorical concept that separates harm (fire) on one side from valuable resources on the other side, by means of a wall. It can be implemented in software alone or as a piece of equipment with software, designed to screen out malicious access to the internal network.

flow control

A form of control exerted over the transfer of data within a stream. When too much data arrives at the receiving end, the sender is instructed to stop sending. When the receiver has caught up with the data it has already received, it then instructs the sender to begin transmitting again.


File Transfer Protocol.


A network client program that allows the user to perform file transfers over a network, using the FTP protocol.

GMP library

GNU Multi-precision Math library. This library permits the programmer to compute numbers that exceed the precision of the standard C data types.


The normal path for data on a stream socket can be considered as "in-band" data. Data within this stream must be delivered in precisely the same order it was sent. The opposite to in-band data is out-of-band data.


The Internet daemon. This process waits for a connect (or UDP request) and then starts the server that will handle the request. See Chapter 15, "Using the inetd Daemon."


When applied to out-of-band data, the term inline means that the out-of-band data is received intermixed with the normal in-band data.

See also [in-band]

See also [out-of-band data]


In the networking context, an interface provides access to the network medium. It is normally a combination of a software driver and a piece of network hardware.

See also [NIC]


Initial Public Offering.


Internet Protocol version 4, which is in use over the Internet today. The IP number used by this protocol is 32 bits in length.


Internet Protocol version 6, which will be the next generation Internet protocol. The IP number used by this protocol is 128 bits in length.


Infrared data communications.


Internet service provider.


The endian quality describes the byte ordering of a particular piece of digital hardware. Little-endian implies that the least significant byte occurs first in physical placement.


The commonly accepted name of the local loopback interface that is normally assigned the IPv4 address


This is a software network interface that permits processes on a local host to communicate to other processes on the same host. It is normally given the IPv4 address of


A Linux/UNIX command for viewing online manual pages. Often simply called the man command for accessing man pages.

mirror site

An alternative site, which hosts the same services as the primary site. For example, a mirror FTP site will serve the same files that the primary FTP site provides. This is done to balance the load and provide a backup against service disruptions.


Network mask. When applied to a network address, it separates the network ID from the host ID.


Network Interface Card. This is one type of hardware that provides an interface to the physical network medium.


Network Information Service, formerly known as the Sun Yellow Pages (the name Yellow Pages is a registered trademark of British Telecom PLC in the United Kingdom). This is a service which provides centralized information services for a group of hosts within a network.


Name Server lookup command. Permits the user to query name servers to turn hostnames into network addresses and vice versa.


Network Time Protocol. This is a protocol used to synchronize the time of different host computers. There are now several documents about NTP, but RFC 1129 is a good place to start.

out-of-band data

This is data that is sent outside of the normal data path to the receiving end. This permits out-of-band data to be received ahead of the data that has already been sent, and to be received separately from the normal data. Note that this is a more general concept than TCP's "urgent mode."


A packet is a single unit of data that can be transmitted through a network. The term was originated by Donald Watts Davies in 1965 while performing research in London.

pad bytes

These are placeholder bytes, which carry no useful information in themselves. They are often zero bytes, placed into structures in order to fill out the structure to a particular size.


A peek at received data implies that the data is read, without making it unavailable. Conversely, a normal read operation obtains data without the option of receiving the same data again.


A peer is usually another host involved in communication with the local host. However, the local host can act as a peer when communicating with itself as one process communicates with another on the same host.


The Process ID is used by the UNIX/Linux kernel to identify each task operating in the system.


A pipe is a metaphorical concept representing a channel of data flow between one process and another on the same host. Most UNIX pipes are unidirectional.


A port number, when combined with an IP address, allows a specific instance of a connection to be addressed. For example, one host can offer two services for the same IP number, differing only by the port numbers used.


The process of converting a hostname into a network address. A hostname is converted into an IP number, for example.


A "Request For Comments" Internet document. The first such document was written by Steve Crocker on April 7, 1969. It was labeled "Request For Comments" and subtitled "Host Software." The general tone of this document was warm and welcoming. It was so well accepted that it was subsequently followed by a series of further RFCs for Internet protocol and design documents. Many RFCs become defacto standards even though they continue to be referred to as RFCs.


A network client program that provides the current terminal user access to another remote host as a terminal session.

See also [telnet]


A piece of network equipment that routes packets from one network to the correct destination network.


Reverse Polish Notation.


A systemwide mode that the overall system is in. For example, run-level 5 has the X Window server running on the console for many Linux distributions. Run-level 3 is usually for not having the X Window server running on the console.


This is a UNIX feature where the execution of an executable can be performed under a different userID than the account that the user is logged on as. For example, the lpr command runs as userID root when a print request is made under Red Hat Linux 6.0.


A socket is an endpoint in network communications. A pair of sockets is required for connection-oriented communications (using TCP/IP, for example).


Standard error output: This FILE control block is normally open for writing to file descriptor 2.


Standard input: This FILE control block is normally open for reading from file descriptor 0.


Standard output: This FILE control block is normally open for writing to file descriptor 1.


In the socket context: A stream socket is a connection-oriented socket. This is different from a datagram socket, which is connectionless. In the standard I/O context: a stream represents a FILE control block that is open for reading or writing.


Transport Control Protocol layer, which is used on top of the IP protocol layer. This layer adds flow control and data integrity to the lower IP level.


A network client program that provides a terminal session for the user.

See also [rlogin]


A sequential flow of control within a process. There can be several threads operating in parallel within one process, each representing an independent flow of control. All memory is shared between all threads within one process.

Trojan horse

A usually dangerous program designed to masquerade as some other program. By impersonating a normal program, it gets run by an unwitting user, which can then cause harm or capture information that should be kept secret.


User Datagram Protocol.

URG bit

A TCP protocol header bit that indicates urgent data is present.

urgent data

The special data that is sent in urgent mode.

See also [urgent mode]

urgent mode

The TCP protocol provides a facility where the sending end can indicate to the receiving end that "urgent data" has been placed into the normal stream of data. The receiving end then becomes notified that urgent data exists in its incoming data stream, but it remains up to the receiving end to determine how to process this data.

urgent pointer

This is a TCP protocol pointer that points to either the urgent data byte itself (RFC793) or the byte that follows the urgent data byte (BSD). This pointer is only computed and used at the receiving end when the TCP URG bit is set in the packet header.

wild socket address

This is a socket address that is left unspecified. This is often done when the choice of network interface is not known in advance, allowing the address to be dynamic.


A packet-switched network protocol recommended by CCITT in 1976, based upon the ISO networking model.


Sun Microsystem's Yellow Pages is now known as NIS (the name Yellow Pages is a registered trademark of British Telecom PLC in the United Kingdom). This is a service which provides centralized information services for a group of hosts within a network.


This is a UNIX process that has terminated or exited gracefully. Until the parent process inquires of the kernel about the child process's termination, a minimal process table entry is maintained by the kernel. This entry will display as a zombie process when all the processes are listed by the ps(1) command.