DESERT 3.5.1
|
#include <uwflooding-sec.h>
Public Member Functions | |
UwFloodingSec () | |
virtual | ~UwFloodingSec () |
Protected Member Functions | |
virtual int | command (int, const char *const *) |
virtual void | recv (Packet *) |
virtual int | recvSyncClMsg (ClMessage *) |
virtual int | recvAsyncClMsg (ClMessage *) |
virtual void | writePathInTrace (const Packet *, const string &) |
void | addToNeighbor (uint8_t neighbor_addr) |
void | printNeighbor () |
bool | checkUnconfirmedPkt (uint8_t neighbor_addr, int uid) |
void | sendDown (Packet *p, double delay=0) |
virtual void | sendStatsClMsg (int neighbor_addr) |
void | retrieveInstantNoise (int neighbor_addr) |
Static Protected Member Functions | |
static nsaddr_t | str2addr (const char *) |
static string | printIP (const nsaddr_t &) |
Private Types | |
typedef std::map< uint16_t, double > | map_packets |
typedef std::map< uint8_t, map_packets > | map_forwarded_packets |
typedef std::map< uint8_t, uint > | neighbor_map |
typedef std::map< uint8_t, NeighborReputationHandler > | neighbor_timer_map |
Private Member Functions | |
UwFloodingSec (const UwFloodingSec &) | |
uint8_t | getTTL (Packet *p) const |
Friends | |
class | NeighborReputationHandler |
UwFloodingSec class is used to represent the routing layer of a node.
Definition at line 168 of file uwflooding-sec.h.
|
private |
Typedef for a map of the packet forwarded (saddr, map_packets).
Definition at line 316 of file uwflooding-sec.h.
|
private |
Typedef for a packet id: (serial_number, timestamp).
Definition at line 312 of file uwflooding-sec.h.
|
private |
Typdef for a map of the neighbor with the number of packets received from him.
Definition at line 325 of file uwflooding-sec.h.
|
private |
Typedef for the forwardig timer of the neigbors.
Definition at line 329 of file uwflooding-sec.h.
UwFloodingSec::UwFloodingSec | ( | ) |
Constructor of UwFloodingSec class.
Definition at line 290 of file uwflooding-sec.cpp.
|
virtual |
Destructor of UwFloodingSec class.
Definition at line 315 of file uwflooding-sec.cpp.
|
private |
Copy constructor declared as private.
It is not possible to create a new UwFloodingSec object passing to its constructor another UwFloodingSec object.
UwFloodingSec& | UwFloodingSec object. |
Adds a node in the neighbor map, updating the number of packets received from that node.
neighbor_addr | IP address of the neighbor |
Definition at line 753 of file uwflooding-sec.cpp.
Check if the received packets is an unconfirmed one.
neighbor_addr | IP address of the neighbor |
uid | uinique id of the received packet |
Definition at line 807 of file uwflooding-sec.cpp.
TCL command interpreter.
It implements the following OTcl methods:
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). |
Definition at line 400 of file uwflooding-sec.cpp.
Get the value of the TTL.
p | pointer to the packet for which the ttl has to be computed. |
Definition at line 694 of file uwflooding-sec.cpp.
Return a string with an IP in the classic form "x.x.x.x" converting an ns2 nsaddr_t address.
nsaddr_t& | ns2 address |
Definition at line 738 of file uwflooding-sec.cpp.
|
protected |
Prints the neighbor list togheter with the number of packets received from the neighbor.
Definition at line 770 of file uwflooding-sec.cpp.
Performs the reception of packets from upper and lower layers.
Packet* | Pointer to the packet will be received. |
Definition at line 466 of file uwflooding-sec.cpp.
|
protectedvirtual |
Cross-Layer messages asynchronous interpreter.
Used to retrive the IP od the current node from the IP module.
ClMessage* | an instance of ClMessage that represent the message received and used for the answer. |
Definition at line 394 of file uwflooding-sec.cpp.
|
protectedvirtual |
Cross-Layer messages synchronous interpreter.
ClMessage* | an instance of ClMessage that represent the message received |
Definition at line 320 of file uwflooding-sec.cpp.
Send ClMsgStats to retreive instantaneous noise.
The ClMsg is sent in unicast only to the module which sent the trigger message
neighbor_addr | IP address of the neighbor |
Definition at line 373 of file uwflooding-sec.cpp.
Send down packets and start forwarding timer.
p | pointer to the packet |
delay | (optional) delay introduced before transmission [sec.] |
Definition at line 789 of file uwflooding-sec.cpp.
Send ClMsgStats message when triggered by the reception of an overherd packets.
The ClMsg is sent in unicast only to the module which sent the trigger message
neighbor_addr | IP address of the neighbor |
Definition at line 338 of file uwflooding-sec.cpp.
Returns a nsaddr_t address from an IP written as a string in the form "x.x.x.x".
char* | IP in string form |
Writes in the Path Trace file the path contained in the Packet.
Packet | to analyze. |
Definition at line 705 of file uwflooding-sec.cpp.
|
friend |
Definition at line 170 of file uwflooding-sec.h.
|
private |
Value to be used by the NeighborReputationHandler object to combine new snr values and average snr.
Definition at line 340 of file uwflooding-sec.h.
|
private |
Time out within which the forwarding is expected.
Definition at line 333 of file uwflooding-sec.h.
|
private |
Definition at line 296 of file uwflooding-sec.h.
|
private |
Validity time of a packet entry.
Definition at line 298 of file uwflooding-sec.h.
|
private |
Map of the packet forwarded.
Definition at line 319 of file uwflooding-sec.h.
|
private |
Map with the neighbor.
Definition at line 327 of file uwflooding-sec.h.
|
private |
Map with the neighbor timer.
Definition at line 331 of file uwflooding-sec.h.
|
private |
Flag used to enable the mechanism to drop packets processed twice.
Definition at line 299 of file uwflooding-sec.h.
|
private |
Used to convert to string.
Definition at line 310 of file uwflooding-sec.h.
|
private |
Number of packets forwarded by this module.
Definition at line 301 of file uwflooding-sec.h.
|
private |
Previous hop IP address of the last received packet.
Definition at line 335 of file uwflooding-sec.h.
|
private |
Reputation of the neighbor.
Definition at line 338 of file uwflooding-sec.h.
|
private |
id of the physical layer from which collect the statistics.
Definition at line 345 of file uwflooding-sec.h.
|
private |
Ofstream used to write the path trace file in the disk.
Definition at line 308 of file uwflooding-sec.h.
|
private |
Name of the trace file that contains the list of paths of the data packets received.
Definition at line 305 of file uwflooding-sec.h.
|
private |
Flag used to enable or disable the path trace file for nodes,.
Definition at line 302 of file uwflooding-sec.h.
|
private |
Time to leave of the UWFLOODING packets.
Definition at line 297 of file uwflooding-sec.h.
Map with ttl per traffic.
Definition at line 321 of file uwflooding-sec.h.
|
private |
True if the reputation system is used.
Definition at line 323 of file uwflooding-sec.h.
|
private |
True if the id of the phy layer from which obtain the statistics is a valid one.
Definition at line 343 of file uwflooding-sec.h.