[ERROR] Adding malicious node in AOMDV protocol

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ERROR] Adding malicious node in AOMDV protocol

Mariam Elansary

Al Salamo Alikom
Dear all,

While I adding malicious node for AOMDV prortocol
and add this line in the tcl file,

*#***malicious*****
*$ns at 1050.0 "[$node(5) set ragent_] malicious"*
*
*
and add this code at the protocol.cc
*
*
*#***malicious*****
*
AOMDV::rt_resolve(Packet *p) {
struct hdr_cmn *ch = HDR_CMN(p);
struct hdr_ip *ih = HDR_IP(p);
msr_rt_entry *rt;
 //***malicious****
// if I am malicious node
if (malicious == true ) {
    drop(p, DROP_RTR_ROUTE_LOOP);
#ifdef DEBUG
    fprintf(stderr, "%s: sending RERR...\n", __FUNCTION__);
#endif
    // DROP_RTR_ROUTE_LOOP is added for no reason.
}
.
.
.
}

AOMDV::command(int argc, const char*const* argv) {
if(argc == 2) {
Tcl& tcl = Tcl::instance();
 if(strncasecmp(argv[1], "id", 2) == 0) {
tcl.resultf("%d", index);
return TCL_OK;
}
//***malicious****
if(strcmp(argv[1], "malicious") == 0) {
    malicious = true;
   return TCL_OK;
}
.
.
}

*

I get this error when I run the simulator

*1050 simulation seconds*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*
*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*.*
*.*
*.*
*
*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*
*
*1060 simulation seconds*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*
*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*.*
*.*
*
*
and the simulation doesn't terminate.

Thanks in advance
Mariam

P.S. the attack only drop the transmitted packet even data or control packet

--
Best regards,

Mariam Ahmed Moustafa

Software Engineer, R&D Department

Integrated Solutions For Ports

Tel: +(203) 4293846/4294632 Extn: 207

Email:  [hidden email]

Web Site: www.isfpegypt.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ERROR] Adding malicious node in AOMDV protocol

Mariam Elansary

NOTE:
when I set the node to be malicious from the start of the simulation
the simulation is terminated but with this error

Direction for pkt-flow not specified; Sending pkt up the stack on default.

1040 simulation seconds
PacketQueue:: remove() couldn't find target


while i replace the line in the tcl with

$ns at 0.0 "[$node(5) set ragent_] malicious"


Mariam Elansary wrote
Al Salamo Alikom
Dear all,

While I adding malicious node for AOMDV prortocol
and add this line in the tcl file,

*#***malicious*****
*$ns at 1050.0 "[$node(5) set ragent_] malicious"*
*
*
and add this code at the protocol.cc
*
*
*#***malicious*****
*
AOMDV::rt_resolve(Packet *p) {
struct hdr_cmn *ch = HDR_CMN(p);
struct hdr_ip *ih = HDR_IP(p);
msr_rt_entry *rt;
 //***malicious****
// if I am malicious node
if (malicious == true ) {
    drop(p, DROP_RTR_ROUTE_LOOP);
#ifdef DEBUG
    fprintf(stderr, "%s: sending RERR...\n", __FUNCTION__);
#endif
    // DROP_RTR_ROUTE_LOOP is added for no reason.
}
.
.
.
}

AOMDV::command(int argc, const char*const* argv) {
if(argc == 2) {
Tcl& tcl = Tcl::instance();
 if(strncasecmp(argv[1], "id", 2) == 0) {
tcl.resultf("%d", index);
return TCL_OK;
}
//***malicious****
if(strcmp(argv[1], "malicious") == 0) {
    malicious = true;
   return TCL_OK;
}
.
.
}

*

I get this error when I run the simulator

*1050 simulation seconds*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*
*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*.*
*.*
*.*
*
*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*
*
*1060 simulation seconds*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*
*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*.*
*.*
*
*
and the simulation doesn't terminate.

Thanks in advance
Mariam

P.S. the attack only drop the transmitted packet even data or control packet

--
Best regards,

Mariam Ahmed Moustafa

Software Engineer, R&D Department

Integrated Solutions For Ports

Tel: +(203) 4293846/4294632 Extn: 207

Email:  mkamal@isfpegypt.com

Web Site: www.isfpegypt.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ERROR] Adding malicious node in AOMDV protocol

prathikantham
In reply to this post by Mariam Elansary
Hi
I am doing the same work on the routing protocol. added a malicious node in aodv protocol in the same palce as you did. i get the same error at simulation. HAve you fixed the bug?????
Please help its really urgent to finish my project .ASAP

Thank you
Mariam Elansary wrote
Al Salamo Alikom
Dear all,

While I adding malicious node for AOMDV prortocol
and add this line in the tcl file,

*#***malicious*****
*$ns at 1050.0 "[$node(5) set ragent_] malicious"*
*
*
and add this code at the protocol.cc
*
*
*#***malicious*****
*
AOMDV::rt_resolve(Packet *p) {
struct hdr_cmn *ch = HDR_CMN(p);
struct hdr_ip *ih = HDR_IP(p);
msr_rt_entry *rt;
 //***malicious****
// if I am malicious node
if (malicious == true ) {
    drop(p, DROP_RTR_ROUTE_LOOP);
#ifdef DEBUG
    fprintf(stderr, "%s: sending RERR...\n", __FUNCTION__);
#endif
    // DROP_RTR_ROUTE_LOOP is added for no reason.
}
.
.
.
}

AOMDV::command(int argc, const char*const* argv) {
if(argc == 2) {
Tcl& tcl = Tcl::instance();
 if(strncasecmp(argv[1], "id", 2) == 0) {
tcl.resultf("%d", index);
return TCL_OK;
}
//***malicious****
if(strcmp(argv[1], "malicious") == 0) {
    malicious = true;
   return TCL_OK;
}
.
.
}

*

I get this error when I run the simulator

*1050 simulation seconds*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*
*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*.*
*.*
*.*
*
*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*
*
*1060 simulation seconds*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*
*
*Direction for pkt-flow not specified; Sending pkt up the stack on default.*
*.*
*.*
*
*
and the simulation doesn't terminate.

Thanks in advance
Mariam

P.S. the attack only drop the transmitted packet even data or control packet

--
Best regards,

Mariam Ahmed Moustafa

Software Engineer, R&D Department

Integrated Solutions For Ports

Tel: +(203) 4293846/4294632 Extn: 207

Email:  mkamal@isfpegypt.com

Web Site: www.isfpegypt.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ERROR] Adding malicious node in AOMDV protocol

venkat100
This post has NOT been accepted by the mailing list yet.
In reply to this post by Mariam Elansary
try adding a return statement

if(malicious==true)
{
drop(p,DROP_RTR_ROUTE_LOOP);
return;  // added return statement
}
It worked for me.
Hope it helps.
Loading...