40#ifndef _STATIC_ROUTING_H_
41#define _STATIC_ROUTING_H_
43#define DROP_DEST_NO_ROUTE \
51static const uint16_t IP_ROUTING_MAX_ROUTES =
76 virtual void recv(Packet *);
97 virtual int command(
int,
const char *
const *);
105 virtual uint8_t
getNextHop(
const Packet *)
const;
113 virtual uint8_t
getNextHop(
const uint8_t &)
const;
126 virtual void addRoute(
const uint8_t &,
const uint8_t &);
129 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 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 recvSyncClMsg(ClMessage *)
Cross-Layer messages synchronous interpreter.
virtual uint8_t getNextHop(const Packet *) const
Returns the next hop address of a packet passed as input.
virtual void recv(Packet *)
Performs the reception of packets from upper and lower layers.
virtual ~UwStaticRoutingModule()
Destructor of UwStaticRoutingModule class.
uint8_t default_gateway
Default gateway.
virtual int command(int, const char *const *)
TCL command interpreter.
Provides the UWIP packets header description. Definition of the class that define the network layer.