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

#include <Ospfv3NeighborStateFull.h>

Inheritance diagram for inet::ospfv3::Ospfv3NeighborStateFull:
inet::ospfv3::Ospfv3NeighborState

Public Member Functions

 ~Ospfv3NeighborStateFull ()
 
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

◆ ~Ospfv3NeighborStateFull()

inet::ospfv3::Ospfv3NeighborStateFull::~Ospfv3NeighborStateFull ( )
inline
17 {}

Member Function Documentation

◆ getNeighborStateString()

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

Implements inet::ospfv3::Ospfv3NeighborState.

20 { return std::string("Ospfv3NeighborStateFull"); }

◆ getState()

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

◆ processEvent()

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

Implements inet::ospfv3::Ospfv3NeighborState.

25 {
26  if ((event == Ospfv3Neighbor::KILL_NEIGHBOR) || (event == Ospfv3Neighbor::LINK_DOWN)) {
27  neighbor->reset();
28  neighbor->getInterface()->getArea()->getInstance()->getProcess()->clearTimer(neighbor->getInactivityTimer());
29 // changeState(neighbor, new Ospfv3NeighborStateDown, this);
30  }
31  if (event == Ospfv3Neighbor::INACTIVITY_TIMER) {
32  neighbor->reset();
33  if (neighbor->getInterface()->getType() == Ospfv3Interface::NBMA_TYPE)
34  neighbor->getInterface()->getArea()->getInstance()->getProcess()->setTimer(neighbor->getPollTimer(), neighbor->getInterface()->getPollInterval());
35 
36  changeState(neighbor, new Ospfv3NeighborStateDown, this);
37  }
38  if (event == Ospfv3Neighbor::ONEWAY_RECEIVED) {
39  neighbor->reset();
40  changeState(neighbor, new Ospfv3NeighborStateInit, this);
41  }
42  if (event == Ospfv3Neighbor::HELLO_RECEIVED) {
43  neighbor->getInterface()->getArea()->getInstance()->getProcess()->clearTimer(neighbor->getInactivityTimer());
44  neighbor->getInterface()->getArea()->getInstance()->getProcess()->setTimer(neighbor->getInactivityTimer(), neighbor->getInterface()->getDeadInterval());
45  }
46  if (event == Ospfv3Neighbor::IS_ADJACENCY_OK) {
47  EV_DEBUG << "Ospfv3Neighbor::IS_ADJACENCY_OK caught in FullState\n";
48  if (!neighbor->needAdjacency()) {
49  neighbor->reset();
50  changeState(neighbor, new Ospfv3NeighborState2Way, this);
51  }
52  }
54  EV_DEBUG << "Ospfv3Neighbor::SEQUENCE_NUMBER_MISMATCH or BAD_LINK_STATE_REQUEST caught in FullState\n";
55  neighbor->reset();
56  neighbor->incrementDDSequenceNumber();
57  neighbor->sendDDPacket(true);
58  neighbor->getInterface()->getArea()->getInstance()->getProcess()->setTimer(neighbor->getDDRetransmissionTimer(), neighbor->getInterface()->getRetransmissionInterval());
59  changeState(neighbor, new Ospfv3NeighborStateExStart, this);
60  }
62  EV_DEBUG << "Ospfv3Neighbor::UPDATE_RETRANSMISSION_TIMER caught in FullState\n";
63  if (!neighbor->isRetransmissionListEmpty()) {
64  neighbor->retransmitUpdatePacket();
65  neighbor->startUpdateRetransmissionTimer();
66  EV_DEBUG << "retransmission done, Timer active again\n";
67  }
68  else {
69  if (neighbor->isUpdateRetransmissionTimerActive())
70  neighbor->clearUpdateRetransmissionTimer();
71  }
72  EV_DEBUG << "END\n";
73  }
75  EV_DEBUG << "Ospfv3Neighbor::DD_RETRANSMISSION_TIMER caught in FullState\n";
76  neighbor->deleteLastSentDDPacket();
77  }
78 }

The documentation for this class was generated from the following files:
inet::ospfv3::Ospfv3Neighbor::FULL_STATE
@ FULL_STATE
Definition: Ospfv3Neighbor.h:50
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::Ospfv3Neighbor::UPDATE_RETRANSMISSION_TIMER
@ UPDATE_RETRANSMISSION_TIMER
Definition: Ospfv3Neighbor.h:38
inet::ospfv3::Ospfv3Neighbor::SEQUENCE_NUMBER_MISMATCH
@ SEQUENCE_NUMBER_MISMATCH
Definition: Ospfv3Neighbor.h:31
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::BAD_LINK_STATE_REQUEST
@ BAD_LINK_STATE_REQUEST
Definition: Ospfv3Neighbor.h:28
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::DD_RETRANSMISSION_TIMER
@ DD_RETRANSMISSION_TIMER
Definition: Ospfv3Neighbor.h:37
inet::ospfv3::Ospfv3Neighbor::KILL_NEIGHBOR
@ KILL_NEIGHBOR
Definition: Ospfv3Neighbor.h:33