35 MessageHandler *messageHandler = intf->getArea()->getRouter()->getMessageHandler();
36 messageHandler->startTimer(intf->getHelloTimer(),
RNGCONTEXT truncnormal(0.1, 0.01));
37 messageHandler->startTimer(intf->getAcknowledgementTimer(), intf->getAcknowledgementDelay());
38 switch (intf->getType()) {
42 changeState(intf,
new InterfaceStatePointToPoint,
this);
46 if (intf->getRouterPriority() == 0) {
47 changeState(intf,
new InterfaceStateNotDesignatedRouter,
this);
51 messageHandler->startTimer(intf->getWaitTimer(), intf->getRouterDeadInterval());
53 long neighborCount = intf->getNeighborCount();
54 for (
long i = 0; i < neighborCount; i++) {
55 Neighbor *neighbor = intf->getNeighbor(i);
56 if (neighbor->getPriority() > 0) {
64 if (intf->getRouterPriority() == 0) {
65 changeState(intf,
new InterfaceStateNotDesignatedRouter,
this);
69 messageHandler->startTimer(intf->getWaitTimer(), intf->getRouterDeadInterval());
79 changeState(intf,
new InterfaceStateLoopback,
this);
Definition: OSPFInterface.h:60
#define RNGCONTEXT
Definition: INETDefs.h:85
Definition: OSPFInterface.h:56
Definition: OSPFInterface.h:58
Definition: OSPFInterface.h:57
Definition: OSPFInterface.h:59
Definition: OSPFNeighbor.h:43
Definition: OSPFInterface.h:43
void changeState(Interface *intf, InterfaceState *newState, InterfaceState *currentState)
Definition: OSPFInterfaceState.cc:33
Definition: OSPFInterface.h:49