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

inet::bgp::fsm::SUBSTATE ( Idle  ,
TopState   
)
126  {
127  STATE(Idle)
128 
129  void ManualStart() override;
130 
131  private:
132  void entry() override { std::cout << "Idle::entry" << std::endl; }
133  void exit() override { std::cout << "Idle::exit" << std::endl; }
134 };
#define STATE(S)
Definition: Macho.h:234
inet::bgp::fsm::SUBSTATE ( Connect  ,
TopState   
)
137  {
138  STATE(Connect)
139 
140  void ConnectRetryTimer_Expires() override;
141  void HoldTimer_Expires() override;
142  void KeepaliveTimer_Expires() override;
143  void TcpConnectionConfirmed() override;
144  void TcpConnectionFails() override;
145  void KeepAliveMsgEvent() override;
146  void UpdateMsgEvent() override;
147 
148  private:
149  void entry() override { std::cout << "Connect::entry" << std::endl; }
150  void exit() override { std::cout << "Connect::exit" << std::endl; }
151 };
#define STATE(S)
Definition: Macho.h:234
inet::bgp::fsm::SUBSTATE ( Active  ,
TopState   
)
154  {
155  STATE(Active)
156 
157  void ConnectRetryTimer_Expires() override;
158  void HoldTimer_Expires() override;
159  void KeepaliveTimer_Expires() override;
160  void TcpConnectionConfirmed() override;
161  void TcpConnectionFails() override;
162  void OpenMsgEvent() override;
163  void KeepAliveMsgEvent() override;
164  void UpdateMsgEvent() override;
165 
166  private:
167  void entry() override { std::cout << "Active::entry" << std::endl; }
168  void exit() override { std::cout << "Active::exit" << std::endl; }
169 };
#define STATE(S)
Definition: Macho.h:234
inet::bgp::fsm::SUBSTATE ( OpenSent  ,
TopState   
)
172  {
173  STATE(OpenSent)
174 
175  void ConnectRetryTimer_Expires() override;
176  void HoldTimer_Expires() override;
177  void KeepaliveTimer_Expires() override;
178  void TcpConnectionFails() override;
179  void OpenMsgEvent() override;
180  void KeepAliveMsgEvent() override;
181  void UpdateMsgEvent() override;
182 
183  private:
184  void entry() override { std::cout << "OpenSent::entry" << std::endl; }
185  void exit() override { std::cout << "OpenSent::exit" << std::endl; }
186 };
#define STATE(S)
Definition: Macho.h:234
inet::bgp::fsm::SUBSTATE ( OpenConfirm  ,
TopState   
)
189  {
190  STATE(OpenConfirm)
191 
192  void ConnectRetryTimer_Expires() override;
193  void HoldTimer_Expires() override;
194  void KeepaliveTimer_Expires() override;
195  void TcpConnectionFails() override;
196  void OpenMsgEvent() override;
197  void KeepAliveMsgEvent() override;
198  void UpdateMsgEvent() override;
199 
200  private:
201  void entry() override { std::cout << "OpenConfirm::entry" << std::endl; }
202  void exit() override { std::cout << "OpenConfirm::exit" << std::endl; }
203 };
#define STATE(S)
Definition: Macho.h:234
inet::bgp::fsm::SUBSTATE ( Established  ,
TopState   
)
206  {
207  STATE(Established)
208 
209  void ConnectRetryTimer_Expires() override;
210  void HoldTimer_Expires() override;
211  void KeepaliveTimer_Expires() override;
212  void TcpConnectionFails() override;
213  void OpenMsgEvent() override;
214  void KeepAliveMsgEvent() override;
215  void UpdateMsgEvent() override;
216 
217  private:
218  void entry() override;
219  void exit() override { std::cout << "Established::exit" << std::endl; }
220 };
#define STATE(S)
Definition: Macho.h:234
inet::bgp::fsm::TOPSTATE ( TopState  )
36  {
37  struct Box
38  {
39  Box() : _mod(0) {}
40  Box(BGPSession& session) : _mod(&session) {}
41  BGPSession& getModule() { return *_mod; }
42 
43  private:
44  BGPSession *_mod;
45  };
46 
47  STATE(TopState)
48 
49  // Machine's event protocol
50  // RFC 4271, 8.1.2. Administrative Events
51  // -------------------------------------
52  /*Event 1: ManualStart
53  Definition: Local system administrator manually starts the peer connection.
54  Status: Mandatory*/
55  virtual void ManualStart() {}
56  /*Event 2: ManualStop
57  Definition: Local system administrator manually stops the peer connection.
58  Status: Mandatory*/
59  //virtual void event2() {}
60 
61  // RFC 4271, 8.1.3. Timer Events
62  // -------------------------------------
63  /*Event 9: ConnectRetryTimer_Expires
64  Definition: An event generated when the ConnectRetryTimer
65  expires.
66  Status: Mandatory*/
67  virtual void ConnectRetryTimer_Expires() {}
68  /*Event 10: HoldTimer_Expires
69  Definition: An event generated when the HoldTimer expires.
70  Status: Mandatory*/
71  virtual void HoldTimer_Expires() {}
72  /*Event 11: KeepaliveTimer_Expires
73  Definition: An event generated when the KeepaliveTimer expires.
74  Status: Mandatory*/
75  virtual void KeepaliveTimer_Expires() {}
76 
77  //RFC 4271, 8.1.4. TCP Connection-Based Events
78  // -------------------------------------
79  /*Event 16: Tcp_CR_Acked
80  Definition: Event indicating the local system's request to
81  establish a TCP connection to the remote peer.
82  The local system's TCP connection sent a TCP SYN,
83  received a TCP SYN/ACK message, and sent a TCP ACK.
84  Status: Mandatory*/
85  //virtual void Tcp_CR_Acked() {}
86  /*Event 17: TcpConnectionConfirmed
87  Definition: Event indicating that the local system has received
88  a confirmation that the TCP connection has been
89  established by the remote site.
90  The remote peer's TCP engine sent a TCP SYN. The
91  local peer's TCP engine sent a SYN, ACK message and
92  now has received a final ACK.
93  Status: Mandatory*/
94  virtual void TcpConnectionConfirmed() {}
95  /*Event 18: TcpConnectionFails
96  Definition: Event indicating that the local system has received
97  a TCP connection failure notice.
98  The remote BGP peer's TCP machine could have sent a
99  FIN. The local peer would respond with a FIN-ACK.
100  Another possibility is that the local peer
101  indicated a timeout in the TCP connection and
102  downed the connection.
103  Status: Mandatory*/
104  virtual void TcpConnectionFails() {}
105 
106  //RFC 4271, 8.1.5. BGP Message-Based Events
107  // -------------------------------------
108  /*Event 19: OpenMsgEvent
109  Definition: An event is generated when a valid OPEN message has been received.
110  Status: Mandatory*/
111  virtual void OpenMsgEvent() {}
112  /*Event 26: KeepAliveMsgEvent
113  Definition: An event is generated when a KEEPALIVE message is received.
114  Status: Mandatory*/
115  virtual void KeepAliveMsgEvent() {}
116  /*Event 27: UpdateMsgEvent
117  Definition: An event is generated when a valid UPDATE message is received.
118  Status: Mandatory*/
119  virtual void UpdateMsgEvent() {}
120 
121  private:
122  void init() override;
123 };
#define STATE(S)
Definition: Macho.h:234