Skip to content

Commit

Permalink
RoutingTableVisualizerBase: Fixed Ipv4 dependency detected by feature…
Browse files Browse the repository at this point in the history
… tests.
  • Loading branch information
levy committed Feb 13, 2024
1 parent 35ec305 commit 0936c5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/inet/visualizer/base/RoutingTableVisualizerBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
#include "inet/mobility/contract/IMobility.h"
#include "inet/networklayer/common/L3AddressResolver.h"
#include "inet/networklayer/contract/IInterfaceTable.h"
#ifdef INET_WITH_IPv4
#include "inet/networklayer/ipv4/Ipv4InterfaceData.h"
#endif

namespace inet {

Expand Down Expand Up @@ -272,6 +274,7 @@ std::vector<Ipv4Address> RoutingTableVisualizerBase::getMulticastGroups()
if (interfaceTable != nullptr) {
for (int i = 0; i < interfaceTable->getNumInterfaces(); i++) {
auto interface = interfaceTable->getInterface(i);
#ifdef INET_WITH_IPv4
auto protocolData = interface->findProtocolData<Ipv4InterfaceData>();
if (protocolData != nullptr) {
for (int j = 0; j < protocolData->getNumOfJoinedMulticastGroups(); j++) {
Expand All @@ -281,6 +284,7 @@ std::vector<Ipv4Address> RoutingTableVisualizerBase::getMulticastGroups()
multicastGroups.insert(multicastGroup);
}
}
#endif
}
}
}
Expand Down

0 comments on commit 0936c5a

Please sign in to comment.