Last Edited by: HGM, March 23, 1984 3:59:43 am PST
John Larson, April 14, 1986 11:19:06 pm PST
DIRECTORY
IO USING [STREAM],
IPDefs USING [Datagram],
Rope USING [ROPE],
TCPOps USING [ConnectionState, TCPHandle];
TCPLogging:
CEDAR
DEFINITIONS
~ BEGIN
Direction: TYPE ~ {fromNet, toNet, rexmitToNet};
pktFile, logFile: IO.STREAM; -- make non-NIL to enable logging
PrintTCPPacket:
PROC [handle: TCPOps.TCPHandle, data: IPDefs.Datagram, dir: Direction];
Print or log TCP packets. The following information is printed for each packet:
state of Connection
Received, Sent or Retransmitted (R, S or X)
Control Flags (Urgent, Ack, Push, Reset, SYN, FIN)
Sequence number mod 100000
Ack number mod 100000
Window
length (number of bytes of TCP header and data)
source Address and Port -> Destination Address and Port
PrintStateChange:
PROC [handle: TCPOps.TCPHandle, newState: TCPOps.ConnectionState];
Print or log state transitions.
PrintMessage: PROC [r: Rope.ROPE];
END.