
Microtronix Access User Guide
●
The TCP application scans received message content to determine boundaries, and application
messages contain such boundary indicators. - OR – The X.25 application does not send
messages larger than the TCP maximum segment size, and the TCP application reads
messages in a single TCP socket read.
●
The TCP application sends a message with a single write operation to the TCP socket so that
the message is contained within a single TCP data packet.
●
Messages sent by the TCP application do not exceed the negotiated maximum segment size
(MSS) of the TCP session to ensure the message is contained within a single TCP packet. This
is usually 1460 bytes.
●
Command / response handshake. The application does not send the next message until the
other side has received the previous one and acknowledged it with its own message.
If any requirement is not met, message fragmentation and/or merging will occur and cause errors in the
application.
Application message handling by the X.25/TCP Gateway:
●
An application message contained within an X.25 packet without More-bit is sent in a single
TCP write.
●
An application message split across a sequence of X.25 packets with M-bit is accumulated until
the last packet of the sequence without M-bit is received, then sent in a single TCP write.
●
An application message smaller than the X.25 maximum packet size contained within a single
TCP packet is delivered as a single X.25 packet.
●
An application message larger than the X.25 maximum packet size contained within a single
TCP packet is delivered as a sequence of packets with M-bit except the last packet in the
sequence.
This prevents merging of messages into the same More-bit sequence of data packets. When merging
occurs, X.25 applications often treat the concatenated messages as a single invalid message, or ignore
the “trailing” data on the end of the first valid message.
s in one piece for a single read by the X.25/TCP gateway. This prevents fragmentation of the message
across multiple X.25 More-bit data sequences. Applications often treat the first fragment as an invalid
(short) message, and the following fragments as invalid message types.
11.3 MBIT
This method guarantees message boundaries. Messages received in X.25 More-bit sequence of data
packets are transmitted by the X.25/TCP gateway to the TCP side with a header prefixed to the
message. This 2-byte header consists of the message length encoded in network format (MSB first,
LSB second). The TCP application is expected to read the 2 byte header, then issue another read of
the decoded length to receive the discreet and entire message as original transmitted. Conversely,
when the TCP application sends a message, it must first write the expected length of the message in
the same 2-byte format before writing the message. It doesn't matter if the application writes the
message in a single or multiple operations, or if multiple messages are sent in the same write
operation. It is essential that the length header is exactly correct. The X.25/TCP gateway reads the 2-
byte header for length, and then transmits the message (without the header) toward X.25 as a More-bit
sequence of packets.
MBIT message format:
78