図 4.1 から図 4.4
図 4.1: SYN (ACK なし)
ネットワークから ACK なしの SYN が到着した場合の処理を示すフロー図である。
_______
/ Begin \
\_______/
|
_V_
.' '.
.' '.
.' S1, S2, R '.
.' ? '.
:___________________: 1,1,1 _________
__________ | | | | (states 4-6) | |
|Treat as a| 1,0,1 | | | '------------->| error 6 |-->.
|duplicate.|<-----------' | | |_________| |
|Retransmit| | | 1.0,0 |
|SYN, ACK | 0,0,0 | | (Syn sent) ________________ |
|__________| (listening) | '------------>|Collision: Clear| |
| | |S1, set timeout,| |
| _____________________V________________ |remove SYN from |-->|
| |Set R=S1=1. If U=1 set foreign socket | |retransmit queue| |
| |in TCB to match packet local socket. | |________________| |
| |Send SYN, ACK. Signal OPH. Fill in TCB| |
| |with send window, receive sequence #. | |
| |______________________________________| |
| | |
| | |
'----------------------->|<---------------------------------------'
___V__
/ Done \
\______/
図 4.2: SYN,ACK
ネットワークから SYN,ACK が到着した場合の処理を示すフロー図である。
_______
/ Begin \
\_______/
|
__V__
.' '.
.' State 2 '. no
'.S1=1;S2=R=0.'----------------.
'. ? .' |
'.___.' |
| yes |
__V__ _______V______
.' ACK '. no | |
.' correct '.-------->| send error 6 |
'. ? .' |______________|
'.___.' |
| yes |
_________V_________ |
|Set S2=R=1. Process| |
|ACK. Send ACK. | |
|___________________| |
| |
|<----------------------'
___V__
/ Done \
\______/
図 4.3: INT (ネットワークから)
ネットワークから INT が到着した場合の処理を示すフロー図である。
_______ ____________
/ Begin \____\|Process ACK |
\_______/ /|(may set S2)|------.
|____________| |
|
__V__
____________ .' in '.
| Discard | no .' state 4 '.
.<-------| (or queue) |<-------'. S1=S2=R=1 .'
| |____________| '. F=0 ? .'
| '.___.'
| | yes
| __V__
| ____________ .' '.
| | ACK and | no .' within '.
|<-------| discard |<-------'. window .'
| |____________| '. ? .'
| '.___.'
| | yes
| ____________________________V_______________
| |Move Receive Left window edge to sequence |
| |number of INT. Return event 10 with any |
| |pending Receive buffers. Ruturn event 11 to |
| |user. Send ACK for INT. |
| |____________________________________________|
| |
| __V__
| see yes .'data '.
| Figure<----------.' in this '.
| 2.2 '.packet?.'
| '.___.'
| | no
'------------------------------------>|
___V__
/ Done \
\______/
図 4.4: FIN
ネットワークから FIN が到着した場合の処理を示すフロー図である。
_______ ____________
/ Begin \____\|Process ACK |
\_______/ /|(may set S2)|------.
|____________| |
|
__V__
.' '.
no .'S1=S2=R=1'.
.--------------'. (estab- .'
| '.lished).'
| '.___.'
| | yes
| __V__
______V_____ .' '.
| | no .' within '.
.-----------------| discard |<-------'. window .'
| |____________| '. ? .'
| '.___.'
| | yes
| __V__
| (state 4) 0 .'F bit'. 1 (state 5)
| .------------'. value .'------------.
| | '.___.' |
| _________________________V________ |
| |Return all user buffers (event 12)| _____________________V__
| |Clear all packet queues. Send FIN | |Return success to User's|
| |packet. Set F=1. Inform user | |CLOSE. Remove TCB. |
| |"connection closing" (event 12) | |________________________|
| |__________________________________| |
| | |
'----------------->|<-----------------------------------'
___V__
/ Done \
\______/