Skip to main content

TCP to User Messages

2.4.1 TYPE CODES​

All messages include a type code which identifies the type of user call to which the message applies. Types are:

0 - General message, does not apply to a particular user call

1 - Applies to OPEN

2 - Applies to CLOSE

3 - Applies to INTERRUPT

10 - Applies to SEND

20 - Applies to RECEIVE

30 - Applies to STATUS

2.4.2 MESSAGE FORMAT [notional]​

All messages include the following three fields:

  Type code

Local connection name

Event code

For message types 0-3 [General, Open, Close, Interrupt] only these three fields are necessary.

For message type 10 [Send] one additional field is necessary:

  Buffer address

For message type 20 [Receive] three additional fields are necessary:

  Buffer address

Byte count

End-of-letter flag

For message type 30 [status] additional data might include;

  Local socket, foreign socket

Send window [measures buffer space at foreign TCP]

Receive window [measures buffer space at local TCP]

Connection state [see section 4.3.6]

Number of letters awaiting acknowledgment

Number of letters awaiting receipt

Retransmission timeout

2.4.3 EVENT CODES​

The event code specifies the particular event that the TCP wishes to communicate to the user.

In addition to the event code, three flags may be useful to classify the event into major categories and facilitate event processing by the user:

  E flag: set if event is an error

L/F flag: indicates whether event was generated by Local TCP, or
Foreign TCP or network

P/T flag: indicates whether the event is Permanent or Temporary
[retry may succeed]

Events are encoded into 8 bits with the high order bits set to indicate the state of the E, L/F, and P/T flags, respectively.

Events specified so far are listed below with their codes and flag settings. A * means a flag does not apply or can take both values for this event. Additional events may be defined in the course of experimentation.

  0  0**  general success

1 ELP connection illegal for this process

2 OF* unspecified foreign socket has become bound

3 ELP connection not open

4 ELT no room for TCB

5 ELT foreign socket unspecified

6 ELP connection already open
EFP unacceptable SYN [or SYN/ACK] arrived at foreign
TCP. Note: This is not a misprint, the local meaning is different
from foreign.

7 EFP connection does not exist at foreign TCP

8 EFT foreign TCP inaccessible [may have subcases]

9 ELT retransmission timeout

10 E*P buffer flushed due to interrupt

11 OF* interrupt to user

12 **P connection closing

13 E** general error

14 E*P connection reset

Possible events for each message type are as follows:

  Type 0[general]: 2,11,12,14

Type 1[open]: 0,1,4,6,13

Type 2[close]: 0,1,3,13

Type 3[interrupt]: 0,1,3,5,7,8,9,12,13

Type 10[send]: 0,1,3,5,7,8,9,10,11,12,13

Type 20[receive]: 0,1,3,10,12,13

Type 30[status]: 0,1,13

Note that events 6(foreign), 7, 8 are generated at the foreign TCP or in the network[s], and these same codes are used in the error field of the internet packet [see section 4.2.1].