191 if (packet->getVersion() == 2) {
192 IPv4ControlInfo *controlInfo = check_and_cast<IPv4ControlInfo *>(packet->getControlInfo());
193 int interfaceId = controlInfo->getInterfaceId();
194 AreaID areaID = packet->getAreaID();
197 if (area !=
nullptr) {
201 if (intf ==
nullptr) {
206 intf = area->findVirtualLink(packet->getRouterID());
208 if (intf !=
nullptr) {
211 if (virtualLinkTransitArea !=
nullptr) {
213 Interface *virtualLinkInterface = virtualLinkTransitArea->
getInterface(interfaceId);
215 if (virtualLinkInterface ==
nullptr) {
226 if (intf !=
nullptr) {
227 IPv4Address destinationAddress = controlInfo->getDestAddr();
233 ((destinationAddress == allDRouters) &&
239 (destinationAddress != allDRouters)
245 Neighbor *neighbor =
nullptr;
249 switch (intf->getType()) {
253 neighbor = intf->getNeighborByAddress(controlInfo->getSrcAddr());
258 neighbor = intf->getNeighborByID(packet->getRouterID());
265 switch (packetType) {
271 if (neighbor !=
nullptr) {
277 if (neighbor !=
nullptr) {
283 if (neighbor !=
nullptr) {
289 if (neighbor !=
nullptr) {
LinkStateAcknowledgementHandler lsAckHandler
Definition: MessageHandler.h:45
bool authenticatePacket(OSPFPacket *packet)
Definition: MessageHandler.h:67
Definition: OSPFInterface.h:60
void processPacket(OSPFPacket *packet, Interface *intf, Neighbor *neighbor) override
Definition: DatabaseDescriptionHandler.cc:34
void processPacket(OSPFPacket *packet, Interface *intf, Neighbor *neighbor) override
Definition: LinkStateAcknowledgementHandler.cc:31
Router * router
Definition: IMessageHandler.h:35
IPv4Address AreaID
Definition: OSPFcommon.h:138
Interface * getInterface(unsigned char ifIndex)
Definition: OSPFArea.cc:205
Definition: OSPFPacket_m.h:54
Definition: OSPFInterface.h:56
const AreaID BACKBONE_AREAID(0, 0, 0, 0)
InterfaceStateType
Definition: OSPFInterface.h:63
Definition: OSPFPacket_m.h:55
void processPacket(OSPFPacket *packet, Interface *intf, Neighbor *neighbor) override
Definition: LinkStateRequestHandler.cc:34
Definition: OSPFInterface.h:58
Definition: OSPFInterface.h:70
Definition: OSPFPacket_m.h:57
HelloHandler helloHandler
Definition: MessageHandler.h:41
Definition: OSPFInterface.h:57
Definition: OSPFInterface.h:59
unsigned long getAreaCount() const
Definition: OSPFRouter.h:75
Area * getAreaByID(AreaID areaID)
Returns the pointer to the Area identified by the input areaID, if it's on the Area list...
Definition: OSPFRouter.cc:72
void processPacket(OSPFPacket *packet, Interface *intf, Neighbor *unused=nullptr) override
Definition: HelloHandler.cc:34
LinkStateRequestHandler lsRequestHandler
Definition: MessageHandler.h:43
DatabaseDescriptionHandler ddHandler
Definition: MessageHandler.h:42
Definition: OSPFInterface.h:69
OSPFPacketType
Enum generated from inet/routing/ospfv2/OSPFPacket.msg:27 by nedtool.
Definition: OSPFPacket_m.h:52
Definition: OSPFPacket_m.h:53
Definition: OSPFPacket_m.h:56
static const IPv4Address ALL_OSPF_DESIGNATED_ROUTERS_MCAST
224.0.0.6 All OSPF Designated Routers
Definition: IPv4Address.h:111
void processPacket(OSPFPacket *packet, Interface *intf, Neighbor *neighbor) override
Definition: LinkStateUpdateHandler.cc:47
LinkStateUpdateHandler lsUpdateHandler
Definition: MessageHandler.h:44