INET Framework for OMNeT++/OMNEST
|
A C++ interface to abstract the functionality of a routing table, regardless of address type. More...
#include <IRoutingTable.h>
Public Member Functions | |
virtual | ~IRoutingTable () |
virtual IRoute * | createRoute ()=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 InterfaceEntry * | getInterfaceByAddress (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 IRoute * | findBestMatchingRoute (const L3Address &dest) const =0 |
The routing function. More... | |
virtual InterfaceEntry * | getOutputInterfaceForDestination (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 IMulticastRoute * | findBestMatchingMulticastRoute (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 IRoute * | getRoute (int k) const =0 |
Returns the kth route. More... | |
virtual IRoute * | getDefaultRoute () 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 IRoute * | removeRoute (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 IMulticastRoute * | getMulticastRoute (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 IMulticastRoute * | removeMulticastRoute (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... | |
A C++ interface to abstract the functionality of a routing table, regardless of address type.
|
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().
|
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().
|
pure virtual |
Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.
Referenced by inet::AODVRouting::createRoute(), and inet::dymo::DYMO::createRoute().
|
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().
|
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().
|
pure virtual |
Returns route for a multicast origin and group.
Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.
Referenced by inet::IIPv4RoutingTable::~IIPv4RoutingTable().
|
pure virtual |
The routing function.
Performs longest prefix match for the given destination address, and returns the resulting route. Returns nullptr if there is no matching route.
Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.
Referenced by inet::AODVRouting::createRREQ(), inet::AODVRouting::datagramForwardHook(), inet::AODVRouting::ensureRouteForDatagram(), inet::dymo::DYMO::ensureRouteForDatagram(), inet::AODVRouting::handleHelloMessage(), inet::AODVRouting::handleLinkBreakSendRERR(), inet::AODVRouting::handleRREP(), inet::AODVRouting::handleRREPACK(), inet::AODVRouting::handleRREQ(), inet::dymo::DYMO::processRREP(), inet::dymo::DYMO::processRREQ(), inet::AODVRouting::receiveSignal(), inet::dymo::DYMO::receiveSignal(), inet::AODVRouting::sendGRREP(), inet::AODVRouting::sendRERRWhenNoRouteToForward(), inet::AODVRouting::sendRREP(), inet::AODVRouting::updateValidRouteLifeTime(), and inet::IIPv4RoutingTable::~IIPv4RoutingTable().
|
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.
|
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().
|
pure virtual |
Returns the kth multicast route.
Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, inet::GenericRoutingTable, and inet::IIPv4RoutingTable.
|
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.
|
pure virtual |
Returns the total number of multicast routes.
Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.
Referenced by inet::PIMSM::clearRoutes(), inet::IPv4NetworkConfigurator::dumpConfig(), inet::GenericNetworkConfigurator::dumpRoutes(), inet::IPv4NetworkConfigurator::dumpRoutes(), and inet::PIMSM::findIPv4Route().
|
pure virtual |
Returns the total number of unicast routes.
Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.
Referenced by inet::ospf::Router::addExternalRouteInIPTable(), inet::DHCPClient::bindLease(), inet::IPv4NetworkConfigurator::dumpConfig(), inet::NetworkInfo::dumpRoutingInfo(), inet::AODVRouting::expungeRoutes(), inet::dymo::DYMO::expungeRoutes(), inet::LDP::findPeerAddrFromInterface(), inet::dymo::DYMO::getNextExpungeTime(), inet::AODVRouting::handleLinkBreakSendRERR(), inet::AODVRouting::handleRERR(), inet::bgp::BGPRouting::isInRoutingTable(), inet::bgp::BGPRouting::ospfExist(), inet::dymo::DYMO::processRERR(), inet::LDP::rebuildFecList(), inet::TED::rebuildRoutingTable(), inet::ospf::Router::rebuildRoutingTable(), inet::AODVRouting::scheduleExpungeRoutes(), inet::AODVRouting::sendHelloMessagesIfNeeded(), inet::dymo::DYMO::sendRERRForBrokenLink(), inet::ospf::Router::updateExternalRoute(), and inet::dymo::DYMO::updateRoutes().
|
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().
|
pure virtual |
Returns the kth route.
Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, inet::GenericRoutingTable, and inet::IIPv4RoutingTable.
Referenced by inet::AODVRouting::expungeRoutes(), inet::dymo::DYMO::expungeRoutes(), inet::dymo::DYMO::getNextExpungeTime(), inet::AODVRouting::handleLinkBreakSendRERR(), inet::AODVRouting::handleRERR(), inet::dymo::DYMO::processRERR(), inet::AODVRouting::scheduleExpungeRoutes(), inet::AODVRouting::sendHelloMessagesIfNeeded(), inet::dymo::DYMO::sendRERRForBrokenLink(), and inet::dymo::DYMO::updateRoutes().
|
pure virtual |
Returns routerId.
Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.
Referenced by inet::GPSR::getSelfAddress(), inet::dymo::DYMO::getSelfAddress(), inet::AODVRouting::getSelfIPAddress(), and inet::RoutingTableRecorder::recordRouteChange().
|
pure virtual |
Forwarding on/off.
Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.
Referenced by inet::NetworkConfiguratorBase::computeNodeWeight(), inet::NetworkConfiguratorBase::determineGatewayForLink(), inet::IPv4NodeConfigurator::prepareInterface(), and inet::IPv4::preroutingFinish().
|
pure virtual |
Checks if the address is a local one, i.e.
one of the host's.
Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.
Referenced by inet::AODVRouting::datagramForwardHook(), inet::GPSR::datagramLocalOutHook(), inet::sctp::SCTPNatHook::datagramPreRoutingHook(), inet::GPSR::datagramPreRoutingHook(), inet::AODVRouting::ensureRouteForDatagram(), inet::dymo::DYMO::ensureRouteForDatagram(), inet::dymo::DYMO::isClientAddress(), and inet::IIPv4RoutingTable::~IIPv4RoutingTable().
|
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().
|
pure virtual |
Multicast forwarding on/off.
Implemented in inet::IPv6RoutingTable, inet::IPv4RoutingTable, and inet::GenericRoutingTable.
Referenced by inet::IGMPv2::configureInterface(), inet::IGMPv3::configureInterface(), inet::IGMPv3::initialize(), inet::IPv4::preroutingFinish(), inet::IGMPv2::processLeave(), inet::IGMPv2::processQuery(), inet::IGMPv3::processQuery(), inet::IGMPv3::processReport(), inet::IGMPv2::processV2Report(), and inet::IPv4NetworkConfigurator::readManualMulticastRouteConfiguration().
|
pure virtual |
Prints the routing table.
Implemented in inet::IPv6RoutingTable, inet::GenericRoutingTable, and inet::IPv4RoutingTable.
Referenced by inet::GenericNetworkConfigurator::dumpRoutes().
|
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().
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().