Hi,
I am trying to simulate a three LAN topology ( A slight variant of the example src/csma/examples/csma-multicast.cc) of where:
-Multicast source is at node n0
-Multicast forwarded by node n2 to LAN1 and n4 to LAN2
-Nodes n0, n1, n2, n3, n4, n5 and n6 receive the multicast frames.
-Node n6 listens for the data
I have not written any extra code other than those required to create
the LANs, nodecontainers and nodes.(I modified csma-multicast.cc) The modified code is attached
herewith.
It would of great help if you could point out the mistake I'm making(frankly, I'm not able to figure out anything wrong)
I tried to run the program, I got the following error.
Waf: Entering directory `/home/gopika/jujo/ns-allinone-3.20/ns-3.20/build'
[1605/1747] cxx: scratch/poj1.cc -> build/scratch/poj1.cc.2.o
[1720/1747] cxxprogram: build/scratch/poj1.cc.2.o -> build/scratch/poj1
Waf: Leaving directory `/home/gopika/jujo/ns-allinone-3.20/ns-3.20/build'
'build' finished successfully (3.146s)
Create nodes.
Build Topology.
Add IP Stack.
Assign IP Addresses.
Configure multicasting.
assert
failed. cond="interface >= 0",
msg="Ipv4StaticRoutingHelper::AddMulticastRoute():Expected an interface
associated with the device nd",
file=../src/internet/helper/ipv4-static-routing-helper.cc, line=106
terminate called without an active exception
Command
['/home/gopika/jujo/ns-allinone-3.20/ns-3.20/build/scratch/poj1']
terminated with signal SIGIOT. Run it under a debugger to get more
information (./waf --run <program> --command-template="gdb --args
%s <args>").
Then I tried to run it under a debugger, when I got the following message :
Waf: Entering directory `/home/gopika/jujo/ns-allinone-3.20/ns-3.20/build'
Waf: Leaving directory `/home/gopika/jujo/ns-allinone-3.20/ns-3.20/build'
'build' finished successfully (1.105s)
.......
Reading symbols from /home/gopika/jujo/ns-allinone-3.20/ns-3.20/build/scratch/poj1...done.
(gdb) run
Starting program: /home/gopika/jujo/ns-allinone-3.20/ns-3.20/build/scratch/poj1 \<args\>
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Create nodes.
Build Topology.
Add IP Stack.
Assign IP Addresses.
Configure multicasting.
assert
failed. cond="interface >= 0",
msg="Ipv4StaticRoutingHelper::AddMulticastRoute():Expected an interface
associated with the device nd",
file=../src/internet/helper/ipv4-static-routing-helper.cc, line=106
terminate called without an active exception
Program received signal SIGABRT, Aborted.
0x00007fffeb850f79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007fffeb850f79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007fffeb854388 in __GI_abort () at abort.c:89
#2 0x00007fffec37a6b5 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007fffec378836 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007fffec378863 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5
0x00007ffff2d4dbb3 in ns3::Ipv4StaticRoutingHelper::AddMulticastRoute
(this=0x7fffffffd3e0, n=..., source=..., group=..., input=...,
output=...)
at ../src/internet/helper/ipv4-static-routing-helper.cc:104
#6 0x000000000040aa3b in main (argc=2, argv=0x7fffffffdca8) at ../scratch/poj1.cc:129
Thanks,
Gopika