|
NETWORK ATTACKS FRAMEWORK
1.0.0
A NETwork Attacks framework. Making network attacks impact evaluation easier!
|
#include <NA_aodv_rerr.h>
Public Member Functions | |
| RERR (const char *name="RERRAodvMsg") | |
| ~RERR () | |
| RERR (const RERR &m) | |
| unsigned short | getRes1 () const |
| unsigned short | getN () const |
| unsigned short | getRes2 () const |
| int | getUdestArraySize () |
| void | addUdest (const ManetAddress &, unsigned int) |
| void | clearUdest () |
| RERR_udest * | getUdest (int) |
| RERR_udest & | getUdestRef (int i) |
| RERR & | operator= (const RERR &m) |
| virtual RERR * | dup () const |
Public Attributes | |
| u_int8_t | type |
| u_int8_t | res2 |
| u_int8_t | dest_count |
| u_int32_t | dest_addr |
| u_int32_t | dest_seqno |
| unsigned short | res1 |
| unsigned short | n |
| unsigned short | res2 |
| RERR_udest * | _udest |
Private Member Functions | |
| void | copy (const RERR &other) |
Definition at line 54 of file NA_aodv_rerr.h.
| RERR::RERR | ( | const char * | name = "RERRAodvMsg" | ) | [inline, explicit] |
Definition at line 85 of file NA_aodv_msg_struct.h.
: AODV_msg (name) {setBitLength(12*8); dest_count=0; _udest=NULL;}
| RERR::~RERR | ( | ) |
Definition at line 149 of file NA_aodv_msg_struct.cc.
{
clearUdest();
}
| RERR::RERR | ( | const RERR & | m | ) |
Definition at line 121 of file NA_aodv_msg_struct.cc.
| void RERR::addUdest | ( | const ManetAddress & | src_addr, |
| unsigned int | udest_seqno | ||
| ) |
Definition at line 154 of file NA_aodv_msg_struct.cc.
{
RERR_udest *temp_udest;
temp_udest = new RERR_udest [dest_count+1];
for (int i=0; i < dest_count; i++)
{
temp_udest[i].dest_addr = _udest[i].dest_addr;
temp_udest[i].dest_seqno = _udest[i].dest_seqno;
}
delete [] _udest;
temp_udest[dest_count].dest_addr = src_addr;
temp_udest[dest_count].dest_seqno = udest_seqno;
_udest = temp_udest;
dest_count++;
setBitLength(getBitLength()+(RERR_UDEST_SIZE));
}
| void RERR::clearUdest | ( | ) |
Definition at line 184 of file NA_aodv_msg_struct.cc.
| void RERR::copy | ( | const RERR & | other | ) | [private] |
Definition at line 135 of file NA_aodv_msg_struct.cc.
{
n = m.n;
res1 = m.res1;
res2 = m.res2;
dest_count = m.dest_count;
_udest = new RERR_udest [dest_count];
for (int i=0; i < dest_count; i++)
{
_udest[i].dest_addr = m._udest[i].dest_addr;
_udest[i].dest_seqno = m._udest[i].dest_seqno;
}
}
Reimplemented from AODV_msg.
Definition at line 97 of file NA_aodv_msg_struct.h.
{return new RERR(*this);}
| unsigned short RERR::getN | ( | ) | const [inline] |
Definition at line 89 of file NA_aodv_msg_struct.h.
{return n;}
| unsigned short RERR::getRes1 | ( | ) | const [inline] |
Definition at line 88 of file NA_aodv_msg_struct.h.
{return res1;}
| unsigned short RERR::getRes2 | ( | ) | const [inline] |
Definition at line 90 of file NA_aodv_msg_struct.h.
{return res2;}
| RERR_udest * RERR::getUdest | ( | int | i | ) |
Definition at line 172 of file NA_aodv_msg_struct.cc.
{
if (i < dest_count)
{
return &(_udest[i]);
}
else
{
return NULL;
}
}
| int RERR::getUdestArraySize | ( | ) | [inline] |
Definition at line 91 of file NA_aodv_msg_struct.h.
{return dest_count;}
| RERR_udest& RERR::getUdestRef | ( | int | i | ) | [inline] |
Definition at line 95 of file NA_aodv_msg_struct.h.
{return *getUdest(i);}
Definition at line 126 of file NA_aodv_msg_struct.cc.
{
if (this==&m) return *this;
clearUdest();
AODV_msg::operator=(m);
copy(m);
return *this;
}
Definition at line 83 of file NA_aodv_msg_struct.h.
| u_int32_t RERR::dest_addr |
Definition at line 68 of file NA_aodv_rerr.h.
| u_int8_t RERR::dest_count |
Definition at line 67 of file NA_aodv_rerr.h.
| u_int32_t RERR::dest_seqno |
Definition at line 69 of file NA_aodv_rerr.h.
| unsigned short RERR::n |
Definition at line 80 of file NA_aodv_msg_struct.h.
| unsigned short RERR::res1 |
Definition at line 79 of file NA_aodv_msg_struct.h.
| u_int8_t RERR::res2 |
Definition at line 66 of file NA_aodv_rerr.h.
| unsigned short RERR::res2 |
Definition at line 81 of file NA_aodv_msg_struct.h.
| u_int8_t RERR::type |
Reimplemented from AODV_msg.
Definition at line 56 of file NA_aodv_rerr.h.