7.1 TCP CM Protocol Descriptions

With the Enea LINX TCP Connection Manager Protocol, a connection is established in the following manner.

If both nodes try to connect to each other at the same time, neither of the nodes will receive an acknowledgment since the headers are sent on different sockets. This will lead to retries of the connection procedure. The timeouts for the retries are random.

7.1.1 TCP Connection Manager Headers

The Enea LINX TCP Connection Manager protocol defines the following header and package types.

Table 7.1 TCP Connection Manager Protocol Header Types

Protocol numberValueDefinition
TCP_CONN0x43Connect type. Used for connection acknowledgement
TCP_UDATA0x55User data type
TCP_PING0x50Keep-alive header type
TCP_PONG0x51Keep-alive response header type

7.1.1.1 TCP CM Generic Header

All messages in the TCP CM protocol have the following header. Only if Type indicates TCP_UDATA the fields source and destination are used - otherwise they must be set to zero. The size field is always used in the TCP_UDATA header and it may also be used in the TCP_CONN header.

Table 7.2 TCPCM Generic Header

012345678910111213141516171819202122232425262728293031
0123
ReservedOVersionType
Source
Destination
Size

Reserved

Reserved for future use, must be 0.

O

OOB bit, the TCP_UDATA is out of band.

Version

Version of the TCP CM protocol.

Type

Type of the current packet

Source

Source link id. Used in type TCP_UDATA, otherwise 0.

Destination

Destination link id. Used in type TCP_UDATA, otherwise 0.

Size

Size of user data in bytes, followed by the header. Used in type TCP_UDATA and TCP_CONN, otherwise 0.

7.1.1.2 TCP CM TCP_UDATA Header

All messages that don't originate from the Connection Manager are sent as TCP_UDATA. The user data is preceded by the TCP CM header with type TCP_UDATA.

7.1.2 TCP CM Connection Supervision Protocol

The two endpoints of a connection send TCP_PING headers to one another every configurable amount of milliseconds (default is 1000). When an endpoint receives a TCP_PING header, it will respond by sending a TCP_PONG header to the peer. If the connection goes down in any way, this will be detected and the CM will report this to the upper layer.