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

A C++ interface to abstract the functionality of a routing table, regardless of address type. More...

#include <IRoutingTable.h>

Inheritance diagram for inet::IRoutingTable:
inet::GenericRoutingTable inet::IIPv4RoutingTable inet::IPv6RoutingTable inet::IPv4RoutingTable

Public Member Functions

virtual ~IRoutingTable ()
 
virtual IRoutecreateRoute ()=0
 
Miscellaneous functions
virtual bool isForwardingEnabled () const =0
 Forwarding on/off. More...
 
virtual bool isMulticastForwardingEnabled () const =0
 Multicast forwarding on/off. More...
 
virtual L3Address getRouterIdAsGeneric () const =0
 Returns routerId. More...
 
virtual bool isLocalAddress (const L3Address &dest) const =0
 Checks if the address is a local one, i.e. More...
 
virtual InterfaceEntrygetInterfaceByAddress (const L3Address &address) const =0
 Returns an interface given by its address. More...
 
virtual void printRoutingTable () const =0
 Prints the routing table. More...
 
Routing functions (query the route table)
virtual IRoutefindBestMatchingRoute (const L3Address &dest) const =0
 The routing function. More...
 
virtual InterfaceEntrygetOutputInterfaceForDestination (const L3Address &dest) const =0
 Convenience function based on findBestMatchingRoute(). More...
 
virtual L3Address getNextHopForDestination (const L3Address &dest) const =0
 Convenience function based on findBestMatchingRoute(). More...
 
Multicast routing functions
virtual bool isLocalMulticastAddress (const L3Address &dest) const =0
 Checks if the address is in one of the local multicast group address list. More...
 
virtual IMulticastRoutefindBestMatchingMulticastRoute (const L3Address &origin, const L3Address &group) const =0
 Returns route for a multicast origin and group. More...
 
Route table manipulation
virtual int getNumRoutes () const =0
 Returns the total number of unicast routes. More...
 
virtual IRoutegetRoute (int k) const =0
 Returns the kth route. More...
 
virtual IRoutegetDefaultRoute () const =0
 Finds and returns the default route, or nullptr if it doesn't exist. More...
 
virtual void addRoute (IRoute *entry)=0
 Adds a route to the routing table. More...
 
virtual IRouteremoveRoute (IRoute *entry)=0
 Removes the given route from the routing table, and returns it. More...
 
virtual bool deleteRoute (IRoute *entry)=0
 Deletes the given route from the routing table. More...
 
virtual int getNumMulticastRoutes () const =0
 Returns the total number of multicast routes. More...
 
virtual IMulticastRoutegetMulticastRoute (int k) const =0
 Returns the kth multicast route. More...
 
virtual void addMulticastRoute (IMulticastRoute *entry)=0
 Adds a multicast route to the routing table. More...
 
virtual IMulticastRouteremoveMulticastRoute (IMulticastRoute *entry)=0
 Removes the given route from the routing table, and returns it. More...
 
virtual bool deleteMulticastRoute (IMulticastRoute *entry)=0
 Deletes the given multicast route from the routing table. More...
 

Detailed Description

A C++ interface to abstract the functionality of a routing table, regardless of address type.

Constructor & Destructor Documentation

virtual inet::IRoutingTable::~IRoutingTable ( )
inlinevirtual
33 {};

Member Function Documentation

virtual void inet::IRoutingTable::addMulticastRoute ( IMulticastRoute entry)
pure virtual

Adds a multicast route to the routing table.

Routes are allowed to be modified while in the routing table. (There is a notification mechanism that allows routing table internals to be updated on a routing entry change.)

Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.

Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), and inet::IIPv4RoutingTable::~IIPv4RoutingTable().

virtual void inet::IRoutingTable::addRoute ( IRoute entry)
pure virtual

Adds a route to the routing table.

