TCP Headers
Overview
JBM Electronics Co. has developed a set of
headers to provide a mechanism for bridging the different characteristics between the "frame-type"
data of a polled legacy protocol and the "stream-type" data of a TCP/IP connection. The headers
pass information between a customer-developed application and the Gateway. The header is stripped
before the data is sent to the serial device.
The Gateways support different types of
headers: Standard, Extended 1, Extended 2 and Custom. The header type is selected through
the TCP Port definition on the Configuration Menus.
We provide an expanded theory of operation,
examples of header (status) processing logic and example code which can be used as a guide when
adding support for our headers to a TCP application. This code will simplify the effort
necessary to support the headers. The available information is:
Standard Headers
The Standard Header is a bare-bones block-to-stream
conversion aid, consisting simply of a two byte length field preceding the data. The headers allows the
TCP application (or Gateway) to assemble the entire message before processing. The inbound (serial) data
is assembled at the port and then transferred to the TCP application.
The header sent by the TCP application is used
by the Gateway to assemble the message prior to transfer to the serial port. Once the serial port has
received the message, it can be sent to the remote device using normal protocol handling.
| BYTE |
FIELD |
DESCRIPTION |
| 0 |
Block Length (MSB) |
'Block' length attribute, two byte binary value sent in network byte order (MSB first). The data following will be text. |
| 1 |
Block Length (LSB) |
Extended Headers - Type I
The Extended Header expands the Standard Header
by adding status data. The additional information provides for more control over the connection by
the TCP application.
The Type 1 Extended Header is intended
to be used between two Port Controllers supporting multiple (sub)addresses. It
conforms to the following format:
| BYTE |
BIT(s) |
FIELD |
DESCRIPTION |
| 0 |
7-0 |
Block Length (MSB) |
'Block' length attribute, two byte binary
value sent in network byte order (MSB first). |
| 1 |
7-0 |
Block Length (LSB) |
| 2 |
7-6 |
Reserved |
Reserved. |
| 5-4 |
Confirmation |
This field
is used to coordinate end-to-end delivery confirmation operations.
It is not necessarily supported by all Port Controllers.
The following values have been defined:
| 00 |
- No Confirmation required. |
| 01 |
- Confirmation requested. |
| 10 |
- Positive confirmation response. |
| 11 |
- Negative confirmation response. |
|
| 3-0 |
Data Type |
This field is used to identify the type of data being
carried within the message, for those protocols that support the notion and for those Port Controllers
capable of detecting and reporting it. The following values have been defined:
| 0000 |
- Undefined. |
| 0001 |
- Bisync 3270. |
| 0010 |
- Raw Binary. |
| 0011 |
- SCS (SNA Character Set). |
| 0100 |
- SNA 3270. |
| 0101 |
- SNA 5250. |
| 0110 |
- UTS. |
All other values are reserved. |
| 3 |
7-4 |
Data Encoding |
This field is used to identify the manner in which
the data is encoded, for those protocols that support the notion and for those Port Controllers capable
of detecting and reporting it. The following values have been defined:
| 0000 |
- Unencoded. |
| 0001 |
- ASCII. |
| 0010 |
- BCD. |
| 0011 |
- Compressed. |
| 0100 |
- EBCD. |
| 0101 |
- EBCDIC. |
All other values are reserved. |
| 3-2 |
Message Mode |
This field is used to identify the mode of the
message, for those protocols that support the notion and for those Port Controllers capable of detecting
and reporting it. The following values have been defined:
| 00 |
- Non-Modal. |
| 01 |
- Formatted. |
| 10 |
- Unformatted. |
| 11 |
- Status. |
The status mode is
the method by which applications can interact with low-level mechanisms within the Gateway software.
Click here to view the status message format. |
| 1-0 |
Block Indicator |
This field is used to identify the block
position of the message, in relation to past and future blocks, for those protocols that support
the notion and for those Port Controllers capable of detecting and reporting it. The following
values have been defined:
| 00 |
- Middle. |
| 01 |
- First. |
| 10 |
- Last. |
| 11 |
- Only (First and Last). | |
Status Message Example Exchanges for Type 1
Headers are available though this link.
Extended Header - Type 2
The Type 2 Extended Header is intended
to be used with a two Port Controller supporting only a single (sub)addresses. The effect of
multiple channels of communication is achieved by embedding addressing information into the header
itself, which requires that this header type be used in configuration including a JBM Multiplexing
Dynamic Router. The header then conforms to the following format:
| BYTE |
BIT(s) |
FIELD |
DESCRIPTION |
| 0 |
7-0 |
Block Length (MSB) |
'Block' length attribute, two byte
binary value sent in network byte order (MSB first). |
| 1 |
7-0 |
Block Length (LSB) |
| 2 |
7-6 |
Reserved |
Reserved. |
| 5-4 |
Confirmation |
This field is used to coordinate end-to-end
delivery confirmation operations. It is not necessarily supported by all Port Controllers.
The following values have been defined:
| 00 |
- No Confirmation required. |
| 01 |
- Confirmation requested. |
| 10 |
- Positive confirmation response. |
| 11 |
- Negative confirmation response. |
|
| 3-0 |
Data Type |
This field is used to identify the type of data being
carried within the message, for those protocols that support the notion and for those Port Controllers
capable of detecting and reporting it. The following values have been defined:
| 0000 |
- Undefined. |
| 0001 |
- Bisync 3270. |
| 0010 |
- Raw Binary. |
| 0011 |
- SCS (SNA Character Set). |
| 0100 |
- SNA 3270. |
| 0101 |
- SNA 5250. |
| 0110 |
- UTS. |
All other values are reserved. |
| 3 |
7-4 |
Data Encoding |
This field is used to identify the manner in
which the data is encoded, for those protocols that support the notion and for those Port Controllers
capable of detecting and reporting it. The following values have been defined:
| 0000 |
- Unencoded. |
| 0001 |
- ASCII. |
| 0010 |
- BCD. |
| 0011 |
- Compressed. |
| 0100 |
- EBCD. |
| 0101 |
- EBCDIC. |
All other values are reserved. |
| 3-2 |
Message Mode |
This field is used to identify the mode of the message,
for those protocols that support the notion and for those Port Controllers capable of detecting and reporting
it. The following values have been defined:
| 00 |
- Non-Modal. |
| 01 |
- Formatted. |
| 10 |
- Unformatted. |
| 11 |
- Status. |
The status mode
is the method by which applications can interact with low-level mechanisms within the
Gateway software. Click here to view the status message format. |
| 1-0 |
Block Indicator |
This field is used to identify the block
position of the message, in relation to past and future blocks, for those protocols that support
the notion and for those Port Controllers capable of detecting and reporting it. The
following values have been defined:
| 00 |
- Middle. |
| 01 |
- First. |
| 10 |
- Last. |
| 11 |
- Only (First and Last). |
|
| 4 |
7-0 |
Poll Code 1 |
ASCII character used to identify a target device.
Corresponds to Multiplexing Dynamic Router Group Member (slave) Address 1. |
| 5 |
7-0 |
Poll Code 2 |
ASCII character used to identify a target device.
Corresponds to Multiplexing Dynamic Router Group Member (slave) Address 2. |
Status Message Example Exchanges for Type
2 Headers are available though this link.
Custom Headers
The Custom Headers use the Extended Headers
as a base and are specifically designed for individual situations. Additional bytes are assigned
for address mapping, enhanced information and control. With the Custom Headers, the Gateway can
communicate with a TCP/IP application to provide message delivery validation, port status and
other information. These headers also support the embedding of the serial addresses so that
one TCP session can support many serial addresses. This capability of the custom header can
eliminate extra traffic, reduce server overhead and simplify control of the network. Contact
JBM Electronics for further information.
Printer friendly (Adobe Acrobat) version of this document.
If you have any questions on the headers, please
e-mail us at: support@jbmelectronics.com
|