{
  "states": [
    "CLOSED",
    "LISTEN",
    "SYN_SENT",
    "SYN_RECEIVED",
    "ESTABLISHED",
    "FIN_WAIT_1",
    "FIN_WAIT_2",
    "CLOSE_WAIT",
    "CLOSING",
    "LAST_ACK",
    "TIME_WAIT"
  ],
  "initial_state": "CLOSED",
  "final_states": [],
  "transitions": [
    {
      "from": "CLOSED",
      "event": "cond active_open",
      "action": "send SYN",
      "to": "SYN_SENT"
    },
    {
      "from": "LISTEN",
      "event": "receive SYN",
      "action": "send SYN_ACK",
      "to": "SYN_RECEIVED"
    },
    {
      "from": "SYN_SENT",
      "event": "receive SYN_ACK",
      "action": "send ACK",
      "to": "ESTABLISHED"
    },
    {
      "from": "SYN_RECEIVED",
      "event": "receive ACK",
      "action": "log none",
      "to": "ESTABLISHED"
    },
    {
      "from": "ESTABLISHED",
      "event": "send FIN",
      "action": "send FIN",
      "to": "FIN_WAIT_1"
    },
    {
      "from": "FIN_WAIT_1",
      "event": "receive ACK",
      "action": "log none",
      "to": "FIN_WAIT_2"
    },
    {
      "from": "FIN_WAIT_1",
      "event": "receive FIN",
      "action": "send ACK",
      "to": "CLOSING"
    },
    {
      "from": "FIN_WAIT_2",
      "event": "receive FIN",
      "action": "send ACK",
      "to": "TIME_WAIT"
    },
    {
      "from": "ESTABLISHED",
      "event": "receive FIN",
      "action": "send ACK",
      "to": "CLOSE_WAIT"
    },
    {
      "from": "CLOSE_WAIT",
      "event": "send FIN",
      "action": "send FIN",
      "to": "LAST_ACK"
    },
    {
      "from": "CLOSING",
      "event": "receive ACK",
      "action": "log none",
      "to": "TIME_WAIT"
    },
    {
      "from": "LAST_ACK",
      "event": "receive ACK",
      "action": "close TCB",
      "to": "CLOSED"
    },
    {
      "from": "TIME_WAIT",
      "event": "timeout 2MSL",
      "action": "close TCB",
      "to": "CLOSED"
    },
    {
      "from": "SYN_RECEIVED",
      "event": "receive RST",
      "action": "set state LISTEN",
      "to": "LISTEN"
    },
    {
      "from": "SYN_SENT",
      "event": "receive RST",
      "action": "close TCB",
      "to": "CLOSED"
    }
  ]
}