Socket Structure and Accounting
The definition of a socket is also related to the accounting procedures followed for network usage. Network Control Programs (NCPs) should log each connection made and record the time the connection was made, the time the connection was closed, the number of messages and number of bits transmitted over the connection, the sending and receiving hosts, and the sockets at the sending host and receiving host which participated in the connection. In order for these sockets to be meaningful, they should be identifiable with the user, account, or process name with which each socket is associated.
It has previously been suggested that the sockets used by a network user be identified with that user no matter which host he used for network communications. Users would be registered at some host and be identified as a user from that host even if he used the system as a second host to communicate with the system at a third host.
To satisfy the above requirements within the name space of a 32 bit socket, the following procedure is suggested. This procedure has been implemented with the NCP on the Lincoln Laboratory 360/67 system and is used by all processes making use of network facilities. ) A 32 bit socket is divided into an 8 bit "home" field, a 16 bit "user" field and an 8 bit "tag" field. The tag consists of a 7 bit "plug" and a one bit "polarity" where a "0" polarity indicates a receive socket and a "1" polarity indicates a send socket. Thus a user on one host system may run processes with up to 128 send sockets and 128 receive sockets. This procedure allows for 256 hosts and 65,536 users per host. The only difficulty is in mapping user or process identifiers at a host into a 16 bit user number. This may be done through a table lookup, possibly using a hash coding technique. Though many systems have a unique run time index associated with each process, if this index were used as the user number, the user number would not be the same each time the process were used for network activity. What is required, is a unique mapping from a process identifier (usually a character string) into a 16 bit binary number.
The sockets used for facilities following a common network protocol, such as the ICP, should also follow this socket definition. Thus the logger socket at the Lincoln Laboratory 360/67 would be, and is, x'0A0000 01, ', i.e. home 10, user 0, and tag 1.
This procedure for defining sockets enables an accounting procedure for identifying users of network facilities and for measuring network usage.
[ This RFC was put into machine readable form for entry ]
[ into the online RFC archives by BBN Corp. under the ]
[ direction of Alex McKenzie. 12/96 ]