|
INET Framework for OMNeT++/OMNEST
|
#include <ipSplitter.h>
Protected Member Functions | |
| virtual void | initialize () |
| virtual void | handleMessage (cMessage *msg) |
Definition at line 26 of file ipSplitter.h.
| void IpSplitter::handleMessage | ( | cMessage * | msg | ) | [protected, virtual] |
Definition at line 27 of file ipSplitter.cc.
{
cGate* gate = msg->getArrivalGate();
std::string gateName = gate->getBaseName();
int gateIndex = gate->getIndex();
// packet coming from network layer modules within the router
if (gateName == "ipv4In" || gateName == "ipv6In" || gateName == "isisIn")
{
// send packet to out interface
this->send(msg, "ifOut", gateIndex);
// packet coming from in interfaces
}
else
{
// IPv6 datagram, send it to networkLayer6 via ipv6Out
if (dynamic_cast<IPv6Datagram *>(msg))
{
this->send(msg, "ipv6Out", gateIndex);
}
else
{
if(dynamic_cast<ISISMessage *>(msg))
{
this->send(msg, "isisOut", gateIndex);
}
// other (IPv4), send it to networkLayer via ipv4Out
else
{
this->send(msg, "ipv4Out", gateIndex);
}
}
}
}
| void IpSplitter::initialize | ( | ) | [protected, virtual] |
Definition at line 23 of file ipSplitter.cc.
{
}