File size: 2,954 Bytes
c3edc81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
{
    "states": [
      "CLOSED",
      "LISTEN",
      "SYN_SENT",
      "SYN_RCVD",
      "ESTAB",
      "FIN_WAIT-1",
      "FIN_WAIT-2",
      "CLOSING",
      "TIME-WAIT",
      "CLOSE_WAIT",
      "LAST-ACK"
    ],
    "initial_state": "CLOSED",
    "final_states": [
      "CLOSED"
    ],
    "transitions": [
      {
        "from": "CLOSED",
        "event": "passive OPEN",
        "action": "create TCB",
        "to": "LISTEN"
      },
      {
        "from": "CLOSED",
        "event": "active OPEN",
        "action": "create TCB; send SYN",
        "to": "SYN_SENT"
      },
      {
        "from": "LISTEN",
        "event": "receive SYN",
        "action": "send SYN, ACK",
        "to": "SYN_RCVD"
      },
      {
        "from": "LISTEN",
        "event": "send SYN",
        "action": "send SYN",
        "to": "SYN_SENT"
      },
      {
        "from": "LISTEN",
        "event": "CLOSE",
        "action": "delete TCB",
        "to": "CLOSED"
      },
      {
        "from": "SYN_SENT",
        "event": "receive SYN",
        "action": "send SYN, ACK",
        "to": "SYN_RCVD"
      },
      {
        "from": "SYN_SENT",
        "event": "receive SYN, ACK",
        "action": "send ACK",
        "to": "ESTAB"
      },
      {
        "from": "SYN_SENT",
        "event": "CLOSE",
        "action": "delete TCB",
        "to": "CLOSED"
      },
      {
        "from": "SYN_RCVD",
        "event": "receive ACK of SYN",
        "action": "",
        "to": "ESTAB"
      },
      {
        "from": "SYN_RCVD",
        "event": "CLOSE",
        "action": "send FIN",
        "to": "FIN_WAIT-1"
      },
      {
        "from": "SYN_RCVD",
        "event": "rcv RST (note1)",
        "action": "",
        "to": "LISTEN"
      },
      {
        "from": "ESTAB",
        "event": "CLOSE",
        "action": "send FIN",
        "to": "FIN_WAIT-1"
      },
      {
        "from": "ESTAB",
        "event": "receive FIN",
        "action": "send ACK",
        "to": "CLOSE_WAIT"
      },
      {
        "from": "FIN_WAIT-1",
        "event": "receive FIN",
        "action": "send ACK",
        "to": "CLOSING"
      },
      {
        "from": "FIN_WAIT-1",
        "event": "receive ACK of FIN",
        "action": "",
        "to": "FIN_WAIT-2"
      },
      {
        "from": "FIN_WAIT-2",
        "event": "receive FIN",
        "action": "send ACK",
        "to": "TIME-WAIT"
      },
      {
        "from": "CLOSING",
        "event": "receive ACK of FIN",
        "action": "",
        "to": "TIME-WAIT"
      },
      {
        "from": "TIME-WAIT",
        "event": "Timeout=2MSL",
        "action": "delete TCB",
        "to": "CLOSED"
      },
      {
        "from": "CLOSE_WAIT",
        "event": "CLOSE",
        "action": "send FIN",
        "to": "LAST-ACK"
      },
      {
        "from": "LAST-ACK",
        "event": "receive ACK of FIN",
        "action": "delete TCB",
        "to": "CLOSED"
      }
    ]
  }