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:  mka...@isfpegypt.com

Web Site: www.isfpegypt.com

Reply via email to