Public Member Functions | Protected Member Functions | Friends

IInterfaceTable Class Reference

#include <IInterfaceTable.h>

Inheritance diagram for IInterfaceTable:
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 32 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).

Referenced by PPP::registerInterface(), ExtInterface::registerInterface(), and EtherMACBase::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.

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

Referenced by RoutingTable::configureLoopbackForIPv4(), and RoutingTable::configureRouterId().

virtual std::string IInterfaceTable::getFullPath (  )  const [pure virtual]
virtual InterfaceEntry* IInterfaceTable::getInterfaceByNetworkLayerGateIndex ( int  index  )  [pure virtual]

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

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.

Referenced by FlatNetworkConfigurator6::addStaticRoutes().

virtual InterfaceEntry* IInterfaceTable::getInterfaceByNodeOutputGateId ( int  id  )  [pure virtual]

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

Referenced by FlatNetworkConfigurator6::addStaticRoutes(), and FlatNetworkConfigurator::fillRoutingTables().

virtual void IInterfaceTable::interfaceChanged ( InterfaceEntry entry,
int  category 
) [protected, pure virtual]

Referenced by InterfaceEntry::changed().


Friends And Related Function Documentation

friend class InterfaceEntry [friend]

Definition at line 25 of file IInterfaceTable.h.

Referenced by InterfaceTable::initialize().


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