|
DESERT 4.0.0
|
#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.
|
private |
Typedef for a map of the packet forwarded (saddr, map_packets).
|
private |
Typedef for a packet id: (serial_number, timestamp).
| UwFlooding::UwFlooding | ( | ) |
Constructor of UwFlooding class.
References maximum_cache_time_, optimize_, and ttl_.
|
virtual |
Destructor of UwFlooding class.
|
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. |
|
protectedvirtual |
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). |
References ipAddr_, packets_forwarded_, trace_file_path_, trace_file_path_name_, trace_path_, and ttl_traffic_map.
|
private |
Get the value of the TTL
| p | pointer to the packet for which the ttl has to be computed. |
References hdr_uwcbr::traffic_type(), ttl_, and ttl_traffic_map.
Referenced by recv().

|
staticprotected |
Return a string with an IP in the classic form "x.x.x.x" converting an ns2 nsaddr_t address.
| nsaddr_t& | ns2 address |
|
protectedvirtual |
Performs the reception of packets from upper and lower layers.
| Packet* | Pointer to the packet will be received. |
References hdr_uwip::daddr(), getTTL(), ipAddr_, maximum_cache_time_, my_forwarded_packets_, optimize_, packets_forwarded_, hdr_uwip::saddr(), trace_path_, hdr_uwflooding::ttl(), and writePathInTrace().

|
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. |
|
protectedvirtual |
Cross-Layer messages synchronous interpreter.
| ClMessage* | an instance of ClMessage that represent the message received |
|
staticprotected |
Returns a nsaddr_t address from an IP written as a string in the form "x.x.x.x".
| char* | IP in string form |
|
protectedvirtual |
Writes in the Path Trace file the path contained in the Packet
| Packet | to analyze. |
References hdr_uwip::daddr(), osstream_, hdr_uwip::saddr(), trace_file_path_, trace_file_path_name_, and hdr_uwflooding::ttl().
Referenced by recv().

|
private |
Validity time of a packet entry.
Referenced by recv(), and UwFlooding().
|
private |
Map of the packet forwarded.
Referenced by recv().
|
private |
Flag used to enable the mechanism to drop packets processed twice.
Referenced by recv(), and UwFlooding().
|
private |
Used to convert to string.
Referenced by writePathInTrace().
|
private |
|
private |
Ofstream used to write the path trace file in the disk.
Referenced by command(), and writePathInTrace().
|
private |
Name of the trace file that contains the list of paths of the data packets received.
Referenced by command(), and writePathInTrace().
|
private |
|
private |
Time to leave of the UWFLOODING packets.
Referenced by getTTL(), and UwFlooding().
|
private |