Skip to main content

VIII. Algorithms for the Input Interpreter

The following is a concise description of the NCP's responses to incoming network commands. CS always indicates Connection State. Note, CLOSE is a system call executed by the local user process, and CLS is a network command.

NOP​

Discard.

RFC (RTS or STR)​

If no entry exists, create one with status = PENDING CALL, and queue the message.

If CS = LISTENING, then queue the entry, enter the RFC-RCVD state, and inform the user of the request.

If CS = RFC-SENT but the new RFC does not match the request, refuse the RFC.

In all other cases, check the RFC for a match. If none exists, queue the RFC. If the RFC matches, then if:

  • CS = RFC-SENT, we enter the OPEN state.
  • CS = CLOSE-WAIT, the RFC is ignored.
  • otherwise, the request is illegal in all states which indicate it has already been received (these states are 1,3,4,6,8,9).

In any case, if processing the RFC causes an overflow condition (resources are exhausted), refuse the connection (send a CLS).

CLS​

The pending call queue is searched. If the CLS doesn't match the current request, but does match some other request, then delete that request and issue a CLS. If there is no match, the CLS is ignored.

If the CLS matches the current request, and CS =

  • PENDING, then delete the current request. If the request queue is empty, delete the entry; otherwise, leave the entry alone.
  • RFC-RCVD, Issue a CLS and enter the ABORT state.
  • ABORT, ignore.
  • RFC-SENT, issue a CLS. If the pending call queue is empty delete the entry, else enter the PENDING state.
  • OPEN, If we are on the receive side, response is identical to the response for RFC-SENT. If we are on the send side, clear the data queue, and if a RFNM is still pending enter the RFNM-WAIT state. Otherwise response is identical to the response for RFC-SENT.
  • CLS-WAIT, Issue a CLS and if the pending call queue is empty, delete the entry, otherwise CS = PENDING.
  • DATA-WAIT, clear the data queue and enter the RFNM-WAIT state. A matching CLS cannot occur in the CLOSED or LISTENING states.

ERR​

Errors are queued for later attention by system programmers, and are considered to be a system error in the host that originated the exchange. (Not associated with any state).

ECO​

The op code is changed to ERP and retransmitted (Not associated with any state).

ERP​

Upon receipt of an ERP, the system passes the text of the command back to the process which issued the ECO.

INR, INS​

These commands are enabled only in the OPEN state. Upon receiving an INTERRUPT, the system causes an event to be sent to the associated process. An INTERRUPT is ignored in the CLS-WAIT, DATA-WAIT, and RFNM-WAIT states. In any other state it is an error.

ALL​

ALLOCATE is valid only in the OPEN state, and may be sent only to a send socket. The NCP increments the 'Their Size' field in the associated rendezvous table entry by the size specified in the ALLOCATE command.

In the CLS-WAIT and DATA-WAIT states this command is ignored; in any other state it is an error.

Data-RFNM​

If in the OPEN state, mark the Flow Control Status field in the appropriate rendezvous table entry as RFNM-RECVD, and send more data if required.

If in the DATA-WAIT state, maintenance the Flow Control Status. If the data queue is empty issue a CLS and enter the CLS-WAIT state; otherwise, transmit the next message.

If in the RFNM-WAIT state, maintenance the Flow Control Status and issue a CLS. If the Pending Call queue is empty delete the rendezvous table entry, otherwise CS = PENDING.

A Data-RFNM is an error in all other states.