DESERT 3.5.1
|
#include <uwflooding.h>
Public Member Functions | |
UwFlooding () | |
virtual | ~UwFlooding () |
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 &) |
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 |
Private Member Functions | |
UwFlooding (const UwFlooding &) | |
uint8_t | getTTL (Packet *p) const |
Private Attributes | |
uint8_t | ipAddr_ |
int | ttl_ |
double | maximum_cache_time_ |
int | optimize_ |
long | packets_forwarded_ |
bool | trace_path_ |
char * | trace_file_path_name_ |
ofstream | trace_file_path_ |
ostringstream | osstream_ |
map_forwarded_packets | my_forwarded_packets_ |
std::map< uint16_t, uint8_t > | ttl_traffic_map |
UwFlooding class is used to represent the routing layer of a node.
Definition at line 74 of file uwflooding.h.
|
private |
Typedef for a map of the packet forwarded (saddr, map_packets).
Definition at line 178 of file uwflooding.h.
|
private |
Typedef for a packet id: (serial_number, timestamp).
Definition at line 174 of file uwflooding.h.
UwFlooding::UwFlooding | ( | ) |
Constructor of UwFlooding class.
Definition at line 78 of file uwflooding.cpp.
|
virtual |
Destructor of UwFlooding class.
Definition at line 93 of file uwflooding.cpp.
|
private |
Copy constructor declared as private.
It is not possible to create a new UwFlooding object passing to its constructor another UwFlooding object.
UwFlooding& | UwFlooding object. |
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 110 of file uwflooding.cpp.
Get the value of the TTL.
p | pointer to the packet for which the ttl has to be computed. |
Definition at line 378 of file uwflooding.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 422 of file uwflooding.cpp.
Performs the reception of packets from upper and lower layers.
Packet* | Pointer to the packet will be received. |
Definition at line 155 of file uwflooding.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 104 of file uwflooding.cpp.
|
protectedvirtual |
Cross-Layer messages synchronous interpreter.
ClMessage* | an instance of ClMessage that represent the message received |
Definition at line 98 of file uwflooding.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 389 of file uwflooding.cpp.
|
private |
Definition at line 158 of file uwflooding.h.
|
private |
Validity time of a packet entry.
Definition at line 160 of file uwflooding.h.
|
private |
Map of the packet forwarded.
Definition at line 181 of file uwflooding.h.
|
private |
Flag used to enable the mechanism to drop packets processed twice.
Definition at line 161 of file uwflooding.h.
|
private |
Used to convert to string.
Definition at line 172 of file uwflooding.h.
|
private |
Number of packets forwarded by this module.
Definition at line 163 of file uwflooding.h.
|
private |
Ofstream used to write the path trace file in the disk.
Definition at line 170 of file uwflooding.h.
|
private |
Name of the trace file that contains the list of paths of the data packets received.
Definition at line 167 of file uwflooding.h.
|
private |
Flag used to enable or disable the path trace file for nodes,.
Definition at line 164 of file uwflooding.h.
|
private |
Time to leave of the UWFLOODING packets.
Definition at line 159 of file uwflooding.h.
Map with ttl per traffic.
Definition at line 183 of file uwflooding.h.