[aodv] dpd moved back into aodv

This commit is contained in:
Pavel Boyko
2009-11-18 12:58:00 +03:00
parent bcd23e4c8b
commit dc002b3e9e
10 changed files with 20 additions and 33 deletions

View File

@@ -20,11 +20,11 @@
* Pavel Boyko <boyko@iitp.ru>
*/
#include "dpd.h"
#include "aodv-dpd.h"
namespace ns3
{
namespace dpd
namespace aodv
{
bool

View File

@@ -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
{

View File

@@ -25,13 +25,13 @@
* Authors: Elena Buchatskaia <borovkovaes@iitp.ru>
* Pavel Boyko <boyko@iitp.ru>
*/
#include "id-cache.h"
#include "aodv-id-cache.h"
#include "ns3/test.h"
#include <algorithm>
namespace ns3
{
namespace dpd
namespace aodv
{
bool
IdCache::IsDuplicate (Ipv4Address addr, uint32_t id)

View File

@@ -35,10 +35,10 @@
namespace ns3
{
namespace dpd
namespace aodv
{
/**
* \ingroup dpd
* \ingroup aodv
*
* \brief Unique packets identification cache used for simple duplicate detection.
*/

View File

@@ -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

View File

@@ -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.

View File

@@ -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',

View File

@@ -1 +0,0 @@
exec "`dirname "$0"`"/../../../../waf "$@"

View File

@@ -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',
]

View File

@@ -33,7 +33,6 @@ all_modules = (
'routing/static-routing',
'routing/list-routing',
'routing/manet/aodv',
'routing/manet/dpd',
'mobility',
'devices/wifi',
'helper',