PingApp is documented as sending to each interface, however it actually sends to each assigned address, so multiple Ipv6Addresses on the same interface or having both Ipv4 and Ipv6 addresses will result in multiple (consecutive) messages to that node.
See documentation saying every interface: https://doc.omnetpp.org/inet/api-current/neddoc/inet.applications.pingapp.PingApp.html
But code
|
std::vector<L3Address> PingApp::getAllAddresses() |
|
{ |
|
std::vector<L3Address> result; |
|
|
|
int lastId = getSimulation()->getLastComponentId(); |
|
|
|
for (int i = 0; i <= lastId; i++) { |
|
IInterfaceTable *ift = dynamic_cast<IInterfaceTable *>(getSimulation()->getModule(i)); |
|
if (ift) { |
|
for (int j = 0; j < ift->getNumInterfaces(); j++) { |
|
NetworkInterface *ie = ift->getInterface(j); |
|
if (ie && !ie->isLoopback()) { |
|
#ifdef INET_WITH_IPv4 |
|
auto ipv4Data = ie->findProtocolData<Ipv4InterfaceData>(); |
|
if (ipv4Data != nullptr) { |
|
Ipv4Address address = ipv4Data->getIPAddress(); |
|
if (!address.isUnspecified()) |
|
result.push_back(L3Address(address)); |
|
} |
|
#endif // ifdef INET_WITH_IPv4 |
|
#ifdef INET_WITH_IPv6 |
|
auto ipv6Data = ie->findProtocolData<Ipv6InterfaceData>(); |
|
if (ipv6Data != nullptr) { |
|
for (int k = 0; k < ipv6Data->getNumAddresses(); k++) { |
|
Ipv6Address address = ipv6Data->getAddress(k); |
|
if (!address.isUnspecified() && address.isGlobal()) |
|
result.push_back(L3Address(address)); |
|
} |
|
} |
|
#endif // ifdef INET_WITH_IPv6 |
|
} |
|
} |
|
} |
|
} |
|
return result; |
|
} |
|
|
Also, Ping app doesn't work for the destAddresses=* when using NextHopAddresses
Also, destAddresess is inconsistent with destAddr parameter of Udp...App
PingApp is documented as sending to each interface, however it actually sends to each assigned address, so multiple Ipv6Addresses on the same interface or having both Ipv4 and Ipv6 addresses will result in multiple (consecutive) messages to that node.
See documentation saying every interface: https://doc.omnetpp.org/inet/api-current/neddoc/inet.applications.pingapp.PingApp.html
But code
inet/src/inet/applications/pingapp/PingApp.cc
Lines 539 to 575 in e471e06
Also, Ping app doesn't work for the destAddresses=* when using NextHopAddresses
Also, destAddresess is inconsistent with destAddr parameter of Udp...App