|
DESERT 4.0.0
|
#include <uwudp-module.h>


Public Member Functions | |
| UwUdp () | |
| virtual | ~UwUdp ()=default |
| virtual void | recv (Packet *) override |
| virtual void | recv (Packet *, int) override |
| virtual int | command (int, const char *const *) override |
| virtual int | assignPort (Module *) |
| void | printIdsPkts () const |
Static Protected Member Functions | |
| static int | getUdpHeaderSize () |
Protected Attributes | |
| uint16_t | portcounter |
| int | drop_duplicated_packets_ |
| int | debug_ |
| std::map< int, int > | port_map |
| std::map< int, int > | id_map |
| std::map< uint16_t, map_packets_el > | map_packets |
UwUdp class is used to manage UWUDP packets, and flows to and from upper modules.
| UwUdp::UwUdp | ( | ) |
Constructor of UwUdp class.
References debug_, and drop_duplicated_packets_.
|
virtualdefault |
Destructor of UwUdp class.
|
virtual |
Associates a module with a port.
| Module* | Module to which associate a port. |
References id_map, port_map, and portcounter.
Referenced by command().
|
overridevirtual |
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 assignPort(), getUdpHeaderSize(), and printIdsPkts().

|
inlinestaticprotected |
|
inline |
|
overridevirtual |
Performs the reception of packets from upper and lower layers.
| Packet* | Pointer to the packet will be received. |
|
overridevirtual |
Performs the reception of packets from upper and lower layers.
| Packet* | Pointer to the packet will be received. |
| Handler* | Handler. |
References hdr_uwudp::dport(), drop_duplicated_packets_, id_map, map_packets, port_map, portcounter, hdr_uwip::saddr(), and hdr_uwudp::sport().

|
protected |
Flag to enable or disable debug.
Referenced by UwUdp().
|
protected |
|
protected |
Map port number to application module id (port_number, id).
Referenced by assignPort(), and recv().
|
protected |
Map used to keep track of the packets received by each port. The key is the port number. The second element contains the saddr IP and a vector used as bucketlist.
Referenced by recv().
|
protected |
Map application module id to port number (id, port_number).
Referenced by assignPort(), and recv().
|
protected |
Counter used to generate new port numbers.
Referenced by assignPort(), and recv().