INET Framework for OMNeT++/OMNEST
OSPF::InterfaceStatePointToPoint Class Reference

#include <OSPFInterfaceStatePointToPoint.h>

Inheritance diagram for OSPF::InterfaceStatePointToPoint:
OSPF::InterfaceState

List of all members.

Public Member Functions

virtual void ProcessEvent (Interface *intf, Interface::InterfaceEventType event)
virtual
Interface::InterfaceStateType 
GetState (void) const

Member Function Documentation

virtual Interface::InterfaceStateType OSPF::InterfaceStatePointToPoint::GetState ( void  ) const [inline, virtual]
void OSPF::InterfaceStatePointToPoint::ProcessEvent ( OSPF::Interface intf,
Interface::InterfaceEventType  event 
) [virtual]

Implements OSPF::InterfaceState.

{
    if (event == OSPF::Interface::InterfaceDown) {
        intf->Reset();
        ChangeState(intf, new OSPF::InterfaceStateDown, this);
    }
    if (event == OSPF::Interface::LoopIndication) {
        intf->Reset();
        ChangeState(intf, new OSPF::InterfaceStateLoopback, this);
    }
    if (event == OSPF::Interface::HelloTimer) {
        if (intf->GetType() == OSPF::Interface::Virtual) {
            if (intf->GetNeighborCount() > 0) {
                intf->SendHelloPacket(intf->GetNeighbor(0)->GetAddress(), VIRTUAL_LINK_TTL);
            }
        } else {
            intf->SendHelloPacket(OSPF::AllSPFRouters);
        }
        intf->GetArea()->GetRouter()->GetMessageHandler()->StartTimer(intf->GetHelloTimer(), intf->GetHelloInterval());
    }
    if (event == OSPF::Interface::AcknowledgementTimer) {
        intf->SendDelayedAcknowledgements();
    }
}

The documentation for this class was generated from the following files: