-1

I have an error while implementing malicious node in ns2 for the AODV routing protocol

$ns at 0.0 "[$node_(0) set ragent_] hacker"

Screenshot is given, please help me to get rid of the error

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

3 Answers3

1

Verify your node creation code. Error message itself very clear.

It seems like, you are not defining it as node_(0).

Karthick Siva
  • 314
  • 2
  • 11
  • I've followed all the instruction according to this link http://karthicksivakrr.blogspot.in/2013/12/adding-malicious-node-to-aodv-ns2.html then it's showing that error. – Shankha Shubhra Das Feb 24 '16 at 07:30
  • @ShankhaShubhraDas there is a possibility that the error is in tcl, where you define nodes for the environment. Go through it, once again. If thats not the case, without looking at your tcl code, i can't help you anymore.. – Karthick Siva Feb 26 '16 at 08:52
  • can you provide your mail id please then I can send you tcl script – Shankha Shubhra Das Mar 11 '16 at 06:26
0

ns at 0.0 "[$node_(0) set ragent_] hacker"

Depends what you have defined in aodv.cc . ( ``hacker´ or `malicious´.)

Example, aodv-malicious_ns235.patch line 8 - 10 :

+if(strcmp(argv[1], "hacker") == 0) {
+malicious = true;
+return TCL_OK;

Malicious INFO http://www.linuxquestions.org/questions/tags/malicious/ , and https://groups.google.com/forum/?fromgroups#!searchin/ns-users/malicious|sort:date/ns-users/meRJq7W0ZkQ/zV3WcZHlAQAJ → → 10/11/14


Knud Larsen
  • 5,753
  • 2
  • 14
  • 19
0

Try this. Use malicious or hacker as you defined.

$ns at 0.0 "[$n1 set ragent_] malicious