ArpaTCPStates.mesa
Copyright (C) 1984 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 26, 1983 4:34 pm
Last Edited by: Taft, January 4, 1984 11:09 am
Doug Terry, August 27, 1987 1:57:06 pm PDT
John Larson, April 14, 1986 11:19:47 pm PST
DIRECTORY
ArpaIP USING [Buffers],
ArpaTCP USING [Reason, TCPInfo],
ArpaTCPOps USING [TCPHandle];
ArpaTCPStates: CEDAR DEFINITIONS
~ BEGIN
Open: PROC [tcpInfo: ArpaTCP.TCPInfo] RETURNS [handle: ArpaTCPOps.TCPHandle];
Attempts to open a new TCP connection. Returns a TCPHandle to use or raises ArpaTCP.OpenFailed if the Open request conflicts with an existing request or is a duplicate Open request on the same connection. The connection is open either in the LISTEN or SYNSENT state. In the LISTEN state, wait for a SYN from the remote TCP; in the SYNSENT state, send a SYN to initiate the connection. If an Open call is done to open a connection in the LISTEN state, then another Open call can be done to send the SYN and put the connection in the SYNSENT state.
Close: PROC [handle: ArpaTCPOps.TCPHandle];
Close the TCP connection; raises an error if the connection does not exist or is already closing. Sends a FIN to the remote TCP. Note that the user may receive more data from the remote TCP after calling Close.
Abort: PROC [handle: ArpaTCPOps.TCPHandle];
Abort the connection. This routine sends a TCP Reset if necessary; it calls CloseConnection to dispose of all the connection specific storage.
CloseConnection: PROC [handle: ArpaTCPOps.TCPHandle, reason: ArpaTCP.Reason];
Clear off the transmit and retransmit queues and remove this handle form the list.
ValidHandle: PROC [handle: ArpaTCPOps.TCPHandle];
Check if handle given as argument by user is valid. Called by Abort, Close, and Send. Raises ArpaTCP.StreamClosing if bad handle, else it just returns.
FindHandle: PROC [rcvdDatagram: ArpaIP.Buffers] RETURNS [handle: ArpaTCPOps.TCPHandle];
Find matching handle for segment received from the net.
CopyHandleList: PROC RETURNS [handleListCopy: LIST OF REF ANY];
Make a copy of the handle list for the retransmit procedure to look at.
GetInitialSequenceNumber: PROC RETURNS [INT];
Generate an initial send sequence number for a connection.
END.