Skip to main content

IX. Algorithms for the System Call Interpreter

Each System Call is discussed, giving the state changes it may effect:

CONNECT​

If there is no entry, create one, issue an RFC, and enter the RFC-SENT state.

If CS = PENDING, search the queue and reject all non-matching requests. If no match is found issue an RFC and enter the RFC-SENT state. If a match is found, issue an RFC and enter the OPEN state. Transmission can commence as soon as buffer space has been allocated.

In any other state this command is illegal.

LISTEN​

If an entry doesn't exist, create one, and enter the LISTENING state.

If CS = PENDING, inform the user and enter the RFC-RCVD state.

In any other state this command is illegal.

ACCEPT​

If CS = RFC-RCVD, then issue an RFC and enter the OPEN state. Data transmission can occur as soon as buffer space is allocated.

If CS = ABORT, inform the user of the premature termination of the connection. If the pending call queue is empty, delete the entry; otherwise, enter the PENDING state.

This command cannot be legally executed in any other state.

CLOSE​

If CS =

  • LISTENING, then delete the entry.
  • RFC-RCVD, then issue a CLS and enter the CLS-WAIT state.
  • ABORT, inform the user of the premature termination of the connection. If the pending call queue is empty, delete the entry; otherwise, enter the PENDING state.
  • RFC-SENT, then issue a CLS and enter the CLS-WAIT state.
  • OPEN, if we are on the send side, and the data queue is not empty, or if a Data-RFNM is still outstanding, enter the DATA-WAIT state; otherwise, issue a CLS and enter the CLS-WAIT state.
  • CLS-WAIT, issuing a CLOSE in this state is a USER ERROR.
  • DATA-WAIT, issuing a CLOSE in this state is also an illegal sequence.
  • RFNM-WAIT, ignore the CLOSE.

A valid CLOSE cannot be issued if an entry does not exist, or if a socket is in the PENDING state.


Note: This RFC was put into machine readable form for entry into the online RFC archives by Anthony Anderberg 5/00.