[ Pobierz całość w formacie PDF ]
.SEQ - segment sequence numberSEG.ACK - segment acknowledgment numberSEG.LEN - segment lengthSEG.WND - segment windowSEG.UP - segment urgent pointerSEG.PRC - segment precedence valueA connection progresses through a series of states during itslifetime.The states are: LISTEN, SYN-SENT, SYN-RECEIVED,ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, LAST-ACK,TIME-WAIT, and the fictional state CLOSED.CLOSED is fictionalbecause it represents the state when there is no TCB, and therefore,no connection.Briefly the meanings of the states are:LISTEN - represents waiting for a connection request from any remoteTCP and port.SYN-SENT - represents waiting for a matching connection requestafter having sent a connection request.SYN-RECEIVED - represents waiting for a confirming connectionrequest acknowledgment after having both received and sent aconnection request.ESTABLISHED - represents an open connection, data received can bedelivered to the user.The normal state for the data transfer phaseof the connection.FIN-WAIT-1 - represents waiting for a connection termination requestfrom the remote TCP, or an acknowledgment of the connectiontermination request previously sent.FIN-WAIT-2 - represents waiting for a connection termination requestfrom the remote TCP.CLOSE-WAIT - represents waiting for a connection termination requestfrom the local user.CLOSING - represents waiting for a connection termination requestacknowledgment from the remote TCP.LAST-ACK - represents waiting for an acknowledgment of theconnection termination request previously sent to the remote TCP(which includes an acknowledgment of its connection terminationrequest).[Page 21]September 1981Transmission Control ProtocolFunctional SpecificationTIME-WAIT - represents waiting for enough time to pass to be surethe remote TCP received the acknowledgment of its connectiontermination request.CLOSED - represents no connection state at all.A TCP connection progresses from one state to another in response toevents.The events are the user calls, OPEN, SEND, RECEIVE, CLOSE,ABORT, and STATUS; the incoming segments, particularly thosecontaining the SYN, ACK, RST and FIN flags; and timeouts.The state diagram in figure 6 illustrates only state changes, togetherwith the causing events and resulting actions, but addresses neithererror conditions nor actions which are not connected with statechanges.In a later section, more detail is offered with respect tothe reaction of the TCP to events.NOTE BENE: this diagram is only a summary and must not be taken asthe total specification.[Page 22]September 1981Transmission Control ProtocolFunctional Specification+---------+ ---------\ active OPEN| CLOSED | \ -----------+---------+| CLOSED |+---------+ +---------+TCP Connection State DiagramFigure 6.[Page 23]September 1981Transmission Control ProtocolFunctional Specification3.3.Sequence NumbersA fundamental notion in the design is that every octet of data sentover a TCP connection has a sequence number.Since every octet issequenced, each of them can be acknowledged.The acknowledgmentmechanism employed is cumulative so that an acknowledgment of sequencenumber X indicates that all octets up to but not including X have beenreceived.This mechanism allows for straight-forward duplicatedetection in the presence of retransmission.Numbering of octetswithin a segment is that the first data octet immediately followingthe header is the lowest numbered, and the following octets arenumbered consecutively.It is essential to remember that the actual sequence number space isfinite, though very large.This space ranges from 0 to 2**32 - 1.Since the space is finite, all arithmetic dealing with sequencenumbers must be performed modulo 2**32.This unsigned arithmeticpreserves the relationship of sequence numbers as they cycle from2**32 - 1 to 0 again.There are some subtleties to computer moduloarithmetic, so great care should be taken in programming thecomparison of such values.The symbol "=
[ Pobierz całość w formacie PDF ]