ArpaTCPLogging.mesa
Copyright (C) 1983 by Xerox Corporation. All rights reserved. The following program was created in 1983 but has not been published within the meaning of the copyright law, is furnished under license, and may not be used, copied and/or disclosed except in accordance with the terms of said license.
Last Edited by: Nichols, August 23, 1983 11:40 pm
Last Edited by: Taft, January 4, 1984 12:56 pm
Last Edited by: HGM, March 23, 1984 3:59:43 am PST
Doug Terry, August 27, 1987 1:51:38 pm PDT
John Larson, April 14, 1986 11:19:06 pm PST
DIRECTORY
Arpa USING [Address],
ArpaIP USING [Buffers],
ArpaTCPOps USING [ConnectionState, TCPHandle],
IO USING [STREAM],
Rope USING [ROPE];
ArpaTCPLogging: CEDAR DEFINITIONS
~ BEGIN
Direction: TYPE ~ {fromNet, toNet, rexmitToNet};
pktFile, logFile: IO.STREAM; -- make non-NIL to enable logging
addrToWatch: Arpa.Address; -- Address to watch. Arpa.nullAddress will disable logging, [255,255,255,255] to watch all.
PrintTCPPacket: PROC [handle: ArpaTCPOps.TCPHandle, data: ArpaIP.Buffers, 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: ArpaTCPOps.TCPHandle, newState: ArpaTCPOps.ConnectionState];
Print or log state transitions.
PrintMessage: PROC [r: Rope.ROPE];
PrintMessageWithSrc: PROC [r: Rope.ROPE, sourceAddr: Arpa.Address];
END.