Routes are allowed to be modified while in the routing table. (There is a notification mechanism that allows routing table internals to be updated on a routing entry change.)

Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.

Referenced by inet::IPv4NetworkConfigurator::configureRoutingTable(), inet::AODVRouting::createRoute(), inet::dymo::DYMO::updateRoutes(), and inet::IIPv4RoutingTable::~IIPv4RoutingTable().

virtual IRoute* inet::IRoutingTable::createRoute ( )
pure virtual
virtual bool inet::IRoutingTable::deleteMulticastRoute ( IMulticastRoute entry)
pure virtual

Deletes the given multicast route from the routing table.

Returns true if the route was deleted, and false if it was not in the routing table.

Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.

Referenced by inet::IIPv4RoutingTable::~IIPv4RoutingTable().

virtual bool inet::IRoutingTable::deleteRoute ( IRoute entry)
pure virtual

Deletes the given route from the routing table.

Returns true if the route was deleted, and false if it was not in the routing table.

Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.

Referenced by inet::AODVRouting::expungeRoutes(), inet::dymo::DYMO::expungeRoutes(), and inet::IIPv4RoutingTable::~IIPv4RoutingTable().

virtual IMulticastRoute* inet::IRoutingTable::findBestMatchingMulticastRoute ( const L3Address origin,
const L3Address group 
) const
pure virtual

Returns route for a multicast origin and group.

Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.

Referenced by inet::IIPv4RoutingTable::~IIPv4RoutingTable().

virtual IRoute* inet::IRoutingTable::getDefaultRoute ( ) const
pure virtual

Finds and returns the default route, or nullptr if it doesn't exist.

Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, inet::GenericRoutingTable, and inet::IIPv4RoutingTable.

virtual InterfaceEntry* inet::IRoutingTable::getInterfaceByAddress ( const L3Address address) const
pure virtual

Returns an interface given by its address.

Returns nullptr if not found.

Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.

Referenced by inet::IIPv4RoutingTable::~IIPv4RoutingTable().

virtual IMulticastRoute* inet::IRoutingTable::getMulticastRoute ( int  k) const
pure virtual
virtual L3Address inet::IRoutingTable::getNextHopForDestination ( const L3Address dest) const
pure virtual

Convenience function based on findBestMatchingRoute().

Returns the gateway for the destination address. Returns the unspecified address if the destination is not in routing table or the gateway field is not filled in in the route.

Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.

virtual int inet::IRoutingTable::getNumMulticastRoutes ( ) const
pure virtual
virtual InterfaceEntry* inet::IRoutingTable::getOutputInterfaceForDestination ( const L3Address dest) const
pure virtual

Convenience function based on findBestMatchingRoute().

Returns the output interface for the packets with dest as destination address, or nullptr if the destination is not in routing table.

Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.

Referenced by inet::sctp::SCTPAssociation::pmStartPathManagement(), and inet::sctp::SCTPPathVariables::SCTPPathVariables().

virtual bool inet::IRoutingTable::isLocalMulticastAddress ( const L3Address dest) const
pure virtual

Checks if the address is in one of the local multicast group address list.

Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.

Referenced by inet::IIPv4RoutingTable::~IIPv4RoutingTable().

virtual void inet::IRoutingTable::printRoutingTable ( ) const
pure virtual
virtual IMulticastRoute* inet::IRoutingTable::removeMulticastRoute ( IMulticastRoute entry)
pure virtual

Removes the given route from the routing table, and returns it.

nullptr is returned of the route was not in the routing table.

Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.

Referenced by inet::IIPv4RoutingTable::~IIPv4RoutingTable().

virtual IRoute* inet::IRoutingTable::removeRoute ( IRoute entry)
pure virtual

Removes the given route from the routing table, and returns it.

nullptr is returned if the route was not in the routing table.

Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.

Referenced by inet::dymo::DYMO::updateRoutes(), and inet::IIPv4RoutingTable::~IIPv4RoutingTable().


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