INET Framework for OMNeT++/OMNEST
inet::IInterfaceTable Class Referenceabstract

A C++ interface to abstract the functionality of InterfaceTable. More...

#include <IInterfaceTable.h>

Inheritance diagram for inet::IInterfaceTable:
inet::InterfaceTable

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 InterfaceEntryfindInterfaceByAddress (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 InterfaceEntrygetInterface (int pos) const =0
 Returns the InterfaceEntry specified by an index 0..numInterfaces-1. More...
 
virtual InterfaceEntrygetInterfaceById (int id) const =0
 Returns an interface by its Id. More...
 
virtual int getBiggestInterfaceId () const =0
 Returns the biggest interface Id. More...
 
virtual InterfaceEntrygetInterfaceByNodeOutputGateId (int id) const =0
 Returns an interface given by its getNodeOutputGateId(). More...
 
virtual InterfaceEntrygetInterfaceByNodeInputGateId (int id) const =0
 Returns an interface given by its getNodeInputGateId(). More...
 
virtual InterfaceEntrygetInterfaceByNetworkLayerGateIndex (int index)=0
 Returns an interface given by its getNetworkLayerGateIndex(). More...
 
virtual InterfaceEntrygetInterfaceByInterfaceModule (cModule *ifmod) const =0
 Returns an interface by one of its component module (e.g. More...
 
virtual InterfaceEntrygetInterfaceByName (const char *name) const =0
 Returns an interface given by its name. More...
 
virtual InterfaceEntrygetFirstLoopbackInterface () const =0
 Returns the first interface with the isLoopback flag set. More...
 
virtual InterfaceEntrygetFirstMulticastInterface () 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
 

Detailed Description

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.

See also
InterfaceTable, InterfaceEntry

Constructor & Destructor Documentation

virtual inet::IInterfaceTable::~IInterfaceTable ( )
inlinevirtual
55 {}

Member Function Documentation

virtual void inet::IInterfaceTable::addInterface ( InterfaceEntry entry)
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().

virtual MulticastGroupList inet::IInterfaceTable::collectMulticastGroups ( ) const
pure virtual

Returns all multicast group address, with it's interfaceId.

Implemented in inet::InterfaceTable.

virtual void inet::IInterfaceTable::deleteInterface ( InterfaceEntry entry)
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.

virtual InterfaceEntry* inet::IInterfaceTable::findInterfaceByAddress ( const L3Address address) const
pure virtual

Returns an interface given by its address.

Returns nullptr if not found.

Implemented in inet::InterfaceTable.

virtual int inet::IInterfaceTable::getBiggestInterfaceId ( ) const
pure virtual

Returns the biggest interface Id.

Implemented in inet::InterfaceTable.

Referenced by inet::IPv6Tunneling::createTunnel(), and inet::IPv6::routePacket().

virtual InterfaceEntry* inet::IInterfaceTable::getFirstLoopbackInterface ( ) const
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().

virtual InterfaceEntry* inet::IInterfaceTable::getFirstMulticastInterface ( ) const
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().

virtual InterfaceEntry* inet::IInterfaceTable::getInterface ( int  pos) const
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().

virtual InterfaceEntry* inet::IInterfaceTable::getInterfaceById ( int  id) const
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().

virtual InterfaceEntry* inet::IInterfaceTable::getInterfaceByInterfaceModule ( cModule *  ifmod) const
pure virtual
virtual InterfaceEntry* inet::IInterfaceTable::getInterfaceByNetworkLayerGateIndex ( int  index)
pure virtual
virtual InterfaceEntry* inet::IInterfaceTable::getInterfaceByNodeInputGateId ( int  id) const
pure virtual
virtual InterfaceEntry* inet::IInterfaceTable::getInterfaceByNodeOutputGateId ( int  id) const
pure virtual
virtual int inet::IInterfaceTable::getNumInterfaces ( ) const
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().

virtual void inet::IInterfaceTable::interfaceChanged ( simsignal_t  signalID,
const InterfaceEntryChangeDetails details 
)
protectedpure virtual

Implemented in inet::InterfaceTable.

virtual bool inet::IInterfaceTable::isLocalAddress ( const L3Address address) const
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().

virtual bool inet::IInterfaceTable::isNeighborAddress ( const L3Address address) const
pure virtual

Checks if the address is on the network of one of the interfaces, but not local.

Implemented in inet::InterfaceTable.

Friends And Related Function Documentation

friend class InterfaceEntry
friend

The documentation for this class was generated from the following file: