INET Framework for OMNeT++/OMNEST
inet::NextHopRoutingTable Class Reference

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

#include <NextHopRoutingTable.h>

Inheritance diagram for inet::NextHopRoutingTable:
inet::IRoutingTable

Public Member Functions

 NextHopRoutingTable ()
 
virtual ~NextHopRoutingTable ()
 
Miscellaneous functions
virtual bool isForwardingEnabled () const override
 Forwarding on/off. More...
 
virtual bool isAdminDistEnabled () const override
 Administrative distance on/off. More...
 
virtual bool isMulticastForwardingEnabled () const override
 Multicast forwarding on/off. More...
 
virtual L3Address getRouterIdAsGeneric () const override
 Returns routerId. More...
 
virtual bool isLocalAddress (const L3Address &dest) const override
 Checks if the address is a local one, i.e. More...
 
virtual NetworkInterfacegetInterfaceByAddress (const L3Address &address) const override
 Returns an interface given by its address. More...
 
virtual void routeChanged (NextHopRoute *entry, int fieldCode)
 To be called from route objects whenever a field changes. More...
 
Routing functions (query the route table)
virtual NextHopRoutefindBestMatchingRoute (const L3Address &dest) const override
 The routing function. More...
 
virtual NetworkInterfacegetOutputInterfaceForDestination (const L3Address &dest) const override
 Convenience function based on findBestMatchingRoute(). More...
 
virtual L3Address getNextHopForDestination (const L3Address &dest) const override
 Convenience function based on findBestMatchingRoute(). More...
 
Multicast routing functions
virtual bool isLocalMulticastAddress (const L3Address &dest) const override
 Checks if the address is in one of the local multicast group address list. More...
 
virtual IMulticastRoutefindBestMatchingMulticastRoute (const L3Address &origin, const L3Address &group) const override
 Returns route for a multicast origin and group. More...
 
Route table manipulation
virtual int getNumRoutes () const override
 Returns the total number of unicast routes. More...
 
virtual IRoutegetRoute (int k) const override
 Returns the kth route. More...
 
virtual IRoutegetDefaultRoute () const override
 Finds and returns the default route, or nullptr if it doesn't exist. More...
 
virtual void addRoute (IRoute *entry) override
 Adds a route to the routing table. More...
 
virtual IRouteremoveRoute (IRoute *entry) override
 Removes the given route from the routing table, and returns it. More...
 
virtual bool deleteRoute (IRoute *entry) override
 Deletes the given route from the routing table. More...
 
virtual int getNumMulticastRoutes () const override
 Returns the total number of multicast routes. More...
 
virtual IMulticastRoutegetMulticastRoute (int k) const override
 Returns the kth multicast route. More...
 
virtual void addMulticastRoute (IMulticastRoute *entry) override
 Adds a multicast route to the routing table. More...
 
virtual IMulticastRouteremoveMulticastRoute (IMulticastRoute *entry) override
 Removes the given route from the routing table, and returns it. More...
 
virtual bool deleteMulticastRoute (IMulticastRoute *entry) override
 Deletes the given multicast route from the routing table. More...
 
virtual IRoutecreateRoute () override
 
virtual void printRoutingTable () const override
 Prints routing table. More...
 
- Public Member Functions inherited from inet::IRoutingTable
virtual ~IRoutingTable ()
 

Protected Member Functions

virtual int numInitStages () const override
 
virtual void initialize (int stage) override
 
virtual void handleMessage (cMessage *) override
 Raises an error. More...
 
