INET Framework for OMNeT++/OMNEST
|
A C++ interface to abstract the functionality of InterfaceTable. More...
#include <IInterfaceTable.h>
Public Member Functions | |
virtual | ~IInterfaceTable () |
virtual std::string | getFullPath () const =0 |
Module path name. More... | |
virtual cModule * | getHostModule () const =0 |
Returns the host or router this interface table lives in. More... | |
virtual bool | isLocalAddress (const L3Address &address) const =0 |
Checks if the address is a local one, i.e. More... | |
virtual bool | isNeighborAddress (const L3Address &address) const =0 |
Checks if the address is on the network of one of the interfaces, but not local. More... | |
virtual InterfaceEntry * | findInterfaceByAddress (const L3Address &address) const =0 |
Returns an interface given by its address. More... | |
virtual void | addInterface (InterfaceEntry *entry)=0 |
Adds an interface. More... | |
virtual void | deleteInterface (InterfaceEntry *entry)=0 |
Deletes the given interface from the table. More... | |
virtual int | getNumInterfaces () const =0 |
Returns the number of interfaces. More... | |
virtual InterfaceEntry * | getInterface (int pos) const =0 |
Returns the InterfaceEntry specified by an index 0..numInterfaces-1. More... | |
virtual InterfaceEntry * | getInterfaceById (int id) const =0 |
Returns an interface by its Id. More... | |
virtual int | getBiggestInterfaceId () const =0 |
Returns the biggest interface Id. More... | |
virtual InterfaceEntry * | getInterfaceByNodeOutputGateId (int id) const =0 |
Returns an interface given by its getNodeOutputGateId(). More... | |
virtual InterfaceEntry * | getInterfaceByNodeInputGateId (int id) const =0 |
Returns an interface given by its getNodeInputGateId(). More... | |
virtual InterfaceEntry * | getInterfaceByNetworkLayerGateIndex (int index)=0 |
Returns an interface given by its getNetworkLayerGateIndex(). More... | |
virtual InterfaceEntry * | getInterfaceByInterfaceModule (cModule *ifmod) const =0 |
Returns an interface by one of its component module (e.g. More... | |
virtual InterfaceEntry * | getInterfaceByName (const char *name) const =0 |
Returns an interface given by its name. More... | |
virtual InterfaceEntry * | getFirstLoopbackInterface () const =0 |
Returns the first interface with the isLoopback flag set. More... | |
virtual InterfaceEntry * | getFirstMulticastInterface () const =0 |
Returns the first multicast capable interface. More... | |
virtual MulticastGroupList | collectMulticastGroups () const =0 |
Returns all multicast group address, with it's interfaceId. More... | |
Protected Member Functions | |
virtual void | interfaceChanged (simsignal_t signalID, const InterfaceEntryChangeDetails *details)=0 |
Friends | |
class | InterfaceEntry |
A C++ interface to abstract the functionality of InterfaceTable.
Referring to InterfaceTable via this interface makes it possible to transparently replace InterfaceTable with a different implementation, without any change to the base INET.
|
pure virtual |
Adds an interface.
The entry->getInterfaceModule() will be used to discover and fill in getNetworkLayerGateIndex(), getNodeOutputGateId(), and getNodeInputGateId() in InterfaceEntry. It should be nullptr if this is a virtual interface (e.g. loopback).
Implemented in inet::InterfaceTable.
Referenced by inet::MACProtocolBase::registerInterface(), and inet::MACBase::registerInterface().
|
pure virtual |
Returns all multicast group address, with it's interfaceId.
Implemented in inet::InterfaceTable.
|
pure virtual |
Deletes the given interface from the table.
Indices of existing interfaces (see getInterface(int)) may change. It is an error if the given interface is not in the table.
Implemented in inet::InterfaceTable.
|
pure virtual |
Returns an interface given by its address.
Returns nullptr if not found.
Implemented in inet::InterfaceTable.
|
pure virtual |
Returns the biggest interface Id.
Implemented in inet::InterfaceTable.
Referenced by inet::IPv6Tunneling::createTunnel(), and inet::IPv6::routePacket().
|
pure virtual |
Returns the first interface with the isLoopback flag set.
(If there's no loopback, it returns nullptr – but this should never happen because InterfaceTable itself registers a loopback interface on startup.)
Implemented in inet::InterfaceTable.
Referenced by inet::IPv4::datagramLocalOut(), and inet::IPv6::handleMessageFromHL().
|
pure virtual |
Returns the first multicast capable interface.
If there is no such interface, then returns nullptr.
Implemented in inet::InterfaceTable.
Referenced by inet::IPv4::determineOutgoingInterfaceForMulticastDatagram().
|
pure virtual |
Module path name.
Implemented in inet::InterfaceTable.
Referenced by inet::FlatNetworkConfigurator::fillRoutingTables(), inet::L3AddressResolver::getIPv4AddressFrom(), inet::L3AddressResolver::getIPv6AddressFrom(), inet::L3AddressResolver::getMACAddressFrom(), inet::L3AddressResolver::getModuleIdAddressFrom(), and inet::L3AddressResolver::getModulePathAddressFrom().
|
pure virtual |
Returns the host or router this interface table lives in.
Implemented in inet::InterfaceTable.
Referenced by inet::IPv4NetworkConfigurator::findInterfaceOnLinkByNode(), inet::ospf::OSPFConfigReader::getInterfaceByXMLAttributesOf(), inet::NetworkConfiguratorBase::getWirelessId(), inet::InterfaceMatcher::linkContainsMatchingHost(), inet::IPv4NetworkConfigurator::linkContainsMatchingHostExcept(), inet::InterfaceMatcher::Selector::matches(), inet::NetworkConfiguratorBase::InterfaceMatcher::matches(), inet::IPv4NetworkConfigurator::readInterfaceConfiguration(), and inet::IPv4NetworkConfigurator::readMulticastGroupConfiguration().
|
pure virtual |
Returns the InterfaceEntry specified by an index 0..numInterfaces-1.
Throws an error if index is out of range.
Note that this index is NOT the same as interfaceId! Indices are not guaranteed to stay the same after interface addition/deletion, so cannot be used to reliably identify the interface. Use interfaceId to refer to interfaces from other modules or from messages/packets.
Implemented in inet::InterfaceTable.
Referenced by inet::visualizer::InterfaceTableVisualizerBase::addAllInterfaceVisualizations(), inet::FlatNetworkConfigurator::addDefaultRoutes(), inet::FlatNetworkConfigurator6::addOwnAdvPrefixRoutes(), inet::L3AddressResolver::addressOf(), inet::FlatNetworkConfigurator6::addStaticRoutes(), inet::GenericNetworkConfigurator::addStaticRoutes(), inet::FlatNetworkConfigurator::assignAddresses(), inet::IPv6NeighbourDiscovery::assignLinkLocalAddress(), inet::STPBase::chooseInterface(), inet::Ieee8021dRelay::chooseInterface(), inet::DHCPServer::chooseInterface(), inet::DHCPClient::chooseInterface(), inet::FlatNetworkConfigurator6::configureAdvPrefixes(), inet::IPv4NodeConfigurator::configureInterface(), inet::PIMInterfaceTable::configureInterfaces(), inet::GPSR::configureInterfaces(), inet::dymo::DYMO::configureInterfaces(), inet::L2NodeConfigurator::configureNode(), inet::GenericRoutingTable::configureRouterId(), inet::NetworkConfiguratorBase::determineGatewayForLink(), inet::NetworkConfiguratorBase::extractDeviceNeighbors(), inet::L2NetworkConfigurator::extractTopology(), inet::NetworkConfiguratorBase::extractTopology(), inet::NetworkConfiguratorBase::extractWirelessNeighbors(), inet::L3AddressResolver::findHostWithAddress(), inet::bgp::BGPRouting::findMyAS(), inet::PingApp::getAllAddresses(), inet::IPv6RoutingTable::getHomeAddress(), inet::GenericRoutingTable::getInterfaceByAddress(), inet::IPv6RoutingTable::getInterfaceByAddress(), inet::ospf::OSPFConfigReader::getInterfaceByXMLAttributesOf(), inet::L3AddressResolver::getIPv4AddressFrom(), inet::L3AddressResolver::getIPv6AddressFrom(), inet::L3AddressResolver::getMACAddressFrom(), inet::L3AddressResolver::getModuleIdAddressFrom(), inet::L3AddressResolver::getModulePathAddressFrom(), inet::GPSR::getSelfAddress(), inet::GenericRoutingTable::initialize(), inet::ProbabilisticBroadcast::initialize(), inet::WiseRoute::initialize(), inet::GlobalARP::initialize(), inet::Flood::initialize(), inet::IPv6RoutingTable::initialize(), inet::IGMPv2::initialize(), inet::IPv6NeighbourDiscovery::initialize(), inet::LDP::initialize(), inet::IGMPv3::initialize(), inet::TED::initializeTED(), inet::IPv6RoutingTable::isHomeAddress(), inet::bgp::BGPRouting::isInInterfaceTable(), inet::GenericRoutingTable::isLocalAddress(), inet::IPv6RoutingTable::isLocalAddress(), inet::IPv6RoutingTable::isOnLinkAddress(), inet::UDP::joinMulticastGroups(), inet::UDP::leaveMulticastGroups(), inet::ICMP::possiblyLocalBroadcast(), inet::L2NodeConfigurator::prepareNode(), inet::IPv4NodeConfigurator::prepareNode(), inet::sctp::SCTPAssociation::processInitArrived(), inet::LDP::rebuildFecList(), inet::IPv4::routeLocalBroadcastPacket(), inet::GenericNetworkProtocol::routeMulticastPacket(), inet::IPv6::routeMulticastPacket(), inet::NetworkProtocolBase::sendDown(), and inet::sctp::SCTPAssociation::sendInit().
|
pure virtual |
Returns an interface by its Id.
Ids are guaranteed to be invariant to interface deletions/additions. Returns nullptr if there is no such interface (This allows detecting stale IDs without raising an error.)
Implemented in inet::InterfaceTable.
Referenced by inet::IPv6RoutingTable::addDefaultRoute(), inet::ospf::Router::addExternalRouteInIPTable(), inet::ospf::RoutingTableEntry::addNextHop(), inet::IPv6RoutingTable::addOrUpdateOnLinkPrefix(), inet::IPv6RoutingTable::addOrUpdateOwnAdvPrefix(), inet::IPv6RoutingTable::addStaticRoute(), inet::xMIPv6::cancelEntries(), inet::xMIPv6::createAndSendBAMessage(), inet::IPv6Tunneling::decapsulateDatagram(), inet::GenericNetworkProtocol::encapsulate(), inet::visualizer::InterfaceTableCanvasVisualizer::getInterfaceEntry(), inet::MatrixCloudDelayer::getPathOfConnectedNodeOnIfaceID(), inet::IPv6::handleMessageFromHL(), inet::IPv4::handlePacketFromARP(), inet::IPv4::handlePacketFromHL(), inet::IPv6NeighbourDiscovery::initiateAddressResolution(), inet::IPv6NeighbourDiscovery::initiateNeighbourUnreachabilityDetection(), inet::ospf::OSPFConfigReader::joinMulticastGroups(), inet::UDP::joinMulticastGroups(), inet::UDP::leaveMulticastGroups(), inet::ICMP::possiblyLocalBroadcast(), inet::ARP::processARPPacket(), inet::IPv6NeighbourDiscovery::processARTimeout(), inet::PIMSM::processAssertPacket(), inet::xMIPv6::processBAMessage(), inet::xMIPv6::processBRRMessage(), inet::xMIPv6::processBUMessage(), inet::UDP::processCommandFromApp(), inet::xMIPv6::processCoTMessage(), inet::IPv6NeighbourDiscovery::processDADTimeout(), inet::ICMPv6::processEchoRequest(), inet::xMIPv6::processHoTMessage(), inet::IGMPv2::processIgmpMessage(), inet::IPv6NeighbourDiscovery::processIPv6Datagram(), inet::PIMSM::processJoinPrunePacket(), inet::LDP::processLDPHello(), inet::IPv6NeighbourDiscovery::processNAForIncompleteNCEState(), inet::IPv6NeighbourDiscovery::processNAForOtherNCEStates(), inet::IPv6NeighbourDiscovery::processNAPacket(), inet::IPv6NeighbourDiscovery::processNSPacket(), inet::IPv6NeighbourDiscovery::processNUDTimeout(), inet::IGMPv3::processQuery(), inet::IPv6NeighbourDiscovery::processRAForRouterUpdates(), inet::IPv6NeighbourDiscovery::processRAPacket(), inet::IGMPv3::processReport(), inet::IPv6NeighbourDiscovery::processRSPacket(), inet::IPv6::resolveMACAddressAndSendPacket(), inet::NetworkProtocolBase::sendDown(), inet::ospf::Interface::setIfIndex(), inet::ospf::Router::updateExternalRoute(), inet::dymo::DYMO::updateRoute(), inet::xMIPv6::validateBAck(), and inet::xMIPv6::validateCoTMessage().
|
pure virtual |
Returns an interface by one of its component module (e.g.
PPP). Returns nullptr if not found.
Implemented in inet::InterfaceTable.
Referenced by inet::DiffservUtil::getInterfaceDatarate(), inet::visualizer::VisualizerBase::getInterfaceEntry(), inet::GenericARP::mapUnicastAddress(), inet::visualizer::Ieee80211VisualizerBase::receiveSignal(), and inet::ModulePathAddress::tryParse().
|
pure virtual |
Returns an interface given by its name.
Returns nullptr if not found.
Implemented in inet::InterfaceTable.
Referenced by inet::L3AddressResolver::addressOf(), inet::DHCPServer::chooseInterface(), inet::DHCPClient::chooseInterface(), inet::AODVRouting::createRoute(), inet::LDP::findPeerAddrFromInterface(), inet::ospf::OSPFConfigReader::getInterfaceByXMLAttributesOf(), inet::EtherEncap::initialize(), inet::ieee80211::Ieee80211AgentSTA::initialize(), inet::LinkStateRouting::initialize(), inet::ieee80211::Ieee80211MgmtSTA::initialize(), inet::ieee80211::Ieee80211Mac::isInterfaceRegistered(), inet::RoutingTableParser::parseInterfaces(), inet::RoutingTableParser::parseRouting(), inet::IPv6RoutingTable::parseXMLConfigFile(), inet::MPLS::processMPLSPacketFromL2(), inet::IPv4NetworkConfigurator::readManualMulticastRouteConfiguration(), inet::IPv4NetworkConfigurator::resolveInterfaceAndGateway(), inet::ospf::OSPFConfigReader::resolveInterfaceName(), inet::GPSR::routeDatagram(), inet::AODVRouting::sendAODVPacket(), inet::UDPBasicApp::setSocketOptions(), inet::HostAutoConfigurator::setupNetworkLayer(), and inet::MPLS::tryLabelAndForwardIPv4Datagram().
|
pure virtual |
Returns an interface given by its getNetworkLayerGateIndex().
Returns nullptr if not found.
Implemented in inet::InterfaceTable.
Referenced by inet::PIMSM::getIncomingInterface(), inet::GenericNetworkProtocol::getSourceInterfaceFrom(), inet::IPv4::getSourceInterfaceFrom(), inet::IPv6::getSourceInterfaceFrom(), and inet::MPLS::processMPLSPacketFromL2().
|
pure virtual |
Returns an interface given by its getNodeInputGateId().
Returns nullptr if not found.
Implemented in inet::InterfaceTable.
Referenced by inet::FlatNetworkConfigurator6::addStaticRoutes(), inet::NetworkConfiguratorBase::extractTopology(), inet::NetworkConfiguratorBase::extractWiredNeighbors(), and inet::TED::initializeTED().
|
pure virtual |
Returns an interface given by its getNodeOutputGateId().
Returns nullptr if not found.
Implemented in inet::InterfaceTable.
Referenced by inet::FlatNetworkConfigurator6::addStaticRoutes(), inet::NetworkConfiguratorBase::extractTopology(), inet::FlatNetworkConfigurator::fillRoutingTables(), inet::Ieee8021dRelay::getPortInterfaceData(), inet::STPBase::getPortInterfaceEntry(), and inet::STPTester::isForwarding().
|
pure virtual |
Returns the number of interfaces.
Implemented in inet::InterfaceTable.
Referenced by inet::FlatNetworkConfigurator::addDefaultRoutes(), inet::FlatNetworkConfigurator6::addOwnAdvPrefixRoutes(), inet::L3AddressResolver::addressOf(), inet::FlatNetworkConfigurator6::addStaticRoutes(), inet::GenericNetworkConfigurator::addStaticRoutes(), inet::FlatNetworkConfigurator::assignAddresses(), inet::IPv6NeighbourDiscovery::assignLinkLocalAddress(), inet::STPBase::chooseInterface(), inet::Ieee8021dRelay::chooseInterface(), inet::DHCPServer::chooseInterface(), inet::DHCPClient::chooseInterface(), inet::FlatNetworkConfigurator6::configureAdvPrefixes(), inet::IPv4NodeConfigurator::configureInterface(), inet::PIMInterfaceTable::configureInterfaces(), inet::GPSR::configureInterfaces(), inet::dymo::DYMO::configureInterfaces(), inet::L2NodeConfigurator::configureNode(), inet::GenericRoutingTable::configureRouterId(), inet::NetworkConfiguratorBase::determineGatewayForLink(), inet::NetworkConfiguratorBase::extractDeviceNeighbors(), inet::L2NetworkConfigurator::extractTopology(), inet::NetworkConfiguratorBase::extractTopology(), inet::NetworkConfiguratorBase::extractWirelessNeighbors(), inet::L3AddressResolver::findHostWithAddress(), inet::bgp::BGPRouting::findMyAS(), inet::PingApp::getAllAddresses(), inet::IPv6RoutingTable::getHomeAddress(), inet::GenericRoutingTable::getInterfaceByAddress(), inet::IPv6RoutingTable::getInterfaceByAddress(), inet::ospf::OSPFConfigReader::getInterfaceByXMLAttributesOf(), inet::L3AddressResolver::getIPv4AddressFrom(), inet::L3AddressResolver::getIPv6AddressFrom(), inet::L3AddressResolver::getMACAddressFrom(), inet::L3AddressResolver::getModuleIdAddressFrom(), inet::L3AddressResolver::getModulePathAddressFrom(), inet::GPSR::getSelfAddress(), inet::GenericNetworkProtocol::handleMessageFromHL(), inet::IPv6::handleMessageFromHL(), inet::IPv4::handlePacketFromHL(), inet::GenericRoutingTable::initialize(), inet::GlobalARP::initialize(), inet::IPv6RoutingTable::initialize(), inet::IGMPv2::initialize(), inet::IPv6NeighbourDiscovery::initialize(), inet::LDP::initialize(), inet::IGMPv3::initialize(), inet::TED::initializeTED(), inet::IPv6RoutingTable::isHomeAddress(), inet::bgp::BGPRouting::isInInterfaceTable(), inet::GenericRoutingTable::isLocalAddress(), inet::IPv6RoutingTable::isLocalAddress(), inet::IPv6RoutingTable::isOnLinkAddress(), inet::physicallayer::RadioMedium::isRadioMacAddress(), inet::UDP::joinMulticastGroups(), inet::UDP::leaveMulticastGroups(), inet::ICMP::possiblyLocalBroadcast(), inet::L2NodeConfigurator::prepareNode(), inet::IPv4NodeConfigurator::prepareNode(), inet::sctp::SCTPAssociation::processInitArrived(), inet::LDP::rebuildFecList(), inet::IPv4::routeLocalBroadcastPacket(), inet::GenericNetworkProtocol::routeMulticastPacket(), inet::IPv6::routeMulticastPacket(), inet::NetworkProtocolBase::sendDown(), inet::sctp::SCTPAssociation::sendInit(), and inet::xMIPv6::triggerRouteOptimization().
|
protectedpure virtual |
Implemented in inet::InterfaceTable.
|
pure virtual |
Checks if the address is a local one, i.e.
one of the host's.
Implemented in inet::InterfaceTable.
Referenced by inet::Flood::handleLowerPacket(), and inet::UDPBasicBurst::processStart().
|
pure virtual |
Checks if the address is on the network of one of the interfaces, but not local.
Implemented in inet::InterfaceTable.
|
friend |