|
INET Framework for OMNeT++/OMNEST
|
#include <IInterfaceTable.h>
Public Member Functions | |
| virtual | ~IInterfaceTable () |
| virtual std::string | getFullPath () const =0 |
| virtual void | addInterface (InterfaceEntry *entry, cModule *ifmod)=0 |
| virtual void | deleteInterface (InterfaceEntry *entry)=0 |
| virtual int | getNumInterfaces ()=0 |
| virtual InterfaceEntry * | getInterface (int pos)=0 |
| virtual InterfaceEntry * | getInterfaceById (int id)=0 |
| virtual InterfaceEntry * | getInterfaceByNodeOutputGateId (int id)=0 |
| virtual InterfaceEntry * | getInterfaceByNodeInputGateId (int id)=0 |
| virtual InterfaceEntry * | getInterfaceByNetworkLayerGateIndex (int index)=0 |
| virtual InterfaceEntry * | getInterfaceByName (const char *name)=0 |
| virtual InterfaceEntry * | getFirstLoopbackInterface ()=0 |
Protected Member Functions | |
| virtual void | interfaceChanged (InterfaceEntry *entry, int category)=0 |
Friends | |
| class | InterfaceEntry |
A C++ interface to abstract the functionality of IInterfaceTable. Referring to IInterfaceTable via this interface makes it possible to transparently replace IInterfaceTable with a different implementation, without any change to the base INET.
Definition at line 34 of file IInterfaceTable.h.
| virtual IInterfaceTable::~IInterfaceTable | ( | ) | [inline, virtual] |
Definition at line 43 of file IInterfaceTable.h.
{}
| virtual void IInterfaceTable::addInterface | ( | InterfaceEntry * | entry, |
| cModule * | ifmod | ||
| ) | [pure virtual] |
Adds an interface. The second argument should be a module which belongs to the physical interface (e.g. PPP or EtherMac) -- it will be used to discover and fill in getNetworkLayerGateIndex(), getNodeOutputGateId(), and getNodeInputGateId() in InterfaceEntry. It should be NULL if this is a virtual interface (e.g. loopback).
Implemented in AnsaInterfaceTable, and InterfaceTable.
Referenced by ExtInterface::registerInterface(), PPP::registerInterface(), AnsaPPP::registerInterface(), Mac80211::registerInterface(), CSMAMacLayer::registerInterface(), EtherMACBase::registerInterface(), AnsaEtherMACBase::registerInterface(), and Ieee80211Mac::registerInterface().
| virtual void 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 AnsaInterfaceTable, and InterfaceTable.
| virtual InterfaceEntry* IInterfaceTable::getFirstLoopbackInterface | ( | ) | [pure virtual] |
Returns the first interface with the isLoopback flag set. (If there's no loopback, it returns NULL -- but this should never happen because IInterfaceTable itself registers a loopback interface on startup.)
Implemented in AnsaInterfaceTable, and InterfaceTable.
Referenced by RoutingTable::configureLoopbackForIPv4(), AnsaRoutingTable::configureLoopbackForIPv4(), RoutingTable::configureRouterId(), and AnsaRoutingTable::configureRouterId().
| virtual std::string IInterfaceTable::getFullPath | ( | ) | const [pure virtual] |
Module path name
Implemented in AnsaInterfaceTable, and InterfaceTable.
Referenced by IPAddressResolver::addressOf(), FlatNetworkConfigurator::fillRoutingTables(), IPAddressResolver::getIPv4AddressFrom(), and IPAddressResolver::getIPv6AddressFrom().
| virtual InterfaceEntry* IInterfaceTable::getInterface | ( | int | pos | ) | [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 AnsaInterfaceTable, and InterfaceTable.
Referenced by NetworkConfigurator::addDefaultRoutes(), FlatNetworkConfigurator::addDefaultRoutes(), FlatNetworkConfigurator6::addOwnAdvPrefixRoutes(), FlatNetworkConfigurator6::addStaticRoutes(), FlatNetworkConfigurator::assignAddresses(), IPv6NeighbourDiscovery::assignLinkLocalAddress(), FlatNetworkConfigurator6::configureAdvPrefixes(), RoutingTable::configureRouterId(), AnsaRoutingTable::configureRouterId(), TrafGen::detectRoles(), RoutingTable::gatherAddresses(), AnsaRoutingTable::gatherAddresses(), RoutingTable::getInterfaceByAddress(), AnsaRoutingTable::getInterfaceByAddress(), RoutingTable6::getInterfaceByAddress(), IPAddressResolver::getIPv4AddressFrom(), IPAddressResolver::getIPv6AddressFrom(), pimSplitter::initialize(), NAMTraceWriter::initialize(), AnsaRoutingTable6::initialize(), TED::initialize(), IGMP::initialize(), RoutingTable::initialize(), IPv6NeighbourDiscovery::initialize(), RIPRouting::initialize(), AnsaRoutingTable::initialize(), RoutingTable6::initialize(), ISIS::initialize(), RoutingTable::isLocalAddress(), RoutingTable6::isLocalAddress(), AnsaRoutingTable::isLocalAddress(), RoutingTable::isLocalMulticastAddress(), AnsaRoutingTable::isLocalMulticastAddress(), SCTPAssociation::processInitArrived(), RoutingTableXmlParser::readStaticRouteFromXml(), LDP::rebuildFecList(), IPv6::routeMulticastPacket(), SCTPAssociation::sendInit(), RoutingTable::updateNetmaskRoutes(), and AnsaRoutingTable::updateNetmaskRoutes().
| virtual InterfaceEntry* IInterfaceTable::getInterfaceById | ( | int | id | ) | [pure virtual] |
Returns an interface by its Id. Ids are guaranteed to be invariant to interface deletions/additions. Returns NULL if there is no such interface (This allows detecting stale IDs without raising an error.)
Implemented in AnsaInterfaceTable, and InterfaceTable.
Referenced by AnsaOSPF::RoutingTableEntry::AddNextHop(), OSPF::RoutingTableEntry::AddNextHop(), AnsaRoutingTable6::addRoute(), AnsaOSPFRouting::AnsaLoadInterface(), IPv6::encapsulate(), IP::encapsulate(), IPv6NeighbourDiscovery::initiateAddressResolution(), IPv6NeighbourDiscovery::initiateNeighbourUnreachabilityDetection(), ARP::processARPPacket(), IPv6NeighbourDiscovery::processARTimeout(), IPv6NeighbourDiscovery::processDADTimeout(), LDP::processLDPHello(), IPv6NeighbourDiscovery::processNAForIncompleteNCEState(), IPv6NeighbourDiscovery::processNAForOtherNCEStates(), IPv6NeighbourDiscovery::processNAPacket(), IPv6NeighbourDiscovery::processNSPacket(), IPv6NeighbourDiscovery::processNUDTimeout(), ARP::processOutboundPacket(), IPv6NeighbourDiscovery::processRAForRouterUpdates(), IPv6NeighbourDiscovery::processRAPacket(), RIPRouting::processResponse(), IPv6NeighbourDiscovery::processRSPacket(), AnsaRoutingTable6::receiveChangeNotification(), IPv6::routePacket(), AnsaOSPF::Interface::SetIfIndex(), OSPF::Interface::SetIfIndex(), and AnsaOspf6::Interface::SetIfIndex().
| virtual InterfaceEntry* IInterfaceTable::getInterfaceByName | ( | const char * | name | ) | [pure virtual] |
Returns an interface given by its name. Returns NULL if not found.
Implemented in AnsaInterfaceTable, and InterfaceTable.
Referenced by IPAddressResolver::addressOf(), LDP::findPeerAddrFromInterface(), LinkStateRouting::initialize(), acl::loadConfigFromXML(), RIPRouting::LoadConfigFromXML(), RoutingTableParser::parseInterfaces(), RoutingTableParser::parseRouting(), RoutingTable6::parseXMLConfigFile(), InterfaceStateManager::processCommand(), MPLS::processMPLSPacketFromL2(), RoutingTableXmlParser::readInterfaceFromXml(), RoutingTableXmlParser::readStaticRouteFromXml(), OSPFRouting::ResolveInterfaceName(), AnsaOSPFRouting::ResolveInterfaceName(), RSVP::setupHello(), and MPLS::tryLabelAndForwardIPDatagram().
| virtual InterfaceEntry* IInterfaceTable::getInterfaceByNetworkLayerGateIndex | ( | int | index | ) | [pure virtual] |
Returns an interface given by its getNetworkLayerGateIndex(). Returns NULL if not found.
Implemented in AnsaInterfaceTable, and InterfaceTable.
Referenced by IPv6::getSourceInterfaceFrom(), IP::getSourceInterfaceFrom(), and MPLS::processMPLSPacketFromL2().
| virtual InterfaceEntry* IInterfaceTable::getInterfaceByNodeInputGateId | ( | int | id | ) | [pure virtual] |
Returns an interface given by its getNodeInputGateId(). Returns NULL if not found.
Implemented in AnsaInterfaceTable, and InterfaceTable.
Referenced by FlatNetworkConfigurator6::addStaticRoutes().
| virtual InterfaceEntry* IInterfaceTable::getInterfaceByNodeOutputGateId | ( | int | id | ) | [pure virtual] |
Returns an interface given by its getNodeOutputGateId(). Returns NULL if not found.
Implemented in AnsaInterfaceTable, and InterfaceTable.
Referenced by FlatNetworkConfigurator6::addStaticRoutes(), and FlatNetworkConfigurator::fillRoutingTables().
| virtual int IInterfaceTable::getNumInterfaces | ( | ) | [pure virtual] |
Returns the number of interfaces.
Implemented in AnsaInterfaceTable, and InterfaceTable.
Referenced by NetworkConfigurator::addDefaultRoutes(), FlatNetworkConfigurator::addDefaultRoutes(), FlatNetworkConfigurator6::addOwnAdvPrefixRoutes(), FlatNetworkConfigurator6::addStaticRoutes(), FlatNetworkConfigurator::assignAddresses(), IPv6NeighbourDiscovery::assignLinkLocalAddress(), FlatNetworkConfigurator6::configureAdvPrefixes(), RoutingTable::configureRouterId(), AnsaRoutingTable::configureRouterId(), TrafGen::detectRoles(), RoutingTable::gatherAddresses(), AnsaRoutingTable::gatherAddresses(), RoutingTable::getInterfaceByAddress(), AnsaRoutingTable::getInterfaceByAddress(), RoutingTable6::getInterfaceByAddress(), IPAddressResolver::getIPv4AddressFrom(), IPAddressResolver::getIPv6AddressFrom(), IPv6::handleMessageFromHL(), IP::handleMessageFromHL(), pimSplitter::initialize(), NAMTraceWriter::initialize(), AnsaRoutingTable6::initialize(), TED::initialize(), IGMP::initialize(), RoutingTable::initialize(), IPv6NeighbourDiscovery::initialize(), RIPRouting::initialize(), AnsaRoutingTable::initialize(), RoutingTable6::initialize(), ISIS::initialize(), RoutingTable::isLocalAddress(), RoutingTable6::isLocalAddress(), AnsaRoutingTable::isLocalAddress(), RoutingTable::isLocalMulticastAddress(), AnsaRoutingTable::isLocalMulticastAddress(), SCTPAssociation::processInitArrived(), RoutingTableXmlParser::readStaticRouteFromXml(), LDP::rebuildFecList(), IPv6::routeMulticastPacket(), SCTPAssociation::sendInit(), RoutingTable::updateNetmaskRoutes(), and AnsaRoutingTable::updateNetmaskRoutes().
| virtual void IInterfaceTable::interfaceChanged | ( | InterfaceEntry * | entry, |
| int | category | ||
| ) | [protected, pure virtual] |
Implemented in AnsaInterfaceTable, and InterfaceTable.
Referenced by InterfaceEntry::changed().
friend class InterfaceEntry [friend] |
Definition at line 36 of file IInterfaceTable.h.
Referenced by InterfaceTable::initialize().