43#define TTL_EQUALS_TO_ZERO \
102 virtual int command(
int,
const char *
const *);
177 typedef std::map<uint8_t, map_packets>
Provides the header description for UWFLOODING packets.
UwFlooding class is used to represent the routing layer of a node.
std::map< uint16_t, double > map_packets
Typedef for a packet id: (serial_number, timestamp).
static nsaddr_t str2addr(const char *)
Returns a nsaddr_t address from an IP written as a string in the form "x.x.x.x".
UwFlooding()
Constructor of UwFlooding class.
long packets_forwarded_
Number of packets forwarded by this module.
static string printIP(const nsaddr_t &)
Return a string with an IP in the classic form "x.x.x.x" converting an ns2 nsaddr_t address.
std::map< uint8_t, map_packets > map_forwarded_packets
Typedef for a map of the packet forwarded (saddr, map_packets).
virtual int command(int, const char *const *)
TCL command interpreter.
virtual int recvAsyncClMsg(ClMessage *)
Cross-Layer messages asynchronous interpreter.
virtual void recv(Packet *)
Performs the reception of packets from upper and lower layers.
ofstream trace_file_path_
Ofstream used to write the path trace file in the disk.
double maximum_cache_time_
Validity time of a packet entry.
uint8_t getTTL(Packet *p) const
Get the value of the TTL.
char * trace_file_path_name_
Name of the trace file that contains the list of paths of the data packets received.
virtual ~UwFlooding()
Destructor of UwFlooding class.
std::map< uint16_t, uint8_t > ttl_traffic_map
Map with ttl per traffic.
UwFlooding(const UwFlooding &)
Copy constructor declared as private.
int optimize_
Flag used to enable the mechanism to drop packets processed twice.
bool trace_path_
Flag used to enable or disable the path trace file for nodes,.
virtual int recvSyncClMsg(ClMessage *)
Cross-Layer messages synchronous interpreter.
virtual void writePathInTrace(const Packet *, const string &)
Writes in the Path Trace file the path contained in the Packet.
ostringstream osstream_
Used to convert to string.
map_forwarded_packets my_forwarded_packets_
Map of the packet forwarded.
int ttl_
Time to leave of the UWFLOODING packets.
Provides the UWCBR packets header description and the definition of the class UWCBR.
Cross layer messages definition for the UWIP Module.
Provides the UWIP packets header description. Definition of the class that define the network layer.