User guide
32 DC 900-1303C
Freeway Client-Server Interface Control Document
2.3.1 TSI Header Format
The TSI header precedes all data sent over the BSD socket. If the client application is
using the TSI, it does not need to construct this header; the TSI library routine will con-
struct it and add it to the beginning of the buffer passed to the
tWrite routine. Client
applications not using the TSI must build this header for every packet sent to the server
via the BSD socket. The TSI header must be in network byte order (big-endian).
The fields in the TSI header are as follows:
Header Length (4 bytes)
This field indicates the length of the TSI header from the Header Length field to
the Last Segment field, inclusive. Normally, this field contains 20 (decimal). How-
ever, Simpact TSI software is subject to change.
Data Length (4 bytes)
This field indicates the length of the data area following the TSI header. The sum
of the header length and the data length is the total length of a TSI packet. The
valid range of this field is 1 to the
maxBufSize parameter specified in the TSI con-
figuration file.
Sequence Number (4 bytes)
This field contains a sequential number that is produced by the sender of the
packet. This value is an unsigned integer. This field is only unique within one TSI
application in one direction; no validation is performed by TSI on this field.
TSI Header
Header Length 4 bytes
Data Length 4 bytes
Sequence Number 4 bytes
Packet Type 2 bytes
Command 2 bytes
First Segment 2 bytes
Last Segment 2 bytes