Help regarding grayhole attack

138 views
Skip to first unread message

nadbo

unread,
Jun 3, 2015, 4:21:37 PM6/3/15
to ns-u...@googlegroups.com
Hi,

I added grayhole  to ns2.35, does anyone have a tcl example for this attack??

Thanks

nadbo

unread,
Jun 7, 2015, 7:10:01 PM6/7/15
to ns-u...@googlegroups.com
Hello,

When i apply grayhole attack patch patch -p0 < grayholeaodv_ns235.patch i get:

patching file ns-2.35/grayholeaodv/grayholeaodv.cc
patching file ns-2.35/grayholeaodv/grayholeaodv.h
patching file ns-2.35/grayholeaodv/grayholeaodv_logs.cc
patching file ns-2.35/grayholeaodv/grayholeaodv_rqueue.cc
patching file ns-2.35/grayholeaodv/grayholeaodv_rqueue.h
patching file ns-2.35/grayholeaodv/grayholeaodv_rtable.cc
patching file ns-2.35/grayholeaodv/grayholeaodv_rtable.h
patching file ns-2.35/grayholeaodv/grayholeaodv.tcl
patching file ns-2.35/Makefile.in
Hunk #1 FAILED at 333.
1 out of 1 hunk FAILED -- saving rejects to file ns-2.35/Makefile.in.rej

Is that normal or is there a problem, can you please help?

knudfl

unread,
Jun 8, 2015, 11:31:47 AM6/8/15
to ns-u...@googlegroups.com
Hi.

The patching for 'Makefile.in' can fail if you already added something else.

The text file  "Makefile.in.rej" is there for you to read what to add to 'Makefile.in'.
And you can also read grayholeaodv_ns235.patch, line 2707, 2708,,, meaning ...
<TAB>grayholeaodv/grayholeaodv.o grayholeaodv/grayholeaodv_logs.o  \
<TAB>grayholeaodv/grayholeaodv_rqueue.o grayholeaodv/grayholeaodv_rtable.o \
.....  so please add those two lines right above "<TAB>@V_STLOBJ@".
( Which is line 336 in a stock ns-2.35/Makefile.in ).

-

nadbo

unread,
Jun 9, 2015, 2:09:31 PM6/9/15
to ns-u...@googlegroups.com
Thank you for the answer, now when i run a tcl file (attached) it gives this error:

 (_o32 cmd line 1)
    invoked from within
"_o32 cmd addr"
    invoked from within
"catch "$self cmd $args" ret"
    invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
    (procedure "_o32" line 2)
    (SplitObject unknown line 2)
    invoked from within
"_o32 addr"
    ("eval" body line 1)
    invoked from within
"eval $node addr $args"
    ("default" arm line 2)
    invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 "$node start-dsr"
}
AODV {
set ragent [$self cre..."
    (procedure "_o3" line 14)
    (Simulator create-wireless-node line 14)
    invoked from within
"_o3 create-wireless-node"
    ("eval" body line 1)
    invoked from within
"eval $self create-wireless-node $args"
    (procedure "_o3" line 23)
    (Simulator node line 23)
    invoked from within
"$ns node"
    invoked from within
"set mnode_(1) [$ns node]"
    (file "grayholeexample.tcl" line 58)


What do you think the problem is??
grayholeexample.tcl

nadbo

unread,
Jun 14, 2015, 4:27:14 PM6/14/15
to ns-u...@googlegroups.com
Hello Sir,

I can run the grayhole simulation now, but the grayhole node doesn't drop any packets!!! what do you think the problem could be?

Best regards
Reply all
Reply to author
Forward
0 new messages