virtual void receiveSignal (cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override
 Called by the signal handler whenever a change of a category occurs to which this client has subscribed. More...
 
virtual void configureRouterId ()
 
virtual void refreshDisplay () const override
 
virtual void configureInterface (NetworkInterface *ie)
 
virtual void configureLoopback ()
 
void internalAddRoute (NextHopRoute *route)
 
NextHopRouteinternalRemoveRoute (NextHopRoute *route)
 

Static Protected Member Functions

static bool routeLessThan (const NextHopRoute *a, const NextHopRoute *b)
 

Private Types

typedef std::vector< NextHopRoute * > RouteVector
 
typedef std::vector< NextHopMulticastRoute * > MulticastRouteVector
 

Private Attributes

ModuleRefByPar< IInterfaceTableift
 
L3Address routerId
 
L3Address::AddressType addressType = L3Address::NONE
 
bool forwarding = false
 
bool multicastForwarding = false
 
RouteVector routes
 
MulticastRouteVector multicastRoutes
 

Detailed Description

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

Member Typedef Documentation

◆ MulticastRouteVector

◆ RouteVector

typedef std::vector<NextHopRoute *> inet::NextHopRoutingTable::RouteVector
private

Constructor & Destructor Documentation

◆ NextHopRoutingTable()

inet::NextHopRoutingTable::NextHopRoutingTable ( )
37 {
38 }

◆ ~NextHopRoutingTable()

inet::NextHopRoutingTable::~NextHopRoutingTable ( )
virtual
41 {
42  for (auto& elem : routes)
43  delete elem;
44  for (auto& elem : multicastRoutes)
45  delete elem;
46 }

Member Function Documentation

◆ addMulticastRoute()

void inet::NextHopRoutingTable::addMulticastRoute ( IMulticastRoute entry)
overridevirtual

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

Implements inet::IRoutingTable.

390 {
391  Enter_Method("addMulticastRoute(...)");
392 
393  // TODO
394 }

◆ addRoute()

void inet::NextHopRoutingTable::addRoute ( IRoute entry)
overridevirtual

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

Implements inet::IRoutingTable.

315 {
316  Enter_Method("addRoute(...)");
317 
318  NextHopRoute *entry = check_and_cast<NextHopRoute *>(route);
319 
320  // check that the interface exists
321  if (!entry->getInterface())
322  throw cRuntimeError("addRoute(): interface cannot be nullptr");
323 
324  internalAddRoute(entry);
325 
326  emit(routeAddedSignal, entry);
327 }

Referenced by inet::NextHopNetworkConfigurator::addStaticRoutes().

◆ configureInterface()

void inet::NextHopRoutingTable::configureInterface ( NetworkInterface ie)
protectedvirtual
166 {
167  int metric = (int)(ceil(2e9 / ie->getDatarate())); // use OSPF cost as default
168  int interfaceModuleId = ie->getId();
169  // mac
170  auto d = ie->addProtocolData<NextHopInterfaceData>();
171  d->setMetric(metric);
173  d->setAddress(ie->getMacAddress());
174  else if (ie && addressType == L3Address::MODULEPATH)
175  d->setAddress(ModulePathAddress(interfaceModuleId));
176  else if (ie && addressType == L3Address::MODULEID)
177  d->setAddress(ModuleIdAddress(interfaceModuleId));
178 }

Referenced by initialize().

◆ configureLoopback()

void inet::NextHopRoutingTable::configureLoopback ( )
protectedvirtual
181 {
182 //TODO needed???
183 // NetworkInterface *ie = ift->getFirstLoopbackInterface()
184 // // add Ipv4 info. Set 127.0.0.1/8 as address by default --
185 // // we may reconfigure later it to be the routerId
186 // Ipv4InterfaceData *d = new Ipv4InterfaceData();
187 // d->setIPAddress(Ipv4Address::LOOPBACK_ADDRESS);
188 // d->setNetmask(Ipv4Address::LOOPBACK_NETMASK);
189 // d->setMetric(1);
190 // ie->setIPv4Data(d);
191 }

Referenced by initialize().

◆ configureRouterId()

void inet::NextHopRoutingTable::configureRouterId ( )
protectedvirtual
138 {
139  if (routerId.isUnspecified()) { // not yet configured
140  const char *routerIdStr = par("routerId");
141  if (!strcmp(routerIdStr, "auto")) { // non-"auto" cases already handled in earlier stage
142  // choose highest interface address as routerId
143  for (int i = 0; i < ift->getNumInterfaces(); ++i) {
144  NetworkInterface *ie = ift->getInterface(i);
145  if (!ie->isLoopback()) {
146  L3Address interfaceAddr = ie->getProtocolData<NextHopInterfaceData>()->getAddress();
147  if (routerId.isUnspecified() || routerId < interfaceAddr)
148  routerId = interfaceAddr;
149  }
150  }
151  }
152  }
153 // else // already configured
154 // {
155 // // if there is no interface with routerId yet, assign it to the loopback address;
156 // // TODO find out if this is a good practice, in which situations it is useful etc.
157 // if (getInterfaceByAddress(routerId)==nullptr)
158 // {
159 // NetworkInterface *lo0 = ift->getFirstLoopbackInterface();
160 // lo0->getNextHopProtocolData()->setAddress(routerId);
161 // }
162 // }
163 }

Referenced by initialize().

◆ createRoute()

IRoute * inet::NextHopRoutingTable::createRoute ( )
overridevirtual

Implements inet::IRoutingTable.

411 {
412  return new NextHopRoute();
413 }

◆ deleteMulticastRoute()

bool inet::NextHopRoutingTable::deleteMulticastRoute ( IMulticastRoute entry)
overridevirtual

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.

Implements inet::IRoutingTable.

404 {
405  Enter_Method("deleteMulticastRoute(...)");
406 
407  return false; // TODO
408 }

◆ deleteRoute()

bool inet::NextHopRoutingTable::deleteRoute ( IRoute entry)
overridevirtual

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.

Implements inet::IRoutingTable.

344 {
345  Enter_Method("deleteRoute(...)");
346 
347  NextHopRoute *entry = internalRemoveRoute(check_and_cast<NextHopRoute *>(route));
348  if (entry != nullptr) {
349  EV_INFO << "remove route " << entry->str() << "\n";
350  emit(routeDeletedSignal, entry);
351  delete entry;
352  }
353  return entry != nullptr;
354 }

◆ findBestMatchingMulticastRoute()

IMulticastRoute * inet::NextHopRoutingTable::findBestMatchingMulticastRoute ( const L3Address origin,
const L3Address group 
) const
overridevirtual

Returns route for a multicast origin and group.

Implements inet::IRoutingTable.

288 {
289  Enter_Method("findBestMatchingMulticastRoute(%s, %s)", origin.str().c_str(), group.str().c_str());
290 
291  return nullptr; // TODO
292 }

◆ findBestMatchingRoute()

NextHopRoute * inet::NextHopRoutingTable::findBestMatchingRoute ( const L3Address dest) const
overridevirtual

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.

Implements inet::IRoutingTable.

248 {
249  Enter_Method("findBestMatchingRoute(%s)", dest.str().c_str());
250 
251  // find best match (one with longest prefix)
252  // default route has zero prefix length, so (if exists) it'll be selected as last resort
253  NextHopRoute *bestRoute = nullptr;
254  for (auto e : routes) {
255 
256  if (dest.matches(e->getDestinationAsGeneric(), e->getPrefixLength())) {
257  bestRoute = const_cast<NextHopRoute *>(e);
258  break;
259  }
260  }
261  return bestRoute;
262 }

Referenced by getNextHopForDestination(), and getOutputInterfaceForDestination().

◆ getDefaultRoute()

IRoute * inet::NextHopRoutingTable::getDefaultRoute ( ) const
overridevirtual

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

Implements inet::IRoutingTable.

306 {
307  // if there is a default route entry, it is the last valid entry
308  auto i = routes.rbegin();
309  if (i != routes.rend() && (*i)->getPrefixLength() == 0)
310  return *i;
311  return nullptr;
312 }

◆ getInterfaceByAddress()

NetworkInterface * inet::NextHopRoutingTable::getInterfaceByAddress ( const L3Address address) const
overridevirtual

Returns an interface given by its address.

Returns nullptr if not found.

Implements inet::IRoutingTable.

241 {
242  Enter_Method("getInterfaceByAddress(%s)", address.str().c_str());
243 
244  return ift->findInterfaceByAddress(address);
245 }

◆ getMulticastRoute()

IMulticastRoute * inet::NextHopRoutingTable::getMulticastRoute ( int  k) const
overridevirtual

Returns the kth multicast route.

Implements inet::IRoutingTable.

385 {
386  return nullptr; // TODO
387 }

◆ getNextHopForDestination()

L3Address inet::NextHopRoutingTable::getNextHopForDestination ( const L3Address dest) const
overridevirtual

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.

Implements inet::IRoutingTable.

273 {
274  Enter_Method("getGatewayForDestAddr(%s)", dest.str().c_str());
275 
276  const IRoute *e = findBestMatchingRoute(dest);
277  return e ? e->getNextHopAsGeneric() : L3Address();
278 }

◆ getNumMulticastRoutes()

int inet::NextHopRoutingTable::getNumMulticastRoutes ( ) const
overridevirtual

Returns the total number of multicast routes.

Implements inet::IRoutingTable.

380 {
381  return 0; // TODO
382 }

◆ getNumRoutes()

int inet::NextHopRoutingTable::getNumRoutes ( ) const
overridevirtual

Returns the total number of unicast routes.

Implements inet::IRoutingTable.

295 {
296  return routes.size();
297 }

◆ getOutputInterfaceForDestination()

NetworkInterface * inet::NextHopRoutingTable::getOutputInterfaceForDestination ( const L3Address dest) const
overridevirtual

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.

Implements inet::IRoutingTable.

265 {
266  Enter_Method("getInterfaceForDestAddr(%s)", dest.str().c_str());
267 
268  const IRoute *e = findBestMatchingRoute(dest);
269  return e ? e->getInterface() : nullptr;
270 }

◆ getRoute()

IRoute * inet::NextHopRoutingTable::getRoute ( int  k) const
overridevirtual

Returns the kth route.

Implements inet::IRoutingTable.

300 {
301  ASSERT(k >= 0 && (unsigned int)k < routes.size());
302  return routes[k];
303 }

◆ getRouterIdAsGeneric()

L3Address inet::NextHopRoutingTable::getRouterIdAsGeneric ( ) const
overridevirtual

Returns routerId.

Implements inet::IRoutingTable.

229 {
230  return routerId;
231 }

◆ handleMessage()

void inet::NextHopRoutingTable::handleMessage ( cMessage *  msg)
overrideprotectedvirtual

Raises an error.

114 {
115  throw cRuntimeError("This module doesn't process messages");
116 }

◆ initialize()

void inet::NextHopRoutingTable::initialize ( int  stage)
overrideprotectedvirtual
49 {
50  cSimpleModule::initialize(stage);
51 
52  if (stage == INITSTAGE_LOCAL) {
53  // get a pointer to the IInterfaceTable
54  ift.reference(this, "interfaceTableModule", true);
55 
56  const char *addressTypeString = par("addressType");
57  if (!strcmp(addressTypeString, "mac"))
59  else if (!strcmp(addressTypeString, "modulepath"))
61  else if (!strcmp(addressTypeString, "moduleid"))
63  else
64  throw cRuntimeError("Unknown address type");
65  forwarding = par("forwarding");
66  multicastForwarding = par("multicastForwarding");
67 
68  WATCH_PTRVECTOR(routes);
69  WATCH_PTRVECTOR(multicastRoutes);
70  WATCH(forwarding);
71  WATCH(multicastForwarding);
72  WATCH(routerId);
73 
74  cModule *host = getContainingNode(this);
75  host->subscribe(interfaceCreatedSignal, this);
76  host->subscribe(interfaceDeletedSignal, this);
77  host->subscribe(interfaceStateChangedSignal, this);
78  host->subscribe(interfaceConfigChangedSignal, this);
79  host->subscribe(interfaceIpv4ConfigChangedSignal, this);
80  }
81  // TODO INITSTAGE
82  else if (stage == INITSTAGE_LINK_LAYER) {
83  // At this point, all L2 modules have registered themselves (added their
84  // interface entries). Create the per-interface Ipv4 data structures.
85  IInterfaceTable *interfaceTable = getModuleFromPar<IInterfaceTable>(par("interfaceTableModule"), this);
86  for (int i = 0; i < interfaceTable->getNumInterfaces(); ++i)
87  configureInterface(interfaceTable->getInterface(i));
88  }
89  else if (stage == INITSTAGE_NETWORK_LAYER) {
91 
92  // read routing table file (and interface configuration)
93 // RoutingTableParser parser(ift, this);
94 // if (*filename && parser.readRoutingTableFromFile(filename)==-1)
95 // throw cRuntimeError("Error reading routing table file %s", filename);
96 
97  // TODO
98  // set routerId if param is not "" (==no routerId) or "auto" (in which case we'll
99  // do it later in a later stage, after network configurators configured the interfaces)
100 // const char *routerIdStr = par("routerId");
101 // if (strcmp(routerIdStr, "") && strcmp(routerIdStr, "auto"))
102 // routerId = Ipv4Address(routerIdStr);
103  // routerID selection must be after network autoconfiguration assigned interface addresses
105 
106  // we don't use notifications during initialize(), so we do it manually.
107 // updateNetmaskRoutes();
108 
109 // printRoutingTable();
110  }
111 }

◆ internalAddRoute()

void inet::NextHopRoutingTable::internalAddRoute ( NextHopRoute route)
protected
357 {
358  ASSERT(route->getRoutingTableAsGeneric() == nullptr);
359 
360  // add to tables
361  // we keep entries sorted, so that we can stop at the first match when doing the longest prefix matching
362  auto pos = upper_bound(routes.begin(), routes.end(), route, routeLessThan);
363  routes.insert(pos, route);
364 
365  route->setRoutingTable(this);
366 }

Referenced by addRoute(), and routeChanged().

◆ internalRemoveRoute()

NextHopRoute * inet::NextHopRoutingTable::internalRemoveRoute ( NextHopRoute route)
protected
369 {
370  auto i = find(routes, route);
371  if (i != routes.end()) {
372  ASSERT(route->getRoutingTableAsGeneric() == this);
373  routes.erase(i);
374  return route;
375  }
376  return nullptr;
377 }

Referenced by deleteRoute(), removeRoute(), and routeChanged().

◆ isAdminDistEnabled()

virtual bool inet::NextHopRoutingTable::isAdminDistEnabled ( ) const
inlineoverridevirtual

Administrative distance on/off.

Implements inet::IRoutingTable.

82 { return false; }

◆ isForwardingEnabled()

bool inet::NextHopRoutingTable::isForwardingEnabled ( ) const
overridevirtual

Forwarding on/off.

Implements inet::IRoutingTable.

219 {
220  return forwarding;
221 }

◆ isLocalAddress()

bool inet::NextHopRoutingTable::isLocalAddress ( const L3Address dest) const
overridevirtual

Checks if the address is a local one, i.e.

one of the host's.

Implements inet::IRoutingTable.

234 {
235  Enter_Method("isLocalAddress(%s)", dest.str().c_str());
236 
237  return ift->isLocalAddress(dest);
238 }

◆ isLocalMulticastAddress()

bool inet::NextHopRoutingTable::isLocalMulticastAddress ( const L3Address dest) const
overridevirtual

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

Implements inet::IRoutingTable.

281 {
282  Enter_Method("isLocalMulticastAddress(%s)", dest.str().c_str());
283 
284  return dest.isMulticast(); // TODO
285 }

◆ isMulticastForwardingEnabled()

bool inet::NextHopRoutingTable::isMulticastForwardingEnabled ( ) const
overridevirtual

Multicast forwarding on/off.

Implements inet::IRoutingTable.

224 {
225  return multicastForwarding;
226 }

◆ numInitStages()

virtual int inet::NextHopRoutingTable::numInitStages ( ) const
inlineoverrideprotectedvirtual
41 { return NUM_INIT_STAGES; }

◆ printRoutingTable()

void inet::NextHopRoutingTable::printRoutingTable ( ) const
overridevirtual

Prints routing table.

Implements inet::IRoutingTable.

416 {
417  for (const auto& elem : routes)
418  EV_INFO << (elem)->getInterface()->getInterfaceFullPath() << " -> " << (elem)->getDestinationAsGeneric().str() << " as " << (elem)->str() << endl;
419 }

◆ receiveSignal()

void inet::NextHopRoutingTable::receiveSignal ( cComponent *  source,
simsignal_t  signalID,
cObject *  obj,
cObject *  details 
)
overrideprotectedvirtual

Called by the signal handler whenever a change of a category occurs to which this client has subscribed.

119 {
120  Enter_Method("%s", cComponent::getSignalName(signalID));
121 
122  // TODO
123 }

◆ refreshDisplay()

void inet::NextHopRoutingTable::refreshDisplay ( ) const
overrideprotectedvirtual
194 {
195 // TODO
196 // char buf[80];
197 // if (routerId.isUnspecified())
198 // sprintf(buf, "%d+%d routes", (int)routes.size(), (int)multicastRoutes.size());
199 // else
200 // sprintf(buf, "routerId: %s\n%d+%d routes", routerId.str().c_str(), (int)routes.size(), (int)multicastRoutes.size());
201 // getDisplayString().setTagArg("t", 0, buf);
202 }

◆ removeMulticastRoute()

IMulticastRoute * inet::NextHopRoutingTable::removeMulticastRoute ( IMulticastRoute entry)
overridevirtual

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

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

Implements inet::IRoutingTable.

397 {
398  Enter_Method("removeMulticastRoute(...)");
399 
400  return nullptr; // TODO
401 }

◆ removeRoute()

IRoute * inet::NextHopRoutingTable::removeRoute ( IRoute entry)
overridevirtual

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

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

Implements inet::IRoutingTable.

330 {
331  Enter_Method("removeRoute(...)");
332 
333  NextHopRoute *entry = internalRemoveRoute(check_and_cast<NextHopRoute *>(route));
334  if (entry != nullptr) {
335  EV_INFO << "remove route " << entry->str() << "\n";
336  emit(routeDeletedSignal, entry);
337  entry->setRoutingTable(nullptr);
338  }
339 
340  return entry;
341 }

◆ routeChanged()

void inet::NextHopRoutingTable::routeChanged ( NextHopRoute entry,
int  fieldCode 
)
virtual

To be called from route objects whenever a field changes.

Used for maintaining internal data structures and firing "routing table changed" notifications.

126 {
127  if (fieldCode == IRoute::F_DESTINATION || fieldCode == IRoute::F_PREFIX_LENGTH || fieldCode == IRoute::F_METRIC) { // our data structures depend on these fields
128  entry = internalRemoveRoute(entry);
129  ASSERT(entry != nullptr); // failure means inconsistency: route was not found in this routing table
130  internalAddRoute(entry);
131 
132 // invalidateCache();
133  }
134  emit(routeChangedSignal, entry); // TODO include fieldCode in the notification
135 }

Referenced by inet::NextHopRoute::changed().

◆ routeLessThan()

bool inet::NextHopRoutingTable::routeLessThan ( const NextHopRoute a,
const NextHopRoute b 
)
staticprotected
205 {
206  // helper for sort() in addRoute(). We want routes with longer
207  // prefixes to be at front, so we compare them as "less".
208  // For metric, a smaller value is better (we report that as "less").
209  if (a->getPrefixLength() != b->getPrefixLength())
210  return a->getPrefixLength() > b->getPrefixLength();
211 
212  if (a->getDestinationAsGeneric() != b->getDestinationAsGeneric())
213  return a->getDestinationAsGeneric() < b->getDestinationAsGeneric();
214 
215  return a->getMetric() < b->getMetric();
216 }

Referenced by internalAddRoute().

Member Data Documentation

◆ addressType

L3Address::AddressType inet::NextHopRoutingTable::addressType = L3Address::NONE
private

Referenced by configureInterface(), and initialize().

◆ forwarding

bool inet::NextHopRoutingTable::forwarding = false
private

Referenced by initialize(), and isForwardingEnabled().

◆ ift

ModuleRefByPar<IInterfaceTable> inet::NextHopRoutingTable::ift
private

◆ multicastForwarding

bool inet::NextHopRoutingTable::multicastForwarding = false
private

◆ multicastRoutes

MulticastRouteVector inet::NextHopRoutingTable::multicastRoutes
private

Referenced by initialize(), and ~NextHopRoutingTable().

◆ routerId

L3Address inet::NextHopRoutingTable::routerId
private

◆ routes


The documentation for this class was generated from the following files:
inet::NextHopRoutingTable::routeLessThan
static bool routeLessThan(const NextHopRoute *a, const NextHopRoute *b)
Definition: NextHopRoutingTable.cc:204
inet::NextHopRoutingTable::ift
ModuleRefByPar< IInterfaceTable > ift
Definition: NextHopRoutingTable.h:27
inet::L3Address::MODULEID
@ MODULEID
Definition: L3Address.h:40
inet::IRoute::F_DESTINATION
@ F_DESTINATION
Definition: IRoute.h:47
inet::NextHopRoutingTable::multicastRoutes
MulticastRouteVector multicastRoutes
Definition: NextHopRoutingTable.h:38
inet::getContainingNode
cModule * getContainingNode(const cModule *from)
Find the node containing the given module.
Definition: ModuleAccess.cc:40
inet::routeChangedSignal
simsignal_t routeChangedSignal
Definition: Simsignals.cc:43
inet::units::constants::e
const value< double, units::C > e(1.602176487e-19)
inet::NextHopRoutingTable::findBestMatchingRoute
virtual NextHopRoute * findBestMatchingRoute(const L3Address &dest) const override
The routing function.
Definition: NextHopRoutingTable.cc:247
inet::INITSTAGE_NETWORK_LAYER
INET_API InitStage INITSTAGE_NETWORK_LAYER
Initialization of network layer protocols.
inet::find
std::vector< T >::iterator find(std::vector< T > &v, const Tk &a)
Definition: stlutils.h:44
inet::NextHopRoutingTable::multicastForwarding
bool multicastForwarding
Definition: NextHopRoutingTable.h:32
inet::L3Address::MODULEPATH
@ MODULEPATH
Definition: L3Address.h:39
inet::L3Address::isUnspecified
bool isUnspecified() const
Definition: L3Address.cc:138
inet::NextHopRoutingTable::addressType
L3Address::AddressType addressType
Definition: NextHopRoutingTable.h:30
inet::NextHopRoutingTable::configureInterface
virtual void configureInterface(NetworkInterface *ie)
Definition: NextHopRoutingTable.cc:165
inet::NextHopRoutingTable::internalAddRoute
void internalAddRoute(NextHopRoute *route)
Definition: NextHopRoutingTable.cc:356
inet::interfaceDeletedSignal
simsignal_t interfaceDeletedSignal
Definition: Simsignals.cc:31
inet::interfaceStateChangedSignal
simsignal_t interfaceStateChangedSignal
Definition: Simsignals.cc:32
inet::INITSTAGE_LOCAL
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
inet::units::values::b
value< int64_t, units::b > b
Definition: Units.h:1241
inet::routeAddedSignal
simsignal_t routeAddedSignal
Definition: Simsignals.cc:41
inet::NextHopRoutingTable::routes
RouteVector routes
Definition: NextHopRoutingTable.h:35
NUM_INIT_STAGES
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
inet::physicallayer::k
const double k
Definition: Qam1024Modulation.cc:14
inet::NextHopRoutingTable::configureLoopback
virtual void configureLoopback()
Definition: NextHopRoutingTable.cc:180
Enter_Method
#define Enter_Method(...)
Definition: SelfDoc.h:71
inet::routeDeletedSignal
simsignal_t routeDeletedSignal
Definition: Simsignals.cc:42
inet::L3Address::MAC
@ MAC
Definition: L3Address.h:38
inet::interfaceIpv4ConfigChangedSignal
simsignal_t interfaceIpv4ConfigChangedSignal
Definition: Simsignals.cc:35
inet::NextHopRoutingTable::routerId
L3Address routerId
Definition: NextHopRoutingTable.h:29
inet::IRoute::F_PREFIX_LENGTH
@ F_PREFIX_LENGTH
Definition: IRoute.h:48
inet::NextHopRoutingTable::configureRouterId
virtual void configureRouterId()
Definition: NextHopRoutingTable.cc:137
inet::NextHopRoutingTable::internalRemoveRoute
NextHopRoute * internalRemoveRoute(NextHopRoute *route)
Definition: NextHopRoutingTable.cc:368
inet::interfaceCreatedSignal
simsignal_t interfaceCreatedSignal
Definition: Simsignals.cc:30
inet::IRoute::F_METRIC
@ F_METRIC
Definition: IRoute.h:54
inet::NextHopRoutingTable::forwarding
bool forwarding
Definition: NextHopRoutingTable.h:31
inet::interfaceConfigChangedSignal
simsignal_t interfaceConfigChangedSignal
Definition: Simsignals.cc:33
inet::INITSTAGE_LINK_LAYER
INET_API InitStage INITSTAGE_LINK_LAYER
Initialization of link-layer protocols.