#include <OSPFInterfaceStatePointToPoint.h>
Inheritance diagram for OSPF::InterfaceStatePointToPoint:
Public Member Functions | |
virtual void | ProcessEvent (Interface *intf, Interface::InterfaceEventType event) |
virtual Interface::InterfaceStateType | GetState (void) const |
virtual Interface::InterfaceStateType OSPF::InterfaceStatePointToPoint::GetState | ( | void | ) | const [inline, virtual] |
void OSPF::InterfaceStatePointToPoint::ProcessEvent | ( | Interface * | intf, | |
Interface::InterfaceEventType | event | |||
) | [virtual] |
Implements OSPF::InterfaceState.
00009 { 00010 if (event == OSPF::Interface::InterfaceDown) { 00011 intf->Reset (); 00012 ChangeState (intf, new OSPF::InterfaceStateDown, this); 00013 } 00014 if (event == OSPF::Interface::LoopIndication) { 00015 intf->Reset (); 00016 ChangeState (intf, new OSPF::InterfaceStateLoopback, this); 00017 } 00018 if (event == OSPF::Interface::HelloTimer) { 00019 if (intf->GetType () == OSPF::Interface::Virtual) { 00020 if (intf->GetNeighborCount () > 0) { 00021 intf->SendHelloPacket (intf->GetNeighbor (0)->GetAddress (), VIRTUAL_LINK_TTL); 00022 } 00023 } else { 00024 intf->SendHelloPacket (OSPF::AllSPFRouters); 00025 } 00026 intf->GetArea ()->GetRouter ()->GetMessageHandler ()->StartTimer (intf->GetHelloTimer (), intf->GetHelloInterval ()); 00027 } 00028 if (event == OSPF::Interface::AcknowledgementTimer) { 00029 intf->SendDelayedAcknowledgements (); 00030 } 00031 }