NETWORK ATTACKS FRAMEWORK  1.0.0
A NETwork Attacks framework. Making network attacks impact evaluation easier!
RREQ Struct Reference

#include <NA_aodv_rreq.h>

Inheritance diagram for RREQ:
AODV_msg

List of all members.

Public Member Functions

 RREQ (const char *name="RREQAodvMsg")
 RREQ (const RREQ &m)
RREQoperator= (const RREQ &m)
virtual RREQdup () const
virtual std::string detailedInfo () const
uint8_t getJ () const
uint8_t getR () const
uint8_t getG () const
uint8_t getD () const
uint8_t getRes1 () const
uint8_t getRes2 () const
uint8_t getHcnt () const
uint32_t getRreq_id () const
const ManetAddress & getDest_addr () const
uint32_t getDest_seqno () const
const ManetAddress & getOrig_addr () const
uint32_t getOrig_seqno () const
uint32_t getCost () const
uint8_t getHopfix () const

Public Attributes

u_int8_t type
u_int8_t res2
u_int8_t hcnt
u_int32_t rreq_id
u_int32_t dest_addr
u_int32_t dest_seqno
u_int32_t orig_addr
u_int32_t orig_seqno
u_int8_t j
u_int8_t r
u_int8_t g
u_int8_t d
u_int8_t res1
ManetAddress dest_addr
ManetAddress orig_addr
uint32_t cost
uint8_t hopfix

Private Member Functions

void copy (const RREQ &other)

Detailed Description

Definition at line 49 of file NA_aodv_rreq.h.


Constructor & Destructor Documentation

RREQ::RREQ ( const char *  name = "RREQAodvMsg") [inline, explicit]

Definition at line 186 of file NA_aodv_msg_struct.h.

: AODV_msg (name) {setBitLength(24*8);}
RREQ::RREQ ( const RREQ m)

Definition at line 257 of file NA_aodv_msg_struct.cc.

                        : AODV_msg(m)
{
    copy(m);
}

Member Function Documentation

void RREQ::copy ( const RREQ other) [private]

Definition at line 270 of file NA_aodv_msg_struct.cc.

{
    j = m.j;      /* Join flag (multicast) */
    r = m.r;      /* Repair flag */
    g = m.g;      /* Gratuitous RREP flag */
    d = m.d;      /* Destination only respond */
    res1 = m.res1;
    res2 = m.res2;
    hcnt = m.hcnt;
    rreq_id = m.rreq_id;
    dest_addr = m.dest_addr;
    dest_seqno = m.dest_seqno;
    orig_addr = m.orig_addr;
    orig_seqno = m.orig_seqno;
    cost = m.cost;
    hopfix = m.hopfix;
}
std::string RREQ::detailedInfo ( ) const [virtual]

Definition at line 288 of file NA_aodv_msg_struct.cc.

{
    std::stringstream out;
    int timeToLive = ttl;
    int hops = hcnt;
    out << " RREQ "  << "\n"; // Khmm...
    out <<" Source :"<< orig_addr << "\n";
    out <<" Source seq num:"<< orig_seqno << "\n";
    out <<" Destination :"<< dest_addr << "\n";
    out <<" Destination seq num:"<< dest_seqno << "\n";
    out <<" TTL :"<< timeToLive << "\n";
    out <<" hops :"<< hops << "\n";
    return out.str();
}
virtual RREQ* RREQ::dup ( ) const [inline, virtual]

Reimplemented from AODV_msg.

Definition at line 189 of file NA_aodv_msg_struct.h.

{return new RREQ(*this);}
uint32_t RREQ::getCost ( ) const [inline]

Definition at line 205 of file NA_aodv_msg_struct.h.

{return cost;}
uint8_t RREQ::getD ( ) const [inline]

Definition at line 194 of file NA_aodv_msg_struct.h.

{return d;}
const ManetAddress& RREQ::getDest_addr ( ) const [inline]

Definition at line 200 of file NA_aodv_msg_struct.h.

{return dest_addr;}
uint32_t RREQ::getDest_seqno ( ) const [inline]

Definition at line 201 of file NA_aodv_msg_struct.h.

{return dest_seqno;}
uint8_t RREQ::getG ( ) const [inline]

Definition at line 193 of file NA_aodv_msg_struct.h.

{return g;}
uint8_t RREQ::getHcnt ( ) const [inline]

Definition at line 197 of file NA_aodv_msg_struct.h.

{return hcnt;}
uint8_t RREQ::getHopfix ( ) const [inline]

Definition at line 206 of file NA_aodv_msg_struct.h.

{return hopfix;}
uint8_t RREQ::getJ ( ) const [inline]

Definition at line 191 of file NA_aodv_msg_struct.h.

{return j;}
const ManetAddress& RREQ::getOrig_addr ( ) const [inline]

Definition at line 203 of file NA_aodv_msg_struct.h.

{return orig_addr;}
uint32_t RREQ::getOrig_seqno ( ) const [inline]

Definition at line 204 of file NA_aodv_msg_struct.h.

{return orig_seqno;}
uint8_t RREQ::getR ( ) const [inline]

Definition at line 192 of file NA_aodv_msg_struct.h.

{return r;}
uint8_t RREQ::getRes1 ( ) const [inline]

Definition at line 195 of file NA_aodv_msg_struct.h.

{return res1;}
uint8_t RREQ::getRes2 ( ) const [inline]

Definition at line 196 of file NA_aodv_msg_struct.h.

{return res2;}
uint32_t RREQ::getRreq_id ( ) const [inline]

Definition at line 198 of file NA_aodv_msg_struct.h.

{return rreq_id;}
RREQ & RREQ::operator= ( const RREQ m)

Definition at line 262 of file NA_aodv_msg_struct.cc.

{
    if (this==&m) return *this;
    AODV_msg::operator=(m);
    copy(m);
    return *this;
}

Member Data Documentation

uint32_t RREQ::cost

Definition at line 182 of file NA_aodv_msg_struct.h.

u_int8_t RREQ::d

Definition at line 171 of file NA_aodv_msg_struct.h.

u_int32_t RREQ::dest_addr

Definition at line 70 of file NA_aodv_rreq.h.

ManetAddress RREQ::dest_addr

Definition at line 177 of file NA_aodv_msg_struct.h.

u_int32_t RREQ::dest_seqno

Definition at line 71 of file NA_aodv_rreq.h.

u_int8_t RREQ::g

Definition at line 170 of file NA_aodv_msg_struct.h.

u_int8_t RREQ::hcnt

Definition at line 68 of file NA_aodv_rreq.h.

uint8_t RREQ::hopfix

Definition at line 183 of file NA_aodv_msg_struct.h.

u_int8_t RREQ::j

Definition at line 168 of file NA_aodv_msg_struct.h.

u_int32_t RREQ::orig_addr

Definition at line 72 of file NA_aodv_rreq.h.

ManetAddress RREQ::orig_addr

Definition at line 180 of file NA_aodv_msg_struct.h.

u_int32_t RREQ::orig_seqno

Definition at line 73 of file NA_aodv_rreq.h.

u_int8_t RREQ::r

Definition at line 169 of file NA_aodv_msg_struct.h.

u_int8_t RREQ::res1

Definition at line 172 of file NA_aodv_msg_struct.h.

u_int8_t RREQ::res2

Definition at line 67 of file NA_aodv_rreq.h.

u_int32_t RREQ::rreq_id

Definition at line 69 of file NA_aodv_rreq.h.

u_int8_t RREQ::type

Reimplemented from AODV_msg.

Definition at line 51 of file NA_aodv_rreq.h.


The documentation for this struct was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerator Defines