|
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 NetworkInterface * | findInterfaceByAddress (const L3Address &address) const =0 |
| Returns an interface given by its address. More... | |
| virtual void | addInterface (NetworkInterface *entry)=0 |
| Adds an interface. More... | |
| virtual void | deleteInterface (NetworkInterface *entry)=0 |
| Deletes the given interface from the table. More... | |
| virtual int | getNumInterfaces () const =0 |
| Returns the number of interfaces. More... | |
| virtual NetworkInterface * | getInterface (int pos) const =0 |
| Returns the NetworkInterface specified by an index 0..numInterfaces-1. More... | |
| virtual NetworkInterface * | findInterfaceById (int id) const =0 |
| Returns an interface by its Id. More... | |
| virtual NetworkInterface * | getInterfaceById (int id) const =0 |
| Returns an interface by its Id. More... | |
| virtual int | getBiggestInterfaceId () const =0 |
| Returns the biggest interface Id. More... | |
| virtual NetworkInterface * | findInterfaceByNodeOutputGateId (int id) const =0 |
| Returns an interface given by its getNodeOutputGateId(). More... | |
| virtual NetworkInterface * | findInterfaceByNodeInputGateId (int id) const =0 |
| Returns an interface given by its getNodeInputGateId(). More... | |
| virtual NetworkInterface * | findInterfaceByInterfaceModule (cModule *ifmod) const =0 |
| Returns an interface by one of its component module (e.g. More... | |
| virtual NetworkInterface * | findInterfaceByName (const char *name) const =0 |
| Returns an interface given by its name. More... | |
| virtual NetworkInterface * | findFirstLoopbackInterface () const =0 |
| Returns the first interface with the isLoopback flag set. More... | |
| virtual NetworkInterface * | findFirstNonLoopbackInterface () const =0 |
| Returns the first interface with the isLoopback flag unset. More... | |
| virtual NetworkInterface * | findFirstMulticastInterface () 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 NetworkInterfaceChangeDetails *details)=0 |
Friends | |
| class | NetworkInterface |
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 NetworkInterface. It should be nullptr if this is a virtual interface (e.g. loopback).
Implemented in inet::InterfaceTable.
|
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 the first interface with the isLoopback flag set.
If there's no loopback, it returns nullptr.
Implemented in inet::InterfaceTable.
|
pure virtual |
Returns the first multicast capable interface.
If there is no such interface, then returns nullptr.
Implemented in inet::InterfaceTable.
|
pure virtual |
Returns the first interface with the isLoopback flag unset.
If there's no non-loopback, it returns nullptr.
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 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.
|
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(), 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::ospfv3::Ospfv3Interface::detailedInfo(), inet::ospfv3::Ospfv3Interface::getInterfaceMTU(), inet::TunLoopbackApp::initialize(), inet::InterfaceOperationBase::initialize(), inet::TunnelApp::initialize(), inet::LinkStateRouting::initialize(), inet::ieee80211::Ieee80211Mac::isInterfaceRegistered(), inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterfaces6Config(), inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterfacesConfig(), inet::eigrp::EigrpDeviceConfigurator::loadEigrpProcesses6Config(), inet::eigrp::EigrpDeviceConfigurator::loadEigrpProcessesConfig(), inet::ospfv3::Ospfv3Interface::originateLinkLSA(), inet::ospfv3::Ospfv3Interface::Ospfv3Interface(), inet::RoutingTableParser::parseInterfaces(), inet::RoutingTableParser::parseRouting(), inet::Ipv4NetworkConfigurator::readManualMulticastRouteConfiguration(), inet::Ipv4NetworkConfigurator::resolveInterfaceAndGateway(), inet::UdpSocketIo::setSocketOptions(), and inet::UdpBasicApp::setSocketOptions().
|
pure virtual |
Returns an interface given by its getNodeInputGateId().
Returns nullptr if not found.
Implemented in inet::InterfaceTable.
Referenced by inet::Ipv6FlatNetworkConfigurator::addStaticRoutes(), inet::NetworkConfiguratorBase::extractTopology(), inet::L3NetworkConfiguratorBase::extractTopology(), inet::L3NetworkConfiguratorBase::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::Ipv6FlatNetworkConfigurator::addStaticRoutes(), inet::NetworkConfiguratorBase::extractTopology(), inet::L3NetworkConfiguratorBase::extractTopology(), inet::Ipv4FlatNetworkConfigurator::fillRoutingTables(), and inet::StpTester::isForwarding().
|
pure virtual |
Returns the biggest interface Id.
Implemented in inet::InterfaceTable.
|
pure virtual |
Module path name.
Implemented in inet::InterfaceTable.
Referenced by inet::Ipv4FlatNetworkConfigurator::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::L3AddressResolver::findHostWithMacAddress(), inet::Ipv4NetworkConfigurator::findInterfaceOnLinkByNode(), inet::ospfv2::Ospfv2ConfigReader::findMatchingConfig(), inet::ospfv2::Ospfv2ConfigReader::getInterfaceByXMLAttributesOf(), inet::L3NetworkConfiguratorBase::getWirelessId(), inet::InterfaceMatcher::linkContainsMatchingHost(), inet::Ipv4NetworkConfigurator::linkContainsMatchingHostExcept(), inet::InterfaceMatcher::Selector::matches(), inet::L3NetworkConfiguratorBase::InterfaceMatcher::matches(), inet::Ipv4NetworkConfigurator::readInterfaceConfiguration(), and inet::Ipv4NetworkConfigurator::readMulticastGroupConfiguration().
|
pure virtual |
Returns the NetworkInterface 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::Ipv4FlatNetworkConfigurator::addDefaultRoutes(), inet::Ipv6FlatNetworkConfigurator::addOwnAdvPrefixRoutes(), inet::L3AddressResolver::addressOf(), inet::Ipv6FlatNetworkConfigurator::addStaticRoutes(), inet::NextHopNetworkConfigurator::addStaticRoutes(), inet::Ipv4FlatNetworkConfigurator::assignAddresses(), inet::DhcpServer::chooseInterface(), inet::DhcpClient::chooseInterface(), inet::Ipv6FlatNetworkConfigurator::configureAdvPrefixes(), inet::PimInterfaceTable::configureInterfaces(), inet::L3NetworkConfiguratorBase::determineGatewayForLink(), inet::L3NetworkConfiguratorBase::extractDeviceNeighbors(), inet::NetworkConfiguratorBase::extractTopology(), inet::L2NetworkConfigurator::extractTopology(), inet::L3NetworkConfiguratorBase::extractTopology(), inet::L3NetworkConfiguratorBase::extractWirelessNeighbors(), inet::L3AddressResolver::findInterfaceWithMacAddress(), inet::bgp::BgpConfigReader::findMyAS(), inet::PingApp::getAllAddresses(), inet::ospfv2::Ospfv2ConfigReader::getInterfaceByXMLAttributesOf(), inet::L3AddressResolver::getIpv4AddressFrom(), inet::L3AddressResolver::getIpv6AddressFrom(), inet::L3AddressResolver::getMacAddressFrom(), inet::L3AddressResolver::getModuleIdAddressFrom(), inet::L3AddressResolver::getModulePathAddressFrom(), inet::NextHopRoutingTable::initialize(), inet::ospfv2::Router::isDirectRoute(), inet::bgp::BgpConfigReader::isInInterfaceTable(), inet::ospfv3::Ospfv3Process::isInInterfaceTable(), inet::ospfv3::Ospfv3Process::isInInterfaceTable6(), inet::ospfv2::Ospfv2ConfigReader::loadConfigFromXML(), inet::eigrp::EigrpDeviceConfigurator::loadEigrpIPv4Networks(), inet::sctp::SctpAssociation::processInitArrived(), and inet::sctp::SctpAssociation::sendInit().
|
pure virtual |
Returns an interface by its Id.
Ids are guaranteed to be invariant to interface deletions/additions. Throws an error if there is no such interface.
Implemented in inet::InterfaceTable.
Referenced by inet::ospfv2::Router::addExternalRouteInIPTable(), inet::ospfv3::Ospfv3RoutingTableEntry::addNextHop(), inet::ospfv2::Ospfv2RoutingTableEntry::addNextHop(), inet::ospfv3::Ospfv3Ipv4RoutingTableEntry::addNextHop(), inet::visualizer::InterfaceTableCanvasVisualizer::getNetworkInterface(), inet::ospfv2::Ospfv2ConfigReader::joinMulticastGroups(), inet::ospfv3::Ospfv3Interface::Ospfv3Interface(), inet::Icmpv6::processEchoRequest(), inet::visualizer::Ieee80211CanvasVisualizer::refreshDisplay(), inet::ospfv2::Ospfv2Interface::setIfIndex(), and inet::ospfv2::Router::updateExternalRoute().
|
pure virtual |
Returns the number of interfaces.
Implemented in inet::InterfaceTable.
Referenced by inet::Ipv4FlatNetworkConfigurator::addDefaultRoutes(), inet::Ipv6FlatNetworkConfigurator::addOwnAdvPrefixRoutes(), inet::L3AddressResolver::addressOf(), inet::Ipv6FlatNetworkConfigurator::addStaticRoutes(), inet::NextHopNetworkConfigurator::addStaticRoutes(), inet::Ipv4FlatNetworkConfigurator::assignAddresses(), inet::DhcpServer::chooseInterface(), inet::DhcpClient::chooseInterface(), inet::Ipv6FlatNetworkConfigurator::configureAdvPrefixes(), inet::PimInterfaceTable::configureInterfaces(), inet::L3NetworkConfiguratorBase::determineGatewayForLink(), inet::L3NetworkConfiguratorBase::extractDeviceNeighbors(), inet::NetworkConfiguratorBase::extractTopology(), inet::L2NetworkConfigurator::extractTopology(), inet::L3NetworkConfiguratorBase::extractTopology(), inet::L3NetworkConfiguratorBase::extractWirelessNeighbors(), inet::L3AddressResolver::findInterfaceWithMacAddress(), inet::bgp::BgpConfigReader::findMyAS(), inet::PingApp::getAllAddresses(), inet::ospfv2::Ospfv2ConfigReader::getInterfaceByXMLAttributesOf(), inet::L3AddressResolver::getIpv4AddressFrom(), inet::L3AddressResolver::getIpv6AddressFrom(), inet::L3AddressResolver::getMacAddressFrom(), inet::L3AddressResolver::getModuleIdAddressFrom(), inet::L3AddressResolver::getModulePathAddressFrom(), inet::NextHopRoutingTable::initialize(), inet::ospfv2::Router::isDirectRoute(), inet::bgp::BgpConfigReader::isInInterfaceTable(), inet::ospfv3::Ospfv3Process::isInInterfaceTable(), inet::ospfv3::Ospfv3Process::isInInterfaceTable6(), inet::ospfv2::Ospfv2ConfigReader::loadConfigFromXML(), inet::eigrp::EigrpDeviceConfigurator::loadEigrpIPv4Networks(), inet::physicallayer::RadioMedium::matchesMacAddressFilter(), inet::sctp::SctpAssociation::processInitArrived(), and inet::sctp::SctpAssociation::sendInit().
|
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::L3AddressResolver::findHostWithAddress(), 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 |