diff --git a/src/routing/manet/dpd/dpd.cc b/src/routing/manet/aodv/aodv-dpd.cc similarity index 97% rename from src/routing/manet/dpd/dpd.cc rename to src/routing/manet/aodv/aodv-dpd.cc index b08bba83b..58d8ca898 100644 --- a/src/routing/manet/dpd/dpd.cc +++ b/src/routing/manet/aodv/aodv-dpd.cc @@ -20,11 +20,11 @@ * Pavel Boyko */ -#include "dpd.h" +#include "aodv-dpd.h" namespace ns3 { -namespace dpd +namespace aodv { bool diff --git a/src/routing/manet/dpd/dpd.h b/src/routing/manet/aodv/aodv-dpd.h similarity index 88% rename from src/routing/manet/dpd/dpd.h rename to src/routing/manet/aodv/aodv-dpd.h index 18f070e6f..97722b056 100644 --- a/src/routing/manet/dpd/dpd.h +++ b/src/routing/manet/aodv/aodv-dpd.h @@ -23,19 +23,22 @@ #ifndef DUPLICATEPACKETDETECTION_H_ #define DUPLICATEPACKETDETECTION_H_ -#include "id-cache.h" +#include "aodv-id-cache.h" #include "ns3/nstime.h" #include "ns3/packet.h" #include "ns3/ipv4-header.h" namespace ns3 { -namespace dpd +namespace aodv { /** - * \ingroup dpd + * \ingroup aodv * * \brief Helper class used to remember already seen packets and detect duplicates. + * + * Currently duplicate detection is based on uinique packet ID given by Packet::GetUid () + * This approach is known to be weak and should be changed. */ class DuplicatePacketDetection { diff --git a/src/routing/manet/dpd/id-cache.cc b/src/routing/manet/aodv/aodv-id-cache.cc similarity index 98% rename from src/routing/manet/dpd/id-cache.cc rename to src/routing/manet/aodv/aodv-id-cache.cc index 03376a2c2..4106ad6c5 100644 --- a/src/routing/manet/dpd/id-cache.cc +++ b/src/routing/manet/aodv/aodv-id-cache.cc @@ -25,13 +25,13 @@ * Authors: Elena Buchatskaia * Pavel Boyko */ -#include "id-cache.h" +#include "aodv-id-cache.h" #include "ns3/test.h" #include namespace ns3 { -namespace dpd +namespace aodv { bool IdCache::IsDuplicate (Ipv4Address addr, uint32_t id) diff --git a/src/routing/manet/dpd/id-cache.h b/src/routing/manet/aodv/aodv-id-cache.h similarity index 98% rename from src/routing/manet/dpd/id-cache.h rename to src/routing/manet/aodv/aodv-id-cache.h index ba76b4386..5330af007 100644 --- a/src/routing/manet/dpd/id-cache.h +++ b/src/routing/manet/aodv/aodv-id-cache.h @@ -35,10 +35,10 @@ namespace ns3 { -namespace dpd +namespace aodv { /** - * \ingroup dpd + * \ingroup aodv * * \brief Unique packets identification cache used for simple duplicate detection. */ diff --git a/src/routing/manet/aodv/aodv-routing-protocol.h b/src/routing/manet/aodv/aodv-routing-protocol.h index 07db2c225..28ec4cbb9 100644 --- a/src/routing/manet/aodv/aodv-routing-protocol.h +++ b/src/routing/manet/aodv/aodv-routing-protocol.h @@ -32,8 +32,7 @@ #include "aodv-rqueue.h" #include "aodv-packet.h" #include "aodv-neighbor.h" - -#include "ns3/dpd.h" +#include "aodv-dpd.h" #include "ns3/node.h" #include "ns3/ipv4-routing-protocol.h" #include "ns3/ipv4-interface.h" @@ -139,9 +138,9 @@ private: /// Request sequence number uint32_t m_seqNo; /// Handle duplicated RREQ - dpd::IdCache m_rreqIdCache; + IdCache m_rreqIdCache; /// Handle duplicated broadcast/multicast packets - dpd::DuplicatePacketDetection m_dpd; + DuplicatePacketDetection m_dpd; /// Handle neighbors Neighbors m_nb; /// Number of RREQs used for RREQ rate control diff --git a/src/routing/manet/aodv/aodv.h b/src/routing/manet/aodv/aodv.h index 96587e236..58095d4c8 100644 --- a/src/routing/manet/aodv/aodv.h +++ b/src/routing/manet/aodv/aodv.h @@ -72,7 +72,7 @@ * failure for all retries. This mechanism meant for active links and work much more faster, than first method. * Layer 2 feedback implementation relies on TxErrHeader trace source, currently it is supported in AdhocWifiMac only. * - * 3) Duplicate packet detection. We use special class dpd::DuplicatePacketDetection for this purpose. + * 3) Duplicate packet detection. We use special class DuplicatePacketDetection for this purpose. * * Following optional protocol optimizations aren't implemented: * - Expanding ring search. diff --git a/src/routing/manet/aodv/wscript b/src/routing/manet/aodv/wscript index 201e1c596..7e3d9f851 100644 --- a/src/routing/manet/aodv/wscript +++ b/src/routing/manet/aodv/wscript @@ -4,6 +4,8 @@ def build(bld): module = bld.create_ns3_module('aodv', ['internet-stack', 'contrib']) module.includes = '.' module.source = [ + 'aodv-id-cache.cc', + 'aodv-dpd.cc', 'aodv-rtable.cc', 'aodv-rqueue.cc', 'aodv-packet.cc', @@ -16,6 +18,8 @@ def build(bld): headers = bld.new_task_gen('ns3header') headers.module = 'aodv' headers.source = [ + 'aodv-id-cache.h', + 'aodv-dpd.h', 'aodv-rtable.h', 'aodv-rqueue.h', 'aodv-packet.h', diff --git a/src/routing/manet/dpd/waf b/src/routing/manet/dpd/waf deleted file mode 100755 index 0ca1fc3f4..000000000 --- a/src/routing/manet/dpd/waf +++ /dev/null @@ -1 +0,0 @@ -exec "`dirname "$0"`"/../../../../waf "$@" diff --git a/src/routing/manet/dpd/wscript b/src/routing/manet/dpd/wscript deleted file mode 100644 index 2692d1bc7..000000000 --- a/src/routing/manet/dpd/wscript +++ /dev/null @@ -1,17 +0,0 @@ -## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- - -def build(bld): - module = bld.create_ns3_module('dpd', ['contrib']) - module.includes = '.' - module.source = [ - 'id-cache.cc', - 'dpd.cc' - ] - - headers = bld.new_task_gen('ns3header') - headers.module = 'dpd' - headers.source = [ - 'dpd.h', - 'id-cache.h', - ] - diff --git a/src/wscript b/src/wscript index 30e58fa65..248e54d4c 100644 --- a/src/wscript +++ b/src/wscript @@ -33,7 +33,6 @@ all_modules = ( 'routing/static-routing', 'routing/list-routing', 'routing/manet/aodv', - 'routing/manet/dpd', 'mobility', 'devices/wifi', 'helper',