ArpaTCPTransmit.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 24, 1983 6:36 pm
Last Edited by: Taft, January 4, 1984 11:11 am
Demers, September 2, 1988 6:02:41 pm PDT
Doug Terry, October 27, 1987 4:43:23 pm PST
Hal Murray June 3, 1985 10:02:34 pm PDT
John Larson, April 14, 1986 11:21:02 pm PST
DIRECTORY
Arpa USING [Address],
ArpaTCP USING [Port],
ArpaTCPOps USING [Buffer, TCPControlSet, TCPHandle, TCPSendBuffer];
ArpaTCPTransmit:
CEDAR
DEFINITIONS = {
SendSYN:
PROC [handle: ArpaTCPOps.TCPHandle];
This procedure allocates a segment to send a SYN. It calls SendSegmentToNet to send the SYN segment.
SendFIN:
PROC [handle: ArpaTCPOps.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: ArpaTCPOps.TCPHandle, sourcePort, dstnPort: ArpaTCP.Port,
Dstn: Arpa.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.
SendSegment:
PROC [handle: ArpaTCPOps.TCPHandle, sendDatagram: ArpaTCPOps.Buffer, dataByteCount:
INT, ctl: ArpaTCPOps.TCPControlSet];
This function queues the packet on the ToNet queue and if the connection is in a state in which data can be sent, it calls TryToSendData. The caller must ensure that the packet fits in the current TCP send window.
TryToSend:
PROC [handle: ArpaTCPOps.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: ArpaTCPOps.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: ArpaTCPOps.TCPHandle];
Remove acked segments from retransmit queue.
RepacketizeandRexmit:
PROC [handle: ArpaTCPOps.TCPHandle, tcpSendBufferPtr:
REF ArpaTCPOps.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: ArpaTCPOps.TCPHandle, tcpSendBufferPtr:
REF ArpaTCPOps.TCPSendBuffer];
This procedure is called to retransmit a segment on the retransmit queue when Repacketizing is not enabled. It is called from CheckRexmitQueues.
}.