Testing in bug 1629 Before changes to AODV andrew@ubuntu:~/repos/ns-3-allinone/ns-3-dev$ ./test.py -s routing-aodv Waf: Entering directory `/home/andrew/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/andrew/repos/ns-3-allinone/ns-3-dev/build' 'build' finished successfully (3.713s) Modules built: antenna aodv applications bridge buildings config-store core csma csma-layout dsdv dsr emu energy fd-net-device flow-monitor internet lte mesh mobility mpi netanim (no Python) network nix-vector-routing olsr point-to-point point-to-point-layout propagation spectrum stats tap-bridge test (no Python) tools topology-read uan virtual-net-device wifi wimax Modules not built (see ns-3 tutorial for explanation): brite click openflow visualizer PASS: TestSuite routing-aodv 1 of 1 tests passed (1 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) andrew@ubuntu:~/repos/ns-3-allinone/ns-3-dev$ hg diff src/aodv/model/aodv-routing-protocol.cc diff -r eb7335c2423c src/aodv/model/aodv-routing-protocol.cc --- a/src/aodv/model/aodv-routing-protocol.cc Sun Apr 14 21:23:56 2013 -0700 +++ b/src/aodv/model/aodv-routing-protocol.cc Fri Apr 19 06:57:26 2013 -0700 @@ -135,7 +135,7 @@ MaxQueueTime (Seconds (30)), DestinationOnly (false), GratuitousReply (true), - EnableHello (true), + EnableHello (false), m_routingTable (DeletePeriod), m_queue (MaxQueueLen, MaxQueueTime), m_requestId (0), @@ -246,7 +246,7 @@ &RoutingProtocol::GetDesinationOnlyFlag), MakeBooleanChecker ()) .AddAttribute ("EnableHello", "Indicates whether a hello messages enable.", - BooleanValue (true), + BooleanValue (false), MakeBooleanAccessor (&RoutingProtocol::SetHelloEnable, &RoutingProtocol::GetHelloEnable), MakeBooleanChecker ()) andrew@ubuntu:~/repos/ns-3-allinone/ns-3-dev$ ./waf --run "scratch/aodv2 --ns3::aodv::RoutingProtocol::EnableHello=false --breakRoute=0 --ns3::V4Ping::Interval=4" > aodv.log 2>&1 ... Creating 10 nodes 100 m apart. Starting simulation for 10 s ... PING 10.0.0.10 56(84) bytes of data. 64 bytes from 10.0.0.10: icmp_seq=0 ttl=56 time=16 ms 64 bytes from 10.0.0.10: icmp_seq=1 ttl=56 time=5 ms 64 bytes from 10.0.0.10: icmp_seq=2 ttl=56 time=8 ms --- 10.0.0.10 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 9999ms rtt min/avg/max/mdev = 5/9.667/16/5.686 ms No RREQ at 8 seconds anymore since there was no callback created for SendRerrWhenBreaksLinkToNextHop which is also the function that invalidates the active route when it's neighbor goes down. Simulation did fine. Lets see if test passes... andrew@ubuntu:~/repos/ns-3-allinone/ns-3-dev$ ./test.py -s routing-aodv Waf: Entering directory `/home/andrew/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/andrew/repos/ns-3-allinone/ns-3-dev/build' 'build' finished successfully (3.349s) Modules built: antenna aodv applications bridge buildings config-store core csma csma-layout dsdv dsr emu energy fd-net-device flow-monitor internet lte mesh mobility mpi netanim (no Python) network nix-vector-routing olsr point-to-point point-to-point-layout propagation spectrum stats tap-bridge test (no Python) tools topology-read uan virtual-net-device wifi wimax Modules not built (see ns-3 tutorial for explanation): brite click openflow visualizer PASS: TestSuite routing-aodv 1 of 1 tests passed (1 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) diff -r eb7335c2423c src/aodv/model/aodv-routing-protocol.cc --- a/src/aodv/model/aodv-routing-protocol.cc Sun Apr 14 21:23:56 2013 -0700 +++ b/src/aodv/model/aodv-routing-protocol.cc Fri Apr 19 07:08:24 2013 -0700 @@ -135,7 +135,7 @@ MaxQueueTime (Seconds (30)), DestinationOnly (false), GratuitousReply (true), - EnableHello (true), + EnableHello (false), m_routingTable (DeletePeriod), m_queue (MaxQueueLen, MaxQueueTime), m_requestId (0), @@ -149,10 +149,7 @@ m_rreqRateLimitTimer (Timer::CANCEL_ON_DESTROY), m_rerrRateLimitTimer (Timer::CANCEL_ON_DESTROY) { - if (EnableHello) - { m_nb.SetCallback (MakeCallback (&RoutingProtocol::SendRerrWhenBreaksLinkToNextHop, this)); - } } TypeId @@ -246,7 +243,7 @@ &RoutingProtocol::GetDesinationOnlyFlag), MakeBooleanChecker ()) .AddAttribute ("EnableHello", "Indicates whether a hello messages enable.", - BooleanValue (true), + BooleanValue (false), MakeBooleanAccessor (&RoutingProtocol::SetHelloEnable, &RoutingProtocol::GetHelloEnable), MakeBooleanChecker ()) andrew@ubuntu:~/repos/ns-3-allinone/ns-3-dev$ ./waf --run "scratch/aodv2 --ns3::aodv::RoutingProtocol::EnableHello=false --breakRoute=0 --ns3::V4Ping::Interval=4" > aodv.log 2>&1 Creating 10 nodes 100 m apart. Starting simulation for 10 s ... PING 10.0.0.10 56(84) bytes of data. 64 bytes from 10.0.0.10: icmp_seq=0 ttl=56 time=16 ms 64 bytes from 10.0.0.10: icmp_seq=1 ttl=56 time=5 ms 64 bytes from 10.0.0.10: icmp_seq=2 ttl=56 time=13 ms --- 10.0.0.10 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 9999ms rtt min/avg/max/mdev = 5/11.33/16/5.686 ms andrew@ubuntu:~/repos/ns-3-allinone/ns-3-dev$ ./test.py -s routing-aodv Waf: Entering directory `/home/andrew/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/andrew/repos/ns-3-allinone/ns-3-dev/build' 'build' finished successfully (3.362s) Modules built: antenna aodv applications bridge buildings config-store core csma csma-layout dsdv dsr emu energy fd-net-device flow-monitor internet lte mesh mobility mpi netanim (no Python) network nix-vector-routing olsr point-to-point point-to-point-layout propagation spectrum stats tap-bridge test (no Python) tools topology-read uan virtual-net-device wifi wimax Modules not built (see ns-3 tutorial for explanation): brite click openflow visualizer PASS: TestSuite routing-aodv 1 of 1 tests passed (1 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) diff -r eb7335c2423c src/aodv/model/aodv-routing-protocol.cc --- a/src/aodv/model/aodv-routing-protocol.cc Sun Apr 14 21:23:56 2013 -0700 +++ b/src/aodv/model/aodv-routing-protocol.cc Fri Apr 19 07:11:08 2013 -0700 @@ -135,7 +135,7 @@ MaxQueueTime (Seconds (30)), DestinationOnly (false), GratuitousReply (true), - EnableHello (true), + EnableHello (false), m_routingTable (DeletePeriod), m_queue (MaxQueueLen, MaxQueueTime), m_requestId (0), @@ -149,10 +149,6 @@ m_rreqRateLimitTimer (Timer::CANCEL_ON_DESTROY), m_rerrRateLimitTimer (Timer::CANCEL_ON_DESTROY) { - if (EnableHello) - { - m_nb.SetCallback (MakeCallback (&RoutingProtocol::SendRerrWhenBreaksLinkToNextHop, this)); - } } TypeId @@ -246,7 +242,7 @@ &RoutingProtocol::GetDesinationOnlyFlag), MakeBooleanChecker ()) .AddAttribute ("EnableHello", "Indicates whether a hello messages enable.", - BooleanValue (true), + BooleanValue (false), MakeBooleanAccessor (&RoutingProtocol::SetHelloEnable, &RoutingProtocol::GetHelloEnable), MakeBooleanChecker ()) @@ -315,6 +311,7 @@ NS_LOG_FUNCTION (this); if (EnableHello) { + m_nb.SetCallback (MakeCallback (&RoutingProtocol::SendRerrWhenBreaksLinkToNextHop, this)); m_nb.ScheduleTimer (); } m_rreqRateLimitTimer.SetFunction (&RoutingProtocol::RreqRateLimitTimerExpire, andrew@ubuntu:~/repos/ns-3-allinone/ns-3-dev$ ./waf --run "scratch/aodv2 --ns3::aodv::RoutingProtocol::EnableHello=false --breakRoute=0 --ns3::V4Ping::Interval=4" > aodv.log 2>&1 Creating 10 nodes 100 m apart. Starting simulation for 10 s ... PING 10.0.0.10 56(84) bytes of data. 64 bytes from 10.0.0.10: icmp_seq=0 ttl=56 time=16 ms 64 bytes from 10.0.0.10: icmp_seq=1 ttl=56 time=5 ms 64 bytes from 10.0.0.10: icmp_seq=2 ttl=56 time=8 ms --- 10.0.0.10 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 9999ms rtt min/avg/max/mdev = 5/9.667/16/5.686 ms andrew@ubuntu:~/repos/ns-3-allinone/ns-3-dev$ ./test.py -s routing-aodv Waf: Entering directory `/home/andrew/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/andrew/repos/ns-3-allinone/ns-3-dev/build' 'build' finished successfully (3.250s) Modules built: antenna aodv applications bridge buildings config-store core csma csma-layout dsdv dsr emu energy fd-net-device flow-monitor internet lte mesh mobility mpi netanim (no Python) network nix-vector-routing olsr point-to-point point-to-point-layout propagation spectrum stats tap-bridge test (no Python) tools topology-read uan virtual-net-device wifi wimax Modules not built (see ns-3 tutorial for explanation): brite click openflow visualizer PASS: TestSuite routing-aodv 1 of 1 tests passed (1 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors)