Information Technology Reference
In-Depth Information
Acknowledgements - packets contain an acknowledgement number, which is the se-
quence number of the next expected transmitted data byte in the reverse direction. On
sending, a host stores the transmitted data in a storage buffer, and starts a timer. If the
packet is acknowledged then this data is deleted, else, if no acknowledgement is re-
ceived before the timer runs out, the packet is retransmitted.
Window - with this, a host sends a window value which specifies the number of bytes,
starting with the acknowledgement number, that the host can receive.
24.4.1 Connection establishment, clearing and data transmission
The main interfaces in TCP are shown in Figure 24.4. The calls from the application program
to TCP include:
OPEN and CLOSE - to open and close a connection.
SEND and RECEIVE - to send and receive.
STATUS - to receive status information.
OPEN() SEND()
RECEIVE()
CLOSE()
ABORT()
STATUS()
TCP Interface
States:
LISTEN
SYN-SENT
SYN-RECEIVED
ESTABLISHED
FIN-WAIT1
FIN-WAIT2
CLOSE-WAIT
CLOSING
LAST-ACK
TIME-WAIT
TCP
RST
flag
SYN
flag
ACK
flag
FIN
flag
PUSH
flag
Src
Port
Dest
Port
Seq.
No.
Ack
No.
Check
Sum
DATA
IP
Figure 24.4 TCP interface
The OPEN call initiates a connection with a local port and foreign socket arguments. A
transmission control block (TCB) stores the information on the connection. After a success-
ful connection, TCP adds a local connection name by which the application program refers to
the connection in subsequent calls.
The OPEN call supports two different types of call, as illustrated in Figure 24.5. These
are:
Passive OPEN - TCP waits for a connection from a foreign host, such as from an active
OPEN. In this case, the foreign socket is defined by a zero. This is typically used by
Search WWH ::




Custom Search