Sie sind auf Seite 1von 2

[Ns-developers] How to emulate selfish node in MANET?

1 of 2

http://mailman.isi.edu/pipermail/ns-developers/2005-Novemb...

[Ns-developers] How to emulate selfish


node in MANET?
Pedro Vale Estrela pedro.estrela at gmail.com
Mon Nov 28 12:38:43 PST 2005
Previous message: [Ns-developers] How to emulate selfish node in MANET?
Next message: [Ns-developers] NS2 help page - new mirror
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

> What I mean selfish is the node keep droping all


> packets forwarded to it.
Data or control packets?

---if its data, I suggest you start by hacking C++ DSR code:
TCL:
- define a new binded variable for identifying the special node(s) that will
be selfish.
- define a default value for it in tcl/lib/ns-default.tcl
- in your script enable the flag of said node
C++
- find the C++ recv() function that consults the DSR routing table
On simple way is to break the execution somewhere in the middle of the
simulation, then proceed until a packet passes at DSR code
- at this point, drop all packets with "free" if the flag is on.
Pedro Vale Estrela
http://inesc-0.tagus.ist.utl.pt/~pmsrve/ns2/

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

-----Original Message----From: ns-developers-bounces at ISI.EDU [mailto:ns-developers-bounces at ISI.EDU]


On Behalf Of yunfeng at uoguelph.ca
Sent: segunda-feira, 28 de Novembro de 2005 19:57
To: ns-developers at ISI.EDU
Subject: [Ns-developers] How to emulate selfish node in MANET?
Hi All,
Does anyone know how to emulate the action of selfish node in MANET with
the
routing protocol of DSR? What I mean selfish is the node keep droping all
packets forwarded to it. I think there are two ways but I do not how to
do.
1. Create a C++ class to do so. But where does this object exist, at
Application

04/26/2013 12:49 PM

[Ns-developers] How to emulate selfish node in MANET?

2 of 2

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

http://mailman.isi.edu/pipermail/ns-developers/2005-Novemb...

level, TCP/UDP or IP layer? I tried to extend DSRAgent to define selfish


class,
in which all the methods just drop packets. In the simulation script, I
set the
routing protocol to DSR, attached the selfish agent to one node, which is
an
intermediate node between a connection. I am sure every necessary file is
modified. But the selfish node did not drop any packet. It seemed that my
codes
were not executed at all.
2. Using Tcl script to control the action of selfish node, i.e., let the
node to
be disable during some period of time. I found some code like this:
$ns_ rtmodal-at 2.0 down $node_(0).
But still, something wrong.
Could you anyone give me some advice or some codes for reference? I really
appreciate.
Yunfeng

Previous message: [Ns-developers] How to emulate selfish node in MANET?


Next message: [Ns-developers] NS2 help page - new mirror
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Ns-developers mailing list

04/26/2013 12:49 PM

Das könnte Ihnen auch gefallen