INET Framework for OMNeT++/OMNEST
|
This module configures generic routing tables for a network. More...
#include <GenericNetworkConfigurator.h>
Protected Member Functions | |
virtual void | initialize (int stage) override |
virtual IRoutingTable * | findRoutingTable (Node *node) override |
virtual void | addStaticRoutes (Topology &topology) |
Adds static routes to all routing tables in the network. More... | |
virtual void | dumpRoutes (Topology &topology) |
Protected Member Functions inherited from inet::NetworkConfiguratorBase | |
virtual int | numInitStages () const override |
virtual void | handleMessage (cMessage *msg) override |
virtual void | extractTopology (Topology &topology) |
Extracts network topology by walking through the module hierarchy. More... | |
virtual void | extractWiredNeighbors (Topology &topology, Topology::LinkOut *linkOut, LinkInfo *linkInfo, std::set< InterfaceEntry * > &interfacesSeen, std::vector< Node * > &nodesVisited) |
virtual void | extractWirelessNeighbors (Topology &topology, const char *wirelessId, LinkInfo *linkInfo, std::set< InterfaceEntry * > &interfacesSeen, std::vector< Node * > &nodesVisited) |
virtual void | extractDeviceNeighbors (Topology &topology, Node *node, LinkInfo *linkInfo, std::set< InterfaceEntry * > &interfacesSeen, std::vector< Node * > &deviceNodesVisited) |
virtual InterfaceInfo * | determineGatewayForLink (LinkInfo *linkInfo) |
If this link has exactly one node that connects to other links as well, we can assume it is a "gateway" and return that (we'll use it in routing); otherwise return nullptr. More... | |
virtual double | computeNodeWeight (Node *node, const char *metric, cXMLElement *parameters) |
virtual double | computeLinkWeight (Link *link, const char *metric, cXMLElement *parameters) |
virtual double | computeWiredLinkWeight (Link *link, const char *metric, cXMLElement *parameters) |
virtual double | computeWirelessLinkWeight (Link *link, const char *metric, cXMLElement *parameters) |
virtual bool | isBridgeNode (Node *node) |
virtual bool | isWirelessInterface (InterfaceEntry *interfaceEntry) |
virtual const char * | getWirelessId (InterfaceEntry *interfaceEntry) |
If this function returns the same string for two wireless interfaces, they will be regarded as being in the same wireless network. More... | |
virtual InterfaceInfo * | createInterfaceInfo (Topology &topology, Node *node, LinkInfo *linkInfo, InterfaceEntry *interfaceEntry) |
virtual Topology::LinkOut * | findLinkOut (Node *node, int gateId) |
virtual InterfaceInfo * | findInterfaceInfo (Node *node, InterfaceEntry *interfaceEntry) |
virtual IInterfaceTable * | findInterfaceTable (Node *node) |
virtual void | dumpTopology (Topology &topology) |
Protected Member Functions inherited from inet::L3AddressResolver | |
virtual bool | getIPv4AddressFrom (L3Address &retAddr, IInterfaceTable *ift, bool netmask) |
virtual bool | getIPv6AddressFrom (L3Address &retAddr, IInterfaceTable *ift, bool netmask) |
virtual bool | getMACAddressFrom (L3Address &retAddr, IInterfaceTable *ift, bool netmask) |
virtual bool | getModulePathAddressFrom (L3Address &retAddr, IInterfaceTable *ift, bool netmask) |
virtual bool | getModuleIdAddressFrom (L3Address &retAddr, IInterfaceTable *ift, bool netmask) |
virtual bool | getInterfaceIPv4Address (L3Address &ret, InterfaceEntry *ie, bool mask) |
virtual bool | getInterfaceIPv6Address (L3Address &ret, InterfaceEntry *ie, bool mask) |
virtual bool | getInterfaceMACAddress (L3Address &ret, InterfaceEntry *ie, bool mask) |
virtual bool | getInterfaceModulePathAddress (L3Address &ret, InterfaceEntry *ie, bool mask) |
virtual bool | getInterfaceModuleIdAddress (L3Address &ret, InterfaceEntry *ie, bool mask) |
Protected Attributes | |
bool | addStaticRoutesParameter |
Topology | topology |
Protected Attributes inherited from inet::NetworkConfiguratorBase | |
double | minLinkWeight = NaN |
cXMLElement * | configuration = nullptr |
Additional Inherited Members | |
Public Types inherited from inet::L3AddressResolver | |
enum | { ADDR_IPv4 = 1, ADDR_IPv6 = 2, ADDR_MAC = 4, ADDR_MODULEPATH = 8, ADDR_MODULEID = 16, ADDR_MASK = 32 } |
Public Member Functions inherited from inet::L3AddressResolver | |
L3AddressResolver () | |
virtual | ~L3AddressResolver () |
virtual L3Address | resolve (const char *str, int addrType=DEFAULT_ADDR_TYPE) |
Accepts dotted decimal notation ("127.0.0.1"), module name of the host or router ("host[2]"), and empty string (""). More... | |
virtual std::vector< L3Address > | resolve (std::vector< std::string > strs, int addrType=DEFAULT_ADDR_TYPE) |
Utility function: Calls resolve() for each item in the string vector, and returns the result in an address vector. More... | |
virtual bool | tryResolve (const char *str, L3Address &result, int addrType=DEFAULT_ADDR_TYPE) |
Similar to resolve(), but returns false (instead of throwing an error) if the address cannot be resolved because the given host (or interface) doesn't have an address assigned yet. More... | |
virtual L3Address | addressOf (cModule *host, int addrType=DEFAULT_ADDR_TYPE) |
Returns IPv4 or IPv6 address of the given host or router. More... | |
virtual L3Address | addressOf (cModule *host, const char *ifname, int addrType=DEFAULT_ADDR_TYPE) |
Similar to addressOf(), but only looks at the given interface. More... | |
virtual L3Address | addressOf (cModule *host, cModule *destmod, int addrType=DEFAULT_ADDR_TYPE) |
Returns IPv4 or IPv6 address of the given host or router. More... | |
virtual L3Address | routerIdOf (cModule *host) |
Returns the router Id of the given router. More... | |
virtual L3Address | getAddressFrom (IInterfaceTable *ift, int addrType=DEFAULT_ADDR_TYPE) |
Returns the IPv4 or IPv6 address of the given host or router, given its IInterfaceTable module. More... | |
virtual L3Address | getAddressFrom (InterfaceEntry *ie, int addrType=DEFAULT_ADDR_TYPE) |
Returns the IPv4 or IPv6 address of the given interface (of a host or router). More... | |
virtual IInterfaceTable * | interfaceTableOf (cModule *host) |
The function tries to look up the IInterfaceTable module as submodule "interfaceTable" or "networkLayer.interfaceTable" within the host/router module. More... | |
virtual IIPv4RoutingTable * | routingTableOf (cModule *host) |
The function tries to look up the IIPv4RoutingTable module as submodule "routingTable" or "networkLayer.routingTable" within the host/router module. More... | |
virtual IPv6RoutingTable * | routingTable6Of (cModule *host) |
The function tries to look up the IPv6RoutingTable module as submodule "routingTable6" or "networkLayer.routingTable6" within the host/router module. More... | |
virtual IInterfaceTable * | findInterfaceTableOf (cModule *host) |
Like interfaceTableOf(), but doesn't throw error if not found. More... | |
virtual IIPv4RoutingTable * | findIPv4RoutingTableOf (cModule *host) |
Like routingTableOf(), but doesn't throw error if not found. More... | |
virtual IPv6RoutingTable * | findIPv6RoutingTableOf (cModule *host) |
Like interfaceTableOf(), but doesn't throw error if not found. More... | |
virtual GenericRoutingTable * | findGenericRoutingTableOf (cModule *host) |
Like interfaceTableOf(), but doesn't throw error if not found. More... | |
virtual cModule * | findHostWithAddress (const L3Address &addr) |
Find the Host with the specified address. More... | |
This module configures generic routing tables for a network.
For more info please see the NED file.
|
protectedvirtual |
Adds static routes to all routing tables in the network.
The algorithm uses Dijkstra's weighted shortest path algorithm. May add default routes and subnet routes if possible and requested.
Referenced by initialize().
|
protectedvirtual |
Referenced by initialize().
|
overrideprotectedvirtual |
Reimplemented from inet::NetworkConfiguratorBase.
|
overrideprotectedvirtual |
Reimplemented from inet::NetworkConfiguratorBase.
|
protected |
|
protected |
Referenced by initialize().