17 EV_DEBUG <<
"Interface " << interface->getIntName() <<
" is in up state\n";
18 if (!interface->isInterfacePassive()) {
19 LinkLSA *lsa = interface->originateLinkLSA();
20 interface->installLinkLSA(lsa);
22 interface->getArea()->getInstance()->getProcess()->setTimer(interface->getHelloTimer(), 0);
23 interface->getArea()->getInstance()->getProcess()->setTimer(interface->getAcknowledgementTimer(), interface->getAckDelay());
25 switch (interface->getType()) {
29 changeState(interface,
new Ospfv3InterfaceStatePointToPoint,
this);
33 if (interface->getRouterPriority() == 0) {
34 changeState(interface,
new Ospfv3InterfaceStateDrOther,
this);
37 changeState(interface,
new Ospfv3InterfaceStateWaiting,
this);
38 interface->getArea()->getInstance()->getProcess()->setTimer(interface->getWaitTimer(), interface->getDeadInterval());
40 long neighborCount = interface->getNeighborCount();
41 for (
long i = 0; i < neighborCount; i++) {
42 Ospfv3Neighbor *neighbor = interface->getNeighbor(i);
43 if (neighbor->getNeighborPriority() > 0) {
51 if (interface->getRouterPriority() == 0) {
52 changeState(interface,
new Ospfv3InterfaceStateDrOther,
this);
55 changeState(interface,
new Ospfv3InterfaceStateWaiting,
this);
56 interface->getArea()->getInstance()->getProcess()->setTimer(interface->getWaitTimer(), interface->getDeadInterval());
64 else if (interface->isInterfacePassive()) {
65 LinkLSA *lsa = interface->originateLinkLSA();
66 interface->installLinkLSA(lsa);
68 IntraAreaPrefixLSA *prefLsa = interface->getArea()->originateIntraAreaPrefixLSA();
69 if (prefLsa !=
nullptr) {
70 if (!interface->getArea()->installIntraAreaPrefixLSA(prefLsa))
71 EV_DEBUG <<
"Intra Area Prefix LSA for network beyond interface " << interface->getIntName() <<
" was not created!\n";
74 changeState(interface,
new Ospfv3InterfacePassive,
this);
78 changeState(interface,
new Ospfv3InterfaceStateLoopback,
this);