{
  "states": [
    "Idle",
    "Connect",
    "Active",
    "OpenSent",
    "OpenConfirm",
    "Established"
  ],
  "initial_state": "Idle",
  "final_states": [
    "Idle"
  ],
  "transitions": [
    {
      "from": "Idle",
      "event": "ManualStart",
      "action": "initialize resources",
      "to": "Connect"
    },
    {
      "from": "Idle",
      "event": "AutomaticStart",
      "action": "initialize resources",
      "to": "Connect"
    },
    {
      "from": "Idle",
      "event": "ManualStart_with_PassiveTcpEstablishment",
      "action": "initialize resources",
      "to": "Active"
    },
    {
      "from": "Idle",
      "event": "AutomaticStart_with_PassiveTcpEstablishment",
      "action": "initialize resources",
      "to": "Active"
    },
    {
      "from": "Connect",
      "event": "ManualStop",
      "action": "drop connection",
      "to": "Idle"
    },
    {
      "from": "Connect",
      "event": "ConnectRetryTimer_Expires",
      "action": "restart timer",
      "to": "Connect"
    },
    {
      "from": "Connect",
      "event": "DelayOpenTimer_Expires",
      "action": "send OPEN",
      "to": "OpenSent"
    },
    {
      "from": "Connect",
      "event": "TcpConnection_Valid",
      "action": "process connection",
      "to": "Connect"
    },
    {
      "from": "Connect",
      "event": "Tcp_CR_Invalid",
      "action": "reject connection",
      "to": "Connect"
    },
    {
      "from": "Connect",
      "event": "TcpConnectionFails",
      "action": "release resources",
      "to": "Idle"
    },
    {
      "from": "Active",
      "event": "ManualStop",
      "action": "drop connection",
      "to": "Idle"
    },
    {
      "from": "Active",
      "event": "ConnectRetryTimer_Expires",
      "action": "restart timer",
      "to": "Connect"
    },
    {
      "from": "Active",
      "event": "DelayOpenTimer_Expires",
      "action": "send OPEN",
      "to": "OpenSent"
    },
    {
      "from": "Active",
      "event": "TcpConnection_Valid",
      "action": "process connection",
      "to": "Active"
    },
    {
      "from": "Active",
      "event": "Tcp_CR_Invalid",
      "action": "reject connection",
      "to": "Active"
    },
    {
      "from": "Active",
      "event": "TcpConnectionFails",
      "action": "release resources",
      "to": "Idle"
    },
    {
      "from": "OpenSent",
      "event": "ManualStop",
      "action": "send NOTIFICATION",
      "to": "Idle"
    },
    {
      "from": "OpenSent",
      "event": "HoldTimer_Expires",
      "action": "send NOTIFICATION",
      "to": "Idle"
    },
    {
      "from": "OpenSent",
      "event": "TcpConnectionFails",
      "action": "restart timer",
      "to": "Active"
    },
    {
      "from": "OpenSent",
      "event": "BGPOpen",
      "action": "send KEEPALIVE",
      "to": "OpenConfirm"
    },
    {
      "from": "OpenConfirm",
      "event": "ManualStop",
      "action": "send NOTIFICATION",
      "to": "Idle"
    },
    {
      "from": "OpenConfirm",
      "event": "HoldTimer_Expires",
      "action": "send NOTIFICATION",
      "to": "Idle"
    },
    {
      "from": "OpenConfirm",
      "event": "KeepaliveTimer_Expires",
      "action": "send KEEPALIVE",
      "to": "OpenConfirm"
    },
    {
      "from": "OpenConfirm",
      "event": "KeepAliveMsg",
      "action": "restart timer",
      "to": "Established"
    },
    {
      "from": "Established",
      "event": "ManualStop",
      "action": "send NOTIFICATION",
      "to": "Idle"
    },
    {
      "from": "Established",
      "event": "HoldTimer_Expires",
      "action": "send NOTIFICATION",
      "to": "Idle"
    },
    {
      "from": "Established",
      "event": "KeepaliveTimer_Expires",
      "action": "send KEEPALIVE",
      "to": "Established"
    },
    {
      "from": "Established",
      "event": "KeepAliveMsg",
      "action": "restart timer",
      "to": "Established"
    },
    {
      "from": "Established",
      "event": "UpdateMsg",
      "action": "process message",
      "to": "Established"
    },
    {
      "from": "Established",
      "event": "receive UPDATE",
      "action": "validate fields",
      "to": "Established"
    },
    {
      "from": "Established",
      "event": "receive UPDATE with WITHDRAWN ROUTES",
      "action": "remove routes",
      "to": "Established"
    },
    {
      "from": "Established",
      "event": "receive UPDATE with feasible route",
      "action": "update Adj-RIB-In",
      "to": "Established"
    }
  ]
}