Host-Selected Identifiers Plus Directory (Scheme 2)
This system uses the same socket identifier structure as presented above, except that the Host picks the identifier at the time the socket is assigned, and the user has no prior knowledge or control of the assignment. By itself, this system would be totally unusable, because there would be no way for User A to address User B. However, it allows certain service functions (such as the Network logger) to have specifically assigned sockets.
One of these is a Network Directory service. This serves to relate a socket identifier at a particular host to the name of the user operating it. This might either be a single distributed service, or there might be a separate service at each host.
Under this scheme, each user, A and B, first activates his socket (or somehow gets his host to assign and tell him of a socket identifier). Then he gets the Directory module at his host to associate his name with the identifier of the socket just activated. Following this, User A in some manner gets the Directory Service at Host B to tell him the socket identifier assigned to User B. Then User A dispatches a connection request for this socket.
When User B gets the request, he similarly calls on the Directory service at Host A to find out the name of the user who is operating the socket User B was called by. If the name is that of User A, User B can safely accept the request. Otherwise, he rejects.
This scheme is rather cumbersome, but some directory services must exist for Host-selected socket identifiers to work. One advantage of the Directory Service is that it allows symbolic addressing. A sizeable disadvantage in view of its complexity is that it does not provide absolute security. (For example, after User A gets the identifier of the socket he is to address, User B could deactivate it, and somebody else could come along and get the same-named socket.)