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

void OSPF::InterfaceStatePointToPoint::ProcessEvent ( OSPF::Interface intf,
Interface::InterfaceEventType  event 
) [virtual]

Implements OSPF::InterfaceState.

00026 {
00027     if (event == OSPF::Interface::InterfaceDown) {
00028         intf->Reset();
00029         ChangeState(intf, new OSPF::InterfaceStateDown, this);
00030     }
00031     if (event == OSPF::Interface::LoopIndication) {
00032         intf->Reset();
00033         ChangeState(intf, new OSPF::InterfaceStateLoopback, this);
00034     }
00035     if (event == OSPF::Interface::HelloTimer) {
00036         if (intf->GetType() == OSPF::Interface::Virtual) {
00037             if (intf->GetNeighborCount() > 0) {
00038                 intf->SendHelloPacket(intf->GetNeighbor(0)->GetAddress(), VIRTUAL_LINK_TTL);
00039             }
00040         } else {
00041             intf->SendHelloPacket(OSPF::AllSPFRouters);
00042         }
00043         intf->GetArea()->GetRouter()->GetMessageHandler()->StartTimer(intf->GetHelloTimer(), intf->GetHelloInterval());
00044     }
00045     if (event == OSPF::Interface::AcknowledgementTimer) {
00046         intf->SendDelayedAcknowledgements();
00047     }
00048 }

virtual Interface::InterfaceStateType OSPF::InterfaceStatePointToPoint::GetState ( void   )  const [inline, virtual]

Implements OSPF::InterfaceState.

00029 { return Interface::PointToPointState; }


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

Generated on Fri Mar 20 18:51:23 2009 for INET Framework for OMNeT++/OMNEST by  doxygen 1.5.5