4. Overall Packet Format
The entire encapsulated packet has the following format:
---------------------------------
| |
| IP Header |
| |
---------------------------------
| |
| TCP Header |
| |
---------------------------------
| |
| XOT Header |
| |
---------------------------------
| |
| X.25 Packet |
| |
---------------------------------
RFC convention is that a packet format is represented graphically with the data sent first above the data sent later. This convention is followed in this document, and therefore, while we refer to X.25 being transported over TCP, we draw the packet format with the X.25 portion of the packet lower on the page than the TCP portion.
4.1 XOT Header
The XOT header has the format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Version (2 octets)
The version number of the XOT protocol is encoded in the first two octets. The version number MUST be 0. Other values of this field are reserved for future use. If a value other than 0 is received, then the TCP connection MUST be closed.
Length (2 octets)
The length of the X.25 packet is encoded in the second two octets. Values must be legal X.25 packet lengths. If the Length field has an illegal value, then the TCP connection MUST be closed.