[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] Unicast and mcast in same simulation
Hi,
I'm currently in the proces of implementing a multicast extension to an adhoc
protocol in ns2. I find the multicast documentation to be, hmm ... "to the
bone :)" ... and would like to get some issues cleared out. Hope someone can
give me some advice (or pointers to) on these.
1) Are there any trouble in running both a unicast and a multicast protocol
in parallel aside eachother in ns2? I can't think why there should be, but to
be sure that there are not some hidden problems there, I ask anyway.
I'm building my multicast extension on the assumption, that I can access
tables maintained by the unicast protocol.
2) Doing a simple unicast simulation, I explicitly new an agent for each node
using "set n0 [$ns node]" or in the wireless scenario, I use the node-config
way to set protocol for all nodes.
BUT: How is this done correctly for mcast nodes in a wireless scenario? I
should think I could just do:
set mproto MYPROTONAME
set mrthandle [$ns mrtproto $mproto]
But this does NOT set it on any node. Doing it explicitly for all nodes
helps, like this:
set mrthandle [$ns mrtproto $mproto $n0]
set mrthandle [$ns mrtproto $mproto $n1]
Why is that. Sholdn't the first two lines be enough?
3) The unicast protocol implementation I'm building upon, is done all in C++.
Doing a new of the protocol agent for a node, starts the implementation in
C++. I fully understand that.
In contrast, as far as I can see, all the multicast implementations contain a
fair amount of OTcl code. Is this because we need to inherit McastProtocol,
and that McastProtocol only exists in OTcl code?
4) Is it neccessary to write a new Classifier when doing an mcast
implementation and why is that?
I cannot see the unicast implementation implementing any classifier.
Hope someone can help me a bit. I keep digging in ns2, and I understand some
as I go along, but I need some guideance to keep on track, and do it "the ns2
way".
Regards, Per Olesen