INET Framework for OMNeT++/OMNEST
IInterfaceTable Class Reference

#include <IInterfaceTable.h>

Inheritance diagram for IInterfaceTable:
AnsaInterfaceTable InterfaceTable

List of all members.

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 InterfaceEntrygetInterface (int pos)=0
virtual InterfaceEntrygetInterfaceById (int id)=0
virtual InterfaceEntrygetInterfaceByNodeOutputGateId (int id)=0
virtual InterfaceEntrygetInterfaceByNodeInputGateId (int id)=0
virtual InterfaceEntrygetInterfaceByNetworkLayerGateIndex (int index)=0
virtual InterfaceEntrygetInterfaceByName (const char *name)=0
virtual InterfaceEntrygetFirstLoopbackInterface ()=0

Protected Member Functions

virtual void interfaceChanged (InterfaceEntry *entry, int category)=0

Friends

class InterfaceEntry

Detailed Description

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.

See also:
IInterfaceTable, InterfaceEntry

Definition at line 34 of file IInterfaceTable.h.


Constructor & Destructor Documentation

virtual IInterfaceTable::~IInterfaceTable ( ) [inline, virtual]

Definition at line 43 of file IInterfaceTable.h.

{}

Member Function Documentation

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.

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 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().

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().

Returns an interface given by its getNodeInputGateId(). Returns NULL if not found.

Implemented in AnsaInterfaceTable, and InterfaceTable.

Referenced by FlatNetworkConfigurator6::addStaticRoutes().

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().


Friends And Related Function Documentation

friend class InterfaceEntry [friend]

Definition at line 36 of file IInterfaceTable.h.

Referenced by InterfaceTable::initialize().


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