RFC 147 (rfc147) - Page 2 of 3


Definition of a socket



Alternative Format: Original Text Document



                 MASSACHUSETTS INSTITUTE OF TECHNOLOGY
                           LINCOLN LABORATORY

TO:      Network Socket Committee and Network Community        7 May 1971

FROM:    J. M. Winett (LL)

SUBJECT: The Definition of a Socket

A socket is defined to be the unique identification to or from which
information is transmitted in the network. The socket is specified as a 32
bit number with even sockets identifying receiving sockets and odd sockets
identifying sending sockets. A socket is also identified by the host in
which the sending or receiving processer is located.

Previous network papers postulated that a process running under control of
the host's operating system would have access to a number of ports. A port
might be a physical input or output device, or a logical I/O device
supported by system calls to the host's operating system.  The latter
category includes a) I/O directed to a physical device which is being
spooled by the operating system, b) a physical device whose basic
characteristics have not been altered but whose access has been limited and
possibly transformed by a mapping algorithm (e.g. device address mapping or
cylinder relocation as in virtual mini disks), c) access to a file system
through a directory and access method maintained by the operating system,
d) a procedure for process to process communications, e) a procedure for
machine to machine communication (such as defined by the network protocol.)

A socket has been defined to be the identification of a port for machine to
machine communication through the ARPA network. Sockets allocated to each
host must be uniquely associated with a known process or be undefined. The
name of some sockets must be universally known and associated with a known
process operating with a specified protocol. (e.g., a logger socket, RJE
socket, a file transfer socket). The name of other sockets might not be
universally known, but given in a transmission over a universally known
socket, (c. g. the socket pair specified by the transmission over the
logger socket under the Initial Connection Protocol (ICP). In any case,
communication over the network is from one socket to another socket, each
socket being identified with a process running at a known host.

The question arises as to whether socket names must be known to users of
network programs or whether the specification of sockets can be made
transparent to the user. Also, should the socket used at one time by a
process be the same socket used at a later time by the same process for the
same purpose? If sockets are not transparent to the user, then the sockets
used must not be dependent on the order in which network connections are
made.