#include <uwicrp-module-node.h>
UwIcrpNode class is used to represent the routing layer of a node.
Definition at line 87 of file uwicrp-module-node.h.
◆ UwIcrpNode()
UwIcrpNode::UwIcrpNode |
( |
| ) |
|
◆ ~UwIcrpNode()
UwIcrpNode::~UwIcrpNode |
( |
| ) |
|
◆ ackLost()
void UwIcrpNode::ackLost |
( |
| ) |
|
|
protectedvirtual |
◆ addIpInList()
bool UwIcrpNode::addIpInList |
( |
Packet * |
p, |
|
|
nsaddr_t |
ip_ |
|
) |
| |
|
protectedvirtual |
Adds an IP passed as argument in the header of a Data packet passed as argument.
The function returns true if it added the IP, false otherwise (not enough space in the header).
- Parameters
-
Packet* | Pointer to a Data packet in which to add an IP. |
nsaddr_t | Address to add in the header. |
- Returns
- true if the IP was added, false otherwise.
Definition at line 481 of file uwicrp-module-node.cpp.
◆ addRouteEntry()
void UwIcrpNode::addRouteEntry |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
Adds the information received from a Status packet in the routing table of the node.
- Parameters
-
Packet* | Status packet received from a sink. |
Definition at line 414 of file uwicrp-module-node.cpp.
◆ clearAllRouteTable()
void UwIcrpNode::clearAllRouteTable |
( |
| ) |
|
|
protectedvirtual |
◆ clearRouteTable()
void UwIcrpNode::clearRouteTable |
( |
const int & |
i | ) |
|
|
protectedvirtual |
Removes a specific entry in the routing table of the node.
- Parameters
-
int& | Index number of the entry to remove. |
Definition at line 125 of file uwicrp-module-node.cpp.
◆ command()
int UwIcrpNode::command |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| |
|
protectedvirtual |
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.
Definition at line 149 of file uwicrp-module-node.cpp.
◆ findInRouteTable()
int UwIcrpNode::findInRouteTable |
( |
nsaddr_t |
ip_ | ) |
|
|
protectedvirtual |
Seeks for an entry in the routing table that contains information to a specific address passed as argument.
- Parameters
-
nsaddr_t | Address of the destination to which search information. |
- Returns
- Index value of the entry in the routing table that contains routing information to the destination.
Definition at line 449 of file uwicrp-module-node.cpp.
◆ getAckPktHeaderSize()
static const int UwIcrpNode::getAckPktHeaderSize |
( |
| ) |
|
|
inlinestaticprotected |
◆ getDataPktHeaderSize()
static const int UwIcrpNode::getDataPktHeaderSize |
( |
| ) |
|
|
inlinestaticprotected |
◆ getStatusPktHeaderSize()
static const int UwIcrpNode::getStatusPktHeaderSize |
( |
| ) |
|
|
inlinestaticprotected |
◆ initialize()
void UwIcrpNode::initialize |
( |
| ) |
|
|
protectedvirtual |
◆ initPkt()
void UwIcrpNode::initPkt |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
Initializes a Data packet (previously allocated).
- Parameters
-
Packet* | Pointer to a Data to initialize. |
Definition at line 383 of file uwicrp-module-node.cpp.
◆ initPktAck()
void UwIcrpNode::initPktAck |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
Initializes an Ack packet (previously allocated).
- Parameters
-
Packet* | Pointer to an Ack packet to initialize. |
Definition at line 558 of file uwicrp-module-node.cpp.
◆ isIpInList()
bool UwIcrpNode::isIpInList |
( |
Packet * |
p, |
|
|
nsaddr_t |
ip_ |
|
) |
| |
|
protectedvirtual |
Checks if a specific IP is in the header of the packet passed as argument.
If yes it returns true, otherwise it return false.
- Parameters
-
Packet* | Pointer to a packet to analyze. |
nsaddr_t | Address to search for. |
- Returns
- true if the IP of the current node is in the header, otherwise false.
Definition at line 467 of file uwicrp-module-node.cpp.
◆ printHopTable()
void UwIcrpNode::printHopTable |
( |
| ) |
|
|
protectedvirtual |
◆ printIP()
string UwIcrpNode::printIP |
( |
const uint8_t |
_ip | ) |
|
|
protectedvirtual |
Return a string with an IP in the classic form "x.x.x.x" converting an ns2 nsaddr_t address.
- Parameters
-
- Returns
- String that contains a printable IP in the classic form "x.x.x.x"
Definition at line 510 of file uwicrp-module-node.cpp.
◆ recv()
void UwIcrpNode::recv |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
Performs the reception of packets from upper and lower layers.
- Parameters
-
Packet* | Pointer to the packet will be received. |
Definition at line 207 of file uwicrp-module-node.cpp.
◆ recvAsyncClMsg()
int UwIcrpNode::recvAsyncClMsg |
( |
ClMessage * |
m | ) |
|
|
protectedvirtual |
◆ recvSyncClMsg()
int UwIcrpNode::recvSyncClMsg |
( |
ClMessage * |
m | ) |
|
|
protectedvirtual |
Cross-Layer messages synchronous interpreter.
- Parameters
-
ClMessage* | an instance of ClMessage that represent the message received |
- Returns
- 0 if successful.
Definition at line 100 of file uwicrp-module-node.cpp.
◆ sendBackAck()
void UwIcrpNode::sendBackAck |
( |
const Packet * |
p | ) |
|
|
protectedvirtual |
◆ str2addr()
nsaddr_t UwIcrpNode::str2addr |
( |
const char * |
str | ) |
|
|
protected |
Returns a nsaddr_t address from an IP written as a string in the form "x.x.x.x".
- Parameters
-
- Returns
- nsaddr_t that contains the IP converter from the input string
Definition at line 518 of file uwicrp-module-node.cpp.
◆ AckWaiting
◆ ackwaitingTmr_
◆ ipAddr_
uint8_t UwIcrpNode::ipAddr_ |
|
protected |
◆ ipSink_
uint8_t UwIcrpNode::ipSink_ |
|
protected |
◆ max_validity_time_
double UwIcrpNode::max_validity_time_ |
|
protected |
◆ numberofackpkt_
long UwIcrpNode::numberofackpkt_ = 0 |
|
staticprivate |
◆ numberofdatapkt_
long UwIcrpNode::numberofdatapkt_ = 0 |
|
staticprivate |
◆ numberofstatuspkt_
long UwIcrpNode::numberofstatuspkt_ = 0 |
|
staticprivate |
◆ printDebug_
int UwIcrpNode::printDebug_ |
|
protected |
◆ route_table
◆ timer_ack_waiting_
double UwIcrpNode::timer_ack_waiting_ |
|
protected |
The documentation for this class was generated from the following files: