diff --git a/src/wave/examples/vanet-routing-compare.cc b/src/wave/examples/vanet-routing-compare.cc index 75dde1d74..f98c21e2a 100644 --- a/src/wave/examples/vanet-routing-compare.cc +++ b/src/wave/examples/vanet-routing-compare.cc @@ -261,7 +261,11 @@ RoutingStats::RoutingStats () : m_RxBytes (0), m_cumulativeRxBytes (0), m_RxPkts (0), - m_cumulativeRxPkts (0) + m_cumulativeRxPkts (0), + m_TxBytes (0), + m_cumulativeTxBytes (0), + m_TxPkts (0), + m_cumulativeTxPkts (0) { } @@ -562,6 +566,9 @@ RoutingHelper::SetupRoutingProtocol (NodeContainer & c) switch (m_protocol) { + case 0: + m_protocolName = "NONE"; + break; case 1: if (m_routingTables != 0) { @@ -570,21 +577,13 @@ RoutingHelper::SetupRoutingProtocol (NodeContainer & c) list.Add (olsr, 100); m_protocolName = "OLSR"; break; - case 0: case 2: if (m_routingTables != 0) { aodv.PrintRoutingTableAllAt (rtt, rtw); } list.Add (aodv, 100); - if (m_protocol == 0) - { - m_protocolName = "NONE"; - } - else - { - m_protocolName = "AODV"; - } + m_protocolName = "AODV"; break; case 3: if (m_routingTables != 0) @@ -595,10 +594,12 @@ RoutingHelper::SetupRoutingProtocol (NodeContainer & c) m_protocolName = "DSDV"; break; case 4: + // setup is later m_protocolName = "DSR"; break; default: NS_FATAL_ERROR ("No such protocol:" << m_protocol); + break; } if (m_protocol < 4)