#include <uwstaticrouting.h>
UwStaticRoutingModule class implements basic routing functionalities.
Definition at line 58 of file uwstaticrouting.h.
◆ UwStaticRoutingModule()
UwStaticRoutingModule::UwStaticRoutingModule |
( |
| ) |
|
◆ ~UwStaticRoutingModule()
UwStaticRoutingModule::~UwStaticRoutingModule |
( |
| ) |
|
|
virtual |
◆ addRoute()
void UwStaticRoutingModule::addRoute |
( |
const uint8_t & |
dst, |
|
|
const uint8_t & |
next |
|
) |
| |
|
virtual |
Adds a new entry in the routing table.
- Parameters
-
nsaddr_t | Address of the destination. |
nsaddr_t | Address of the next hop. |
Definition at line 85 of file uwstaticrouting.cpp.
◆ clearRoutes()
void UwStaticRoutingModule::clearRoutes |
( |
| ) |
|
|
virtual |
◆ command()
int UwStaticRoutingModule::command |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| |
|
virtual |
TCL command interpreter.
It implements the following OTcl methods:
- Parameters
-
argc | Number of arguments in argv. |
argv | Array of strings which are the command parameters (Note that argv[0] is the name of the object). |
- Returns
- TCL_OK or TCL_ERROR whether the command has been dispatched successfully or not.
Reimplemented from UWIPModule.
Definition at line 111 of file uwstaticrouting.cpp.
◆ getNextHop() [1/2]
uint8_t UwStaticRoutingModule::getNextHop |
( |
const Packet * |
p | ) |
const |
|
virtual |
Returns the next hop address of a packet passed as input.
- Parameters
-
Packet* | Packet to process. |
- Returns
- IP of the next hop.
Definition at line 187 of file uwstaticrouting.cpp.
◆ getNextHop() [2/2]
uint8_t UwStaticRoutingModule::getNextHop |
( |
const uint8_t & |
dst | ) |
const |
|
virtual |
Returns the next hop address of an address passed as input.
- Parameters
-
nsaddr_t | Address to process. |
- Returns
- IP of the next hop.
Definition at line 194 of file uwstaticrouting.cpp.
◆ recv()
void UwStaticRoutingModule::recv |
( |
Packet * |
p | ) |
|
|
virtual |
Performs the reception of packets from upper and lower layers.
- Parameters
-
Packet* | Pointer to the packet will be received. |
Reimplemented from UWIPModule.
Definition at line 147 of file uwstaticrouting.cpp.
◆ recvSyncClMsg()
int UwStaticRoutingModule::recvSyncClMsg |
( |
ClMessage * |
m | ) |
|
|
virtual |
Cross-Layer messages synchronous interpreter.
- Parameters
-
ClMessage* | an instance of ClMessage that represent the message received |
- Returns
- 0 if successful.
Reimplemented from UWIPModule.
Definition at line 73 of file uwstaticrouting.cpp.
◆ default_gateway
uint8_t UwStaticRoutingModule::default_gateway |
|
private |
◆ routing_table
std::map<uint8_t, uint8_t> UwStaticRoutingModule::routing_table |
|
private |
The documentation for this class was generated from the following files: