INET Framework for OMNeT++/OMNEST
|
Maps protocol numbers to output gates. More...
#include <ProtocolMap.h>
Classes | |
struct | Entry |
Public Member Functions | |
ProtocolMapping () | |
~ProtocolMapping () | |
void | addProtocolMapping (int protocol, int gateIndex) |
void | parseProtocolMapping (const char *s) |
int | findOutputGateForProtocol (int protocol) const |
find output gate index for protocol ID and returns it. More... | |
int | getOutputGateForProtocol (int protocol) const |
find output gate index for protocol ID and returns it. More... | |
Protected Types | |
typedef std::vector< Entry > | Entries |
Protected Attributes | |
Entries | entries |
Maps protocol numbers to output gates.
|
protected |
void inet::ProtocolMapping::addProtocolMapping | ( | int | protocol, |
int | gateIndex | ||
) |
Referenced by inet::GenericNetworkProtocol::handleMessage(), inet::IPv6::handleMessage(), inet::IPv4::handleMessage(), and inet::NetworkProtocolBase::handleUpperCommand().
int inet::ProtocolMapping::findOutputGateForProtocol | ( | int | protocol | ) | const |
find output gate index for protocol ID and returns it.
Returns -2 if not found.
Referenced by addProtocolMapping(), getOutputGateForProtocol(), inet::IPv6::localDeliver(), inet::IPv4::reassembleAndDeliverFinish(), and inet::GenericNetworkProtocol::sendDatagramToHL().
int inet::ProtocolMapping::getOutputGateForProtocol | ( | int | protocol | ) | const |
find output gate index for protocol ID and returns it.
Throws an error if not found.
Referenced by inet::IPv4::handleIncomingICMP(), inet::IPv6::handleReceivedICMP(), inet::IPv4::sendOnTransportOutGateByProtocolId(), and inet::NetworkProtocolBase::sendUp().
void inet::ProtocolMapping::parseProtocolMapping | ( | const char * | s | ) |
|
protected |
Referenced by addProtocolMapping(), findOutputGateForProtocol(), and parseProtocolMapping().