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.
TCPTransmit.mesa
Last Edited by: Nichols, August 24, 1983 6:36 pm
Last Edited by: Taft, January 4, 1984 11:11 am
Hal Murray June 3, 1985 10:02:34 pm PDT
John Larson, April 14, 1986 11:21:02 pm PST
DIRECTORY
IPDefs USING [DByte, Address],
TCPOps USING [TCPHandle, TCPSendBuffer];
TCPTransmit: CEDAR DEFINITIONS = {
rexmitInterval: INT = 10000; -- retransmit time
rexmitSleepTime: INT = rexmitInterval / 3; -- how long to sleep before looking at rexmit queues
initialTimeout: INT = 60000; -- how long to retransmit SYN before declaring connection dead
rexmitTimeout: INT = 180000; -- how long to retransmit before declaring connection dead
SendSYN: PROC [handle: TCPOps.TCPHandle];
This procedure allocates a segment to send a SYN. It calls SendSegmentToNet to send the SYN segment.
SendFIN: PROC [handle: TCPOps.TCPHandle];
This procedure allocates a segment to send a FIN, queues it on the end of the ToNet queue and then calls TryToSend to send any data on the ToNet queue and the FIN.
SendReset: PROC [handle: TCPOps.TCPHandle, sourcePort, dstnPort: IPDefs.DByte, Dstn: IPDefs.Address, seq, ack: INT];
This procedure is called to send a reset; it sends directly to the network by calling the TCPSend routine; it does not use the TryToSend or SendSegmentToNet routines because resets can be sent when no handle exists.
TryToSend: PROC [handle: TCPOps.TCPHandle];
Called to send as much data as possible from the ToNet queue. Checks window to determine if data can be sent; if data can not be sent, sends an ack only segment. Calls SendSegmentToNet to actually send the data.
TryToSendData: PROC [handle: TCPOps.TCPHandle];
Called to determine if data can be sent; if so, it calls TryToSend. This routine is called when you want to send a segment if and only if data exists; thus it is called when an empty ack packet has been received and more data may be sent or when the user supplies more data to send via the TCPSend routine. TryToSend can't be called directly because it always generates an ack and we don't need acks for the acks.
RemoveAckedSegments: PROC [handle: TCPOps.TCPHandle];
Remove acked segments from retransmit queue.
RepacketizeandRexmit: PROC [handle: TCPOps.TCPHandle, tcpSendBufferPtr: REF TCPOps.TCPSendBuffer];
This procedure is called to repacketize and retransmit data on the retransmit queue. It is called from CheckRexmitQueues when repacketizing is enabled.
Rexmit: PROC [handle: TCPOps.TCPHandle, tcpSendBufferPtr: REF TCPOps.TCPSendBuffer];
This procedure is called to retransmit a segment on the retransmit queue when Repacketizing is not enabled. It is called from CheckRexmitQueues.
}.