TCPLOG (JANUS DEFINE parameter)

From m204wiki
Jump to navigation Jump to search

TCPLOG filename — Log TCP activity to flatfile

TCPLOG is a parameter on JANUS DEFINE, which defines and sets characteristics of a Janus port.

A Janus Web Server port definition parameter, TCPLOG tells Janus Web Server to log in a sequential dataset all inbound and outbound TCP data transmitted for this port. The dataset name is specified as the value that follows the TCPLOG keyword.

The log file is opened and cleared when the associated Janus port is started, and it is closed when the port is stopped or if an error occurs writing data to the dataset.

The log data is written in variable length blocks. The first four bytes of a block contain the length of the block. Each block contains at least one record. No character translation or formatting is done for the actual TCP data. Since the blocks are standard variable length blocks, they all start with a Block Descriptor Word (BDW) which consists of a halfword block length followed by two bytes of zero.

The layout of the records in each block is described in detail below:

OffsetLengthTypeDescription
02Unsigned binaryRDW (Record descriptor word): the length of the current record
22UnusedUnused
48Unsigned binaryUnique TCP connection number
124Unsigned binaryRecord number
168Unsigned binaryTime of day in clock units
244Unsigned binaryRemote IP address
284Unsigned binaryLocal IP address
322Unsigned binaryRemote port number
342Unsigned binaryLocal port number
361EBCDIC characterDirection: S (Sent) or R (Received)
371UnusedUnused
382Unsigned binaryLength of TCP data
40vBinaryAny TCP data

The TCPLOG dataset cannot be shared by multiple Janus ports.

The TCPLOG parameter is valid only for WEBSERV ports.

See also