There's not much to say about this section, except that I
frequently refer you to corresponding and related entries in an online
copy of The New Hacker's
Dictionary (known online as The Jargon File), an excellent
resource for understanding some of the culture and jargon of the original
Internet. I link you there when I think that the TNHD reference clarifies
or enhances the more straightforward definition I provide.
BSD Unix - The Berkeley Software Distribution of Unix took an
early lead over originator AT&T's offerings by providing extra features
and functionality that didn't appear in AT&T Unix (also called System
V) until later. One of these features was the "sockets" system for
communicating over TCP/IP networks. Between that and its adoption
by Sun Microsystems, Digital Equipment Corporation and others, BSD
Unix was the most popular choice for Internet hosts from the mid 80's
through the early 90's. The early 90's saw AT&T sue the Computer Software
Research Group, the University of California at Berkeley organization that
created BSD. The early 90's also saw System V adopt many traditional BSD
features (including sockets). For those reasons, all commercial Unixes
eventually switched to System V. BSD is still available, however,
in several lineal descendants: FreeBSD,
NetBSD, OpenBSD
and BSD/OS. See also the BSD and
Unix entries in TNHD.
gateway - A multi-homed network host
that operates at layer 4 of the OSI model. A
gateway understands the transport layer protocols at the least (TCP,
UDP, etc.) and sometimes understands elements from layer 5 (e.g. the
FTP protocol). A gateway uses this information to filter data
for example, it can reject disallowed operations, for example; and to
translate items in the data stream
for example, it can translate the
network addresses from an internal format to an external format. Related
terms include "packet filter" and "firewall:" a packet filter can be
part of a gateway, and a gateway is one component of a firewall.
Also note that looser definitions exist, such as for a mail gateway,
which lets people using one email system to send mail to people using
another system.
Nagle algorithm - The Nagle algorithm delays sending small
packets over the network on the theory that further packets might follow
soon. If so, those packets can be transmitted as a single unit, thus
reducing the impact of protocol overhead.
An example might help to show why this is important. First, the
most basic TCP/IP protocol header is 40 bytes, and it can be larger if
optional fields are used. Now, consider a program that sends many small,
two-byte packets. Without the Nagle algorithm, each of these packets
would be transmitted separately, with at least 20 bytes of overhead
for every byte of data. Obviously, this is quite wasteful. The Nagle
algorithm counteracts this effect by delaying the transmission of small
packets for some short time, such as 200 milliseconds. A packet is sent
when this Nagle timer times out, or when a full MTU
is accumulated.
This option is on by default in Winsock, but it can be turned off with
the TCP_NODELAY option of setsockopt()
. This option should
not be turned off except in a
very few situations.
OSI model - Of all the standards to come out of the Open
Systems Interconnect specifications, the OSI network model is the most
common and enduring. The OSI model is a seven-layer view of looking at
the network. It is presented below, with rough analogues from TCP/IP
and Winsock.
Layer 7 |
Application (e.g. an FTP or email client) |
Layer 6 |
Presentation (formats data, such as encrypting or compressing it) |
Layer 5 |
Session (manages the logical client/server connection; e.g. the FTP protocol) |
Layer 4 |
Transport (understands low-level client/server association; e.g. UDP or TCP) |
Layer 3 |
Network (routable packet level of the protocol; e.g. IP) |
Layer 2 |
Data Link (e.g. packet driver) |
Layer 1 |
Physical (e.g. Ethernet hardware) |
Layers 1 through 4 are the hardware and network stack (including the Winsock layer). Layers 5 through
7 are all under the application's control.
stack - In network parlance, a stack is a set of layered
programs, each of which talks to the ones above and below it. Below is
an illustration of the most common kind of network stack, showing how an
application program talks through the stack to the low-level network:
Winsock application |
Winsock API |
Proprietary Winsock DLL (WINSOCK.DLL, WSOCK32.DLL, WS2-32.DLL) |
Protocol stack API |
Protocol stack (TCP/IP, IPX/SPX, DECnet, etc.) |
Hardware driver API (packet driver, NDIS, ODI, etc.) |
Hardware driver |
Hardware API (specific to the networking hardware) |
Networking hardware (network interface card, modem, CSU/DSU) |
The network (Ethernet, DEC LAT, serial line) |
You might have noticed that there is a stack within the stack: the
protocol stack. Just like the network stack, the protocol stack is a
layered architecture, where higher-level components talk to lower-level
components, and vice versa. In TCP/IP, for example, TCP is the high-level
network transport that most applications use, while IP is the lower-level
packet protocol that TCP uses.
stream protocol - A stream protocol, such as TCP, delivers data
in variable-length packets whose size have no necessary relationship
with the size of the packets that were sent. For example, if one host
sends two 50-byte packets to the other host, that host may receive them
as 100 single-byte packets, as a single 100-byte packet, or as a handful
of smaller packets. Compare datagram protocol.