Skip to content

Commit

Permalink
several fingerprints PASS: almost all ethernet and udpapp/tcpapp
Browse files Browse the repository at this point in the history
Errors:
  /examples/ethernet/vlan/ -f omnetpp.ini -c NoVlan -r 0 Ipv4 (runtime error with exitcode=1: <!> Error: Referenced module is ambiguous for type inet::queueing::IPassivePacketSink (VlanExample.host1.ipv4.up, VlanExample.host1.nl) -- in module (inet::MessageDispatcher) VlanExample.host1.tn (id=27), at t=0s, event #1)
  /examples/ethernet/arptest2/ -f omnetpp.ini -c ARPTest -r 0 EthernetMac EthernetCsmaMac Ipv4 (runtime error with exitcode=1: <!> Error: Referenced module is ambiguous for type inet::queueing::IPassivePacketSink (ARPTest.router1.ethernet, ARPTest.router1.eth[0].queue) -- in module (inet::MessageDispatcher) ARPTest.router1.li (id=131), at t=1.00005765s, event #3)
  /examples/ethernet/vlan/ -f omnetpp.ini -c BetweenSwitches -r 0 Ipv4 (runtime error with exitcode=1: <!> Error: Referenced module is ambiguous for type inet::queueing::IPassivePacketSink (VlanExample.host1.ipv4.up, VlanExample.host1.nl) -- in module (inet::MessageDispatcher) VlanExample.host1.tn (id=29), at t=0s, event #1)
  /examples/ethernet/vlan/ -f omnetpp.ini -c BetweenHosts -r 0 Ipv4 (runtime error with exitcode=1: <!> Error: Referenced module is ambiguous for type inet::queueing::IPassivePacketSink (VlanExample.host1.ipv4.up, VlanExample.host1.nl) -- in module (inet::MessageDispatcher) VlanExample.host1.tn (id=29), at t=0s, event #1)
  /examples/ethernet/vlan/ -f omnetpp.ini -c DoubleTagged -r 0 Ipv4 (runtime error with exitcode=1: <!> Error: Referenced module is ambiguous for type inet::queueing::IPassivePacketSink (VlanExample.host1.ipv4.up, VlanExample.host1.nl) -- in module (inet::MessageDispatcher) VlanExample.host1.tn (id=29), at t=0s, event #1)
  /examples/ethernet/vlan/ -f omnetpp.ini -c Asymmetric -r 0 Ipv4 (runtime error with exitcode=1: <!> Error: Referenced module is ambiguous for type inet::queueing::IPassivePacketSink (VlanExample.host1.ipv4.up, VlanExample.host1.nl) -- in module (inet::MessageDispatcher) VlanExample.host1.tn (id=29), at t=0s, event #1)
  /examples/ethernet/vlan/ -f omnetpp.ini -c VirtualInterface -r 0 Ipv4 (runtime error with exitcode=1: <!> Error: Redefine handleMessage() or specify non-zero stack size to use activity() -- in module (inet::MessageDispatcher) VlanExample.host1.li (id=20), at t=0s, event #1)
Failures:
  /examples/ethernet/arptest/ -f omnetpp.ini -c ARPTest -r 0 EthernetMac Ipv4 (some fingerprint mismatch: actual '5560-c3bf/~tND', expected: '7156-c692/~tND')
  • Loading branch information
levy committed Sep 25, 2024
1 parent 00b2242 commit 859b8cc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
5 changes: 4 additions & 1 deletion src/inet/linklayer/ethernet/base/EthernetMacBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ void EthernetMacBase::initialize(int stage)
if (stage == INITSTAGE_LOCAL) {
fcsMode = parseFcsMode(par("fcsMode"));
allowNonstandardBitrate = par("allowNonstandardBitrate");
upperLayerSink.reference(gate("upperLayerOut"), true);
DispatchProtocolReq dispatchProtocolReq;
dispatchProtocolReq.setProtocol(&Protocol::ethernetMac);
dispatchProtocolReq.setServicePrimitive(SP_INDICATION);
upperLayerSink.reference(gate("upperLayerOut"), true, &dispatchProtocolReq);
physInGate = gate("phys$i");
physOutGate = gate("phys$o");
lowerLayerInGateId = physInGate->getId();
Expand Down
4 changes: 3 additions & 1 deletion src/inet/linklayer/ethernet/basic/EthernetEncapsulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ void EthernetEncapsulation::initialize(int stage)
WATCH(seqNum);
totalFromHigherLayer = totalFromMAC = totalPauseSent = 0;
interfaceTable.reference(this, "interfaceTableModule", true);
lowerLayerSink.reference(gate("lowerLayerOut"), true);
PacketProtocolTag packetProtocolTag;
packetProtocolTag.setProtocol(&Protocol::ethernetMac);
lowerLayerSink.reference(gate("lowerLayerOut"), true, &packetProtocolTag);
upperLayerSink.reference(gate("upperLayerOut"), true);

WATCH_PTRSET(upperProtocols);
Expand Down
19 changes: 13 additions & 6 deletions src/inet/networklayer/common/NetworkInterface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,17 @@ void NetworkInterface::initialize(int stage)
else
wireless = rxIn == nullptr && txOut == nullptr;

if (hasPar("protocol")) {
const char *protocolName = par("protocol");
if (*protocolName != '\0')
protocol = Protocol::getProtocol(protocolName);
}

upperLayerInConsumer.reference(upperLayerIn, false, nullptr, 1);
upperLayerOutConsumer.reference(upperLayerOut, false, nullptr, 1);
DispatchProtocolReq dispatchProtocolReq;
dispatchProtocolReq.setProtocol(protocol);
dispatchProtocolReq.setServicePrimitive(SP_INDICATION);
upperLayerOutConsumer.reference(upperLayerOut, false, protocol != nullptr ? &dispatchProtocolReq : nullptr, 1);
interfaceTable.reference(this, "interfaceTableModule", false);
setInterfaceName(utils::stripnonalnum(getFullName()).c_str());
setCarrier(computeCarrier());
Expand All @@ -145,11 +154,6 @@ void NetworkInterface::initialize(int stage)
}
}
else if (stage == INITSTAGE_NETWORK_INTERFACE_CONFIGURATION) {
if (hasPar("protocol")) {
const char *protocolName = par("protocol");
if (*protocolName != '\0')
protocol = Protocol::getProtocol(protocolName);
}
if (hasPar("address")) {
const char *address = par("address");
if (!strcmp(address, "auto")) {
Expand Down Expand Up @@ -719,6 +723,9 @@ cGate *NetworkInterface::lookupModuleInterface(cGate *gate, const std::type_info
auto interfaceReq = dynamic_cast<const InterfaceReq *>(arguments);
if (interfaceReq != nullptr && interfaceReq->getInterfaceId() == getInterfaceId())
return findModuleInterface(gate, type, interfaceReq == nullptr ? arguments : nullptr, 1);
auto packetProtocolTag = dynamic_cast<const PacketProtocolTag *>(arguments);
if (packetProtocolTag != nullptr && hasPar("protocol") && !strcmp(packetProtocolTag->getProtocol()->getName(), par("protocol")))
return findModuleInterface(gate, type, packetProtocolTag == nullptr ? arguments : nullptr, 1);
}
}
else if (gate->isName("upperLayerOut")) {
Expand Down

0 comments on commit 859b8cc

Please sign in to comment.