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

#include <Ospfv3InterfaceStatePointToPoint.h>

Inheritance diagram for inet::ospfv3::Ospfv3InterfaceStatePointToPoint:
inet::ospfv3::Ospfv3InterfaceState

Public Member Functions

 ~Ospfv3InterfaceStatePointToPoint ()
 
virtual void processEvent (Ospfv3Interface *intf, Ospfv3Interface::Ospfv3InterfaceEvent event) override
 
virtual Ospfv3Interface::Ospfv3InterfaceFaState getState () const override
 
virtual std::string getInterfaceStateString () const override
 
- Public Member Functions inherited from inet::ospfv3::Ospfv3InterfaceState
virtual ~Ospfv3InterfaceState ()
 

Additional Inherited Members

- Protected Member Functions inherited from inet::ospfv3::Ospfv3InterfaceState
void changeState (Ospfv3Interface *intf, Ospfv3InterfaceState *newState, Ospfv3InterfaceState *currentState)
 
void calculateDesignatedRouter (Ospfv3Interface *intf)
 

Constructor & Destructor Documentation

◆ ~Ospfv3InterfaceStatePointToPoint()

inet::ospfv3::Ospfv3InterfaceStatePointToPoint::~Ospfv3InterfaceStatePointToPoint ( )
inline
22 {}

Member Function Documentation

◆ getInterfaceStateString()

virtual std::string inet::ospfv3::Ospfv3InterfaceStatePointToPoint::getInterfaceStateString ( ) const
inlineoverridevirtual

Implements inet::ospfv3::Ospfv3InterfaceState.

25 { return std::string("Ospfv3InterfaceStatePointToPoint"); }

◆ getState()

virtual Ospfv3Interface::Ospfv3InterfaceFaState inet::ospfv3::Ospfv3InterfaceStatePointToPoint::getState ( ) const
inlineoverridevirtual

◆ processEvent()

void inet::ospfv3::Ospfv3InterfaceStatePointToPoint::processEvent ( Ospfv3Interface intf,
Ospfv3Interface::Ospfv3InterfaceEvent  event 
)
overridevirtual

Implements inet::ospfv3::Ospfv3InterfaceState.

12 {
13  /*
14  * HELLO_TIMER - no changes in DR or BDR because there isn't one
15  * INTERFACE_DOWN or LOOPBACK_IND - DOWN or LOOPBACK
16  */
18  interface->reset();
19  changeState(interface, new Ospfv3InterfaceStateDown, this);
20  }
21  if (event == Ospfv3Interface::LOOP_IND_EVENT) {
22  interface->reset();
23  changeState(interface, new Ospfv3InterfaceStateLoopback, this);
24  }
26  if (interface->getType() == Ospfv3Interface::VIRTUAL_TYPE) {
27  if (interface->getNeighborCount() > 0) {
28  Packet *hello = interface->prepareHello();
29  Ipv6Address dest = interface->getNeighbor(0)->getNeighborIP();
30  interface->getArea()->getInstance()->getProcess()->sendPacket(hello, dest, interface->getIntName().c_str(), VIRTUAL_LINK_TTL);
31  }
32  }
33  else {
34  Packet *hello = interface->prepareHello();
35  interface->getArea()->getInstance()->getProcess()->sendPacket(hello, Ipv6Address::ALL_OSPF_ROUTERS_MCAST, interface->getIntName().c_str());
36  }
37  interface->getArea()->getInstance()->getProcess()->setTimer(interface->getHelloTimer(), interface->getHelloInterval());
38  }
40  interface->sendDelayedAcknowledgements();
41  }
42 } // processEvent

The documentation for this class was generated from the following files:
VIRTUAL_LINK_TTL
#define VIRTUAL_LINK_TTL
Definition: Ospfv2Common.h:36
inet::ospfv3::Ospfv3Interface::LOOP_IND_EVENT
@ LOOP_IND_EVENT
Definition: Ospfv3Interface.h:44
inet::ospfv3::Ospfv3Interface::HELLO_TIMER_EVENT
@ HELLO_TIMER_EVENT
Definition: Ospfv3Interface.h:45
inet::ospfv3::Ospfv3InterfaceState::changeState
void changeState(Ospfv3Interface *intf, Ospfv3InterfaceState *newState, Ospfv3InterfaceState *currentState)
Definition: Ospfv3InterfaceState.cc:10
inet::ospfv3::Ospfv3Interface::ACKNOWLEDGEMENT_TIMER_EVENT
@ ACKNOWLEDGEMENT_TIMER_EVENT
Definition: Ospfv3Interface.h:46
inet::ospfv3::Ospfv3Interface::VIRTUAL_TYPE
@ VIRTUAL_TYPE
Definition: Ospfv3Interface.h:56
inet::ospfv3::Ospfv3Interface::INTERFACE_DOWN_EVENT
@ INTERFACE_DOWN_EVENT
Definition: Ospfv3Interface.h:43
inet::ospfv3::Ospfv3Interface::INTERFACE_STATE_POINTTOPOINT
@ INTERFACE_STATE_POINTTOPOINT
Definition: Ospfv3Interface.h:30
inet::Ipv6Address::ALL_OSPF_ROUTERS_MCAST
static const Ipv6Address ALL_OSPF_ROUTERS_MCAST
OSPF multicast address for listening.
Definition: Ipv6Address.h:84