40#ifndef _STATIC_ROUTING_H_
41#define _STATIC_ROUTING_H_
43#define DROP_DEST_NO_ROUTE \
73 virtual void recv(Packet *)
override;
85 virtual int command(
int,
const char *
const *)
override;
93 virtual uint8_t
getNextHop(
const Packet *)
const;
101 virtual uint8_t
getNextHop(
const uint8_t &)
const;
114 virtual void addRoute(
const uint8_t &,
const uint8_t &);
118 std::map<uint8_t, uint8_t>
UWIPModule class is used to define the Internet Protocol (IP) layer of a node.
UwStaticRoutingModule class implements basic routing functionalities.
virtual void recv(Packet *) override
Performs the reception of packets from upper and lower layers.
virtual void clearRoutes()
Removes all the routing information.
virtual void addRoute(const uint8_t &, const uint8_t &)
Adds a new entry in the routing table.
std::map< uint8_t, uint8_t > routing_table
Routing table: destination - next hop.
UwStaticRoutingModule()
Constructor of UwStaticRoutingModule class.
virtual int command(int, const char *const *) override
TCL command interpreter.
virtual uint8_t getNextHop(const Packet *) const
Returns the next hop address of a packet passed as input.
virtual ~UwStaticRoutingModule()=default
Destructor of UwStaticRoutingModule class.
uint8_t default_gateway
Default gateway.
Provides the UWIP packets header description. Definition of the class that define the network layer.
static const uint16_t IP_ROUTING_MAX_ROUTES
Maximum number of entries in the routing table of a node.