INET Framework for OMNeT++/OMNEST
inet::ospfv3::Ospfv3NeighborState2Way Class Reference

#include <Ospfv3NeighborState2Way.h>

Inheritance diagram for inet::ospfv3::Ospfv3NeighborState2Way:
inet::ospfv3::Ospfv3NeighborState

Public Member Functions

 ~Ospfv3NeighborState2Way ()
 
virtual void processEvent (Ospfv3Neighbor *neighbor, Ospfv3Neighbor::Ospfv3NeighborEventType event) override
 
virtual Ospfv3Neighbor::Ospfv3NeighborStateType getState () const override
 
virtual std::string getNeighborStateString () override
 
- Public Member Functions inherited from inet::ospfv3::Ospfv3NeighborState
virtual ~Ospfv3NeighborState ()
 

Additional Inherited Members

- Protected Member Functions inherited from inet::ospfv3::Ospfv3NeighborState
void changeState (Ospfv3Neighbor *neighbor, Ospfv3NeighborState *newState, Ospfv3NeighborState *currentState)
 

Constructor & Destructor Documentation

◆ ~Ospfv3NeighborState2Way()

inet::ospfv3::Ospfv3NeighborState2Way::~Ospfv3NeighborState2Way ( )
inline
18 {}

Member Function Documentation

◆ getNeighborStateString()

virtual std::string inet::ospfv3::Ospfv3NeighborState2Way::getNeighborStateString ( )
inlineoverridevirtual

Implements inet::ospfv3::Ospfv3NeighborState.

21 { return std::string("Ospfv3NeighborState2Way"); }

◆ getState()

virtual Ospfv3Neighbor::Ospfv3NeighborStateType inet::ospfv3::Ospfv3NeighborState2Way::getState ( ) const
inlineoverridevirtual

◆ processEvent()

void inet::ospfv3::Ospfv3NeighborState2Way::processEvent ( Ospfv3Neighbor neighbor,
Ospfv3Neighbor::Ospfv3NeighborEventType  event 
)
overridevirtual

Implements inet::ospfv3::Ospfv3NeighborState.

21 {
22  if ((event == Ospfv3Neighbor::KILL_NEIGHBOR) || (event == Ospfv3Neighbor::LINK_DOWN)) {
23  neighbor->reset();
24  neighbor->getInterface()->getArea()->getInstance()->getProcess()->clearTimer(neighbor->getInactivityTimer());
25  changeState(neighbor, new Ospfv3NeighborStateDown, this);
26  }
27  if (event == Ospfv3Neighbor::INACTIVITY_TIMER) {
28  neighbor->reset();
29  if (neighbor->getInterface()->getType() == Ospfv3Interface::NBMA_TYPE)
30  neighbor->getInterface()->getArea()->getInstance()->getProcess()->setTimer(neighbor->getPollTimer(), neighbor->getInterface()->getPollInterval());
31 
32  changeState(neighbor, new Ospfv3NeighborStateDown, this);
33  }
34  if (event == Ospfv3Neighbor::ONEWAY_RECEIVED) {
35  neighbor->reset();
36  changeState(neighbor, new Ospfv3NeighborStateInit, this);
37  }
38  if (event == Ospfv3Neighbor::HELLO_RECEIVED) {
39  neighbor->getInterface()->getArea()->getInstance()->getProcess()->clearTimer(neighbor->getInactivityTimer());
40  neighbor->getInterface()->getArea()->getInstance()->getProcess()->setTimer(neighbor->getInactivityTimer(), neighbor->getInterface()->getDeadInterval());
41  }
42  if (event == Ospfv3Neighbor::IS_ADJACENCY_OK) {
43  EV_DEBUG << "IS_ADJACENCY_OK in Neighbor state 2way\n";
44  if (neighbor->needAdjacency()) {
45  if (!(neighbor->isFirstAdjacencyInited())) {
46  neighbor->initFirstAdjacency();
47  }
48  else {
49  neighbor->incrementDDSequenceNumber();
50  }
51  neighbor->sendDDPacket(true);
52  neighbor->getInterface()->getArea()->getInstance()->getProcess()->setTimer(neighbor->getDDRetransmissionTimer(), neighbor->getInterface()->getRetransmissionInterval());
53  changeState(neighbor, new Ospfv3NeighborStateExStart, this);
54  }
55  }
56 }

The documentation for this class was generated from the following files:
inet::ospfv3::Ospfv3Neighbor::TWOWAY_STATE
@ TWOWAY_STATE
Definition: Ospfv3Neighbor.h:46
inet::ospfv3::Ospfv3Interface::NBMA_TYPE
@ NBMA_TYPE
Definition: Ospfv3Interface.h:54
inet::ospfv3::Ospfv3Neighbor::ONEWAY_RECEIVED
@ ONEWAY_RECEIVED
Definition: Ospfv3Neighbor.h:32
inet::ospfv3::Ospfv3Neighbor::INACTIVITY_TIMER
@ INACTIVITY_TIMER
Definition: Ospfv3Neighbor.h:34
inet::ospfv3::Ospfv3NeighborState::changeState
void changeState(Ospfv3Neighbor *neighbor, Ospfv3NeighborState *newState, Ospfv3NeighborState *currentState)
Definition: Ospfv3NeighborState.cc:14
inet::ospfv3::Ospfv3Neighbor::HELLO_RECEIVED
@ HELLO_RECEIVED
Definition: Ospfv3Neighbor.h:23
inet::ospfv3::Ospfv3Neighbor::LINK_DOWN
@ LINK_DOWN
Definition: Ospfv3Neighbor.h:36
inet::ospfv3::Ospfv3Neighbor::IS_ADJACENCY_OK
@ IS_ADJACENCY_OK
Definition: Ospfv3Neighbor.h:30
inet::ospfv3::Ospfv3Neighbor::KILL_NEIGHBOR
@ KILL_NEIGHBOR
Definition: Ospfv3Neighbor.h:33