INET Framework for OMNeT++/OMNEST
inet::bgp::fsm Namespace Reference

Functions

 TOPSTATE (TopState)
 
 SUBSTATE (Idle, TopState)
 
 SUBSTATE (Connect, TopState)
 
 SUBSTATE (Active, TopState)
 
 SUBSTATE (OpenSent, TopState)
 
 SUBSTATE (OpenConfirm, TopState)
 
 SUBSTATE (Established, TopState)
 

Function Documentation

◆ SUBSTATE() [1/6]

inet::bgp::fsm::SUBSTATE ( Active  ,
TopState   
)
143  {
144  STATE(Active)
145 
146  void ConnectRetryTimer_Expires() override;
147  void HoldTimer_Expires() override;
148  void KeepaliveTimer_Expires() override;
149  void TcpConnectionConfirmed() override;
150  void TcpConnectionFails() override;
151  void OpenMsgEvent() override;
152  void KeepAliveMsgEvent() override;
153  void UpdateMsgEvent() override;
154 
155  private:
156  void entry() override { EV_STATICCONTEXT; EV_DEBUG << "Active::entry" << std::endl; }
157  void exit() override { EV_STATICCONTEXT; EV_DEBUG << "Active::exit" << std::endl; }
158 };

◆ SUBSTATE() [2/6]

inet::bgp::fsm::SUBSTATE ( Connect  ,
TopState   
)
126  {
127  STATE(Connect)
128 
129  void ConnectRetryTimer_Expires() override;
130  void HoldTimer_Expires() override;
131  void KeepaliveTimer_Expires() override;
132  void TcpConnectionConfirmed() override;
133  void TcpConnectionFails() override;
134  void KeepAliveMsgEvent() override;
135  void UpdateMsgEvent() override;
136 
137  private:
138  void entry() override { EV_STATICCONTEXT; EV_DEBUG << "Connect::entry" << std::endl; }
139  void exit() override { EV_STATICCONTEXT; EV_DEBUG << "Connect::exit" << std::endl; }
140 };

◆ SUBSTATE() [3/6]

inet::bgp::fsm::SUBSTATE ( Established  ,
TopState   
)
195  {
196  STATE(Established)
197 
198  void ConnectRetryTimer_Expires() override;
199  void HoldTimer_Expires() override;
200  void KeepaliveTimer_Expires() override;
201  void TcpConnectionFails() override;
202  void OpenMsgEvent() override;
203  void KeepAliveMsgEvent() override;
204  void UpdateMsgEvent() override;
205 
206  private:
207  void entry() override;
208  void exit() override { EV_STATICCONTEXT; EV_DEBUG << "Established::exit" << std::endl; }
209 };

◆ SUBSTATE() [4/6]

inet::bgp::fsm::SUBSTATE ( Idle  ,
TopState   
)
115  {
116  STATE(Idle)
117 
118  void ManualStart() override;
119 
120  private:
121  void entry() override { EV_STATICCONTEXT; EV_DEBUG << "Idle::entry" << std::endl; }
122  void exit() override { EV_STATICCONTEXT; EV_DEBUG << "Idle::exit" << std::endl; }
123 };

◆ SUBSTATE() [5/6]

inet::bgp::fsm::SUBSTATE ( OpenConfirm  ,
TopState   
)
178  {
179  STATE(OpenConfirm)
180 
181  void ConnectRetryTimer_Expires() override;
182  void HoldTimer_Expires() override;
183  void KeepaliveTimer_Expires() override;
184  void TcpConnectionFails() override;
185  void OpenMsgEvent() override;
186  void KeepAliveMsgEvent() override;
187  void UpdateMsgEvent() override;
188 
189  private:
190  void entry() override { EV_STATICCONTEXT; EV_DEBUG << "OpenConfirm::entry" << std::endl; }
191  void exit() override { EV_STATICCONTEXT; EV_DEBUG << "OpenConfirm::exit" << std::endl; }
192 };

◆ SUBSTATE() [6/6]

inet::bgp::fsm::SUBSTATE ( OpenSent  ,
TopState   
)
161  {
162  STATE(OpenSent)
163 
164  void ConnectRetryTimer_Expires() override;
165  void HoldTimer_Expires() override;
166  void KeepaliveTimer_Expires() override;
167  void TcpConnectionFails() override;
168  void OpenMsgEvent() override;
169  void KeepAliveMsgEvent() override;
170  void UpdateMsgEvent() override;
171 
172  private:
173  void entry() override { EV_STATICCONTEXT; EV_DEBUG << "OpenSent::entry" << std::endl; }
174  void exit() override { EV_STATICCONTEXT; EV_DEBUG << "OpenSent::exit" << std::endl; }
175 };

◆ TOPSTATE()

inet::bgp::fsm::TOPSTATE ( TopState  )
26  {
27  struct Box {
28  Box() : _mod(0) {}
29  Box(BgpSession& session) : _mod(&session) {}
30  BgpSession& getModule() { return *_mod; }
31 
32  private:
33  BgpSession *_mod;
34  };
35 
36  STATE(TopState)
37 
38  // Machine's event protocol
39  // RFC 4271, 8.1.2. Administrative Events
40  // -------------------------------------
41  /*Event 1: ManualStart
42  Definition: Local system administrator manually starts the peer connection.
43  Status: Mandatory*/
44  virtual void ManualStart() {}
45  /*Event 2: ManualStop
46  Definition: Local system administrator manually stops the peer connection.
47  Status: Mandatory*/
48 // virtual void event2() {}
49 
50  // RFC 4271, 8.1.3. Timer Events
51  // -------------------------------------
52  /*Event 9: ConnectRetryTimer_Expires
53  Definition: An event generated when the ConnectRetryTimer
54  expires.
55  Status: Mandatory*/
56  virtual void ConnectRetryTimer_Expires() {}
57  /*Event 10: HoldTimer_Expires
58  Definition: An event generated when the HoldTimer expires.
59  Status: Mandatory*/
60  virtual void HoldTimer_Expires() {}
61  /*Event 11: KeepaliveTimer_Expires
62  Definition: An event generated when the KeepaliveTimer expires.
63  Status: Mandatory*/
64  virtual void KeepaliveTimer_Expires() {}
65 
66  // RFC 4271, 8.1.4. TCP Connection-Based Events
67  // -------------------------------------
68  /*Event 16: Tcp_CR_Acked
69  Definition: Event indicating the local system's request to
70  establish a TCP connection to the remote peer.
71  The local system's TCP connection sent a TCP SYN,
72  received a TCP SYN/ACK message, and sent a TCP ACK.
73  Status: Mandatory*/
74 // virtual void Tcp_CR_Acked() {}
75  /*Event 17: TcpConnectionConfirmed
76  Definition: Event indicating that the local system has received
77  a confirmation that the TCP connection has been
78  established by the remote site.
79  The remote peer's TCP engine sent a TCP SYN. The
80  local peer's TCP engine sent a SYN, ACK message and
81  now has received a final ACK.
82  Status: Mandatory*/
83  virtual void TcpConnectionConfirmed() {}
84  /*Event 18: TcpConnectionFails
85  Definition: Event indicating that the local system has received
86  a TCP connection failure notice.
87  The remote BGP peer's TCP machine could have sent a
88  FIN. The local peer would respond with a FIN-ACK.
89  Another possibility is that the local peer
90  indicated a timeout in the TCP connection and
91  downed the connection.
92  Status: Mandatory*/
93  virtual void TcpConnectionFails() {}
94 
95  // RFC 4271, 8.1.5. BGP Message-Based Events
96  // -------------------------------------
97  /*Event 19: OpenMsgEvent
98  Definition: An event is generated when a valid OPEN message has been received.
99  Status: Mandatory*/
100  virtual void OpenMsgEvent() {}
101  /*Event 26: KeepAliveMsgEvent
102  Definition: An event is generated when a KEEPALIVE message is received.
103  Status: Mandatory*/
104  virtual void KeepAliveMsgEvent() {}
105  /*Event 27: UpdateMsgEvent
106  Definition: An event is generated when a valid UPDATE message is received.
107  Status: Mandatory*/
108  virtual void UpdateMsgEvent() {}
109 
110  private:
111  void init() override;
112 };
STATE
#define STATE(S)
Definition: Macho.h:236