From e2638f79d971da99452cefb4404b60ff0208ebb2 Mon Sep 17 00:00:00 2001 From: Pavel Boyko Date: Mon, 16 Mar 2009 15:45:37 +0300 Subject: [PATCH] All mesh related filed moved to devices/mesh. Let the refactoring begins! --HG-- rename : src/devices/wifi/dot11s-codes.h => src/devices/mesh/dot11s-codes.h rename : src/devices/wifi/dot11s-parameters.cc => src/devices/mesh/dot11s-parameters.cc rename : src/devices/wifi/dot11s-parameters.h => src/devices/mesh/dot11s-parameters.h rename : src/devices/wifi/dot11s-peer-management-element.cc => src/devices/mesh/dot11s-peer-management-element.cc rename : src/devices/wifi/dot11s-peer-management-element.h => src/devices/mesh/dot11s-peer-management-element.h rename : src/helper/hwmp-helper.cc => src/devices/mesh/hwmp-helper.cc rename : src/helper/hwmp-helper.h => src/devices/mesh/hwmp-helper.h rename : src/devices/l2-routing/l2-routing-hwmp/hwmp-rtable.cc => src/devices/mesh/hwmp-rtable.cc rename : src/devices/l2-routing/l2-routing-hwmp/hwmp-rtable.h => src/devices/mesh/hwmp-rtable.h rename : src/devices/l2-routing/l2-routing-hwmp/hwmp-state.cc => src/devices/mesh/hwmp-state.cc rename : src/devices/l2-routing/l2-routing-hwmp/hwmp-state.h => src/devices/mesh/hwmp-state.h rename : src/devices/l2-routing/l2-routing-hwmp/hwmp.cc => src/devices/mesh/hwmp.cc rename : src/devices/l2-routing/l2-routing-hwmp/hwmp.h => src/devices/mesh/hwmp.h rename : src/devices/l2-routing/l2-routing-main/l2-routing-net-device.cc => src/devices/mesh/l2-routing-net-device.cc rename : src/devices/l2-routing/l2-routing-main/l2-routing-net-device.h => src/devices/mesh/l2-routing-net-device.h rename : src/node/l2-routing-protocol.cc => src/devices/mesh/l2-routing-protocol.cc rename : src/node/l2-routing-protocol.h => src/devices/mesh/l2-routing-protocol.h rename : src/node/mac48-address-comparator.h => src/devices/mesh/mac48-address-comparator.h rename : src/devices/wifi/mesh-configuration-element.cc => src/devices/mesh/mesh-configuration-element.cc rename : src/devices/wifi/mesh-configuration-element.h => src/devices/mesh/mesh-configuration-element.h rename : src/devices/wifi/mesh-mgt-headers.cc => src/devices/mesh/mesh-mgt-headers.cc rename : src/devices/wifi/mesh-mgt-headers.h => src/devices/mesh/mesh-mgt-headers.h rename : src/devices/wifi/mesh-wifi-beacon-timing-element.cc => src/devices/mesh/mesh-wifi-beacon-timing-element.cc rename : src/devices/wifi/mesh-wifi-beacon-timing-element.h => src/devices/mesh/mesh-wifi-beacon-timing-element.h rename : src/helper/mesh-wifi-helper.cc => src/devices/mesh/mesh-wifi-helper.cc rename : src/helper/mesh-wifi-helper.h => src/devices/mesh/mesh-wifi-helper.h rename : src/devices/wifi/mesh-wifi-mac-header.cc => src/devices/mesh/mesh-wifi-mac-header.cc rename : src/devices/wifi/mesh-wifi-mac-header.h => src/devices/mesh/mesh-wifi-mac-header.h rename : src/devices/wifi/mesh-wifi-mac.cc => src/devices/mesh/mesh-wifi-mac.cc rename : src/devices/wifi/mesh-wifi-mac.h => src/devices/mesh/mesh-wifi-mac.h rename : src/devices/wifi/mesh-wifi-peer-manager.cc => src/devices/mesh/mesh-wifi-peer-manager.cc rename : src/devices/wifi/mesh-wifi-peer-manager.h => src/devices/mesh/mesh-wifi-peer-manager.h rename : src/devices/wifi/mesh-wifi-perr-information-element.cc => src/devices/mesh/mesh-wifi-perr-information-element.cc rename : src/devices/wifi/mesh-wifi-perr-information-element.h => src/devices/mesh/mesh-wifi-perr-information-element.h rename : src/devices/wifi/mesh-wifi-prep-information-element.cc => src/devices/mesh/mesh-wifi-prep-information-element.cc rename : src/devices/wifi/mesh-wifi-prep-information-element.h => src/devices/mesh/mesh-wifi-prep-information-element.h rename : src/devices/wifi/mesh-wifi-preq-information-element.cc => src/devices/mesh/mesh-wifi-preq-information-element.cc rename : src/devices/wifi/mesh-wifi-preq-information-element.h => src/devices/mesh/mesh-wifi-preq-information-element.h rename : src/devices/wifi/mesh-wifi-rann-information-element.cc => src/devices/mesh/mesh-wifi-rann-information-element.cc rename : src/devices/wifi/mesh-wifi-rann-information-element.h => src/devices/mesh/mesh-wifi-rann-information-element.h rename : src/devices/wifi/tx-statistics.cc => src/devices/mesh/tx-statistics.cc rename : src/devices/wifi/tx-statistics.h => src/devices/mesh/tx-statistics.h --- examples/mesh.cc | 1 + src/devices/l2-routing/l2-routing-hwmp/waf | 1 - .../l2-routing/l2-routing-hwmp/wscript | 16 ------ src/devices/l2-routing/l2-routing-main/waf | 1 - .../l2-routing/l2-routing-main/wscript | 12 ---- src/devices/{wifi => mesh}/dot11s-codes.h | 0 .../{wifi => mesh}/dot11s-parameters.cc | 0 .../{wifi => mesh}/dot11s-parameters.h | 0 .../dot11s-peer-management-element.cc | 2 +- .../dot11s-peer-management-element.h | 2 +- src/{helper => devices/mesh}/hwmp-helper.cc | 0 src/{helper => devices/mesh}/hwmp-helper.h | 0 .../l2-routing-hwmp => mesh}/hwmp-rtable.cc | 2 +- .../l2-routing-hwmp => mesh}/hwmp-rtable.h | 0 .../l2-routing-hwmp => mesh}/hwmp-state.cc | 4 +- .../l2-routing-hwmp => mesh}/hwmp-state.h | 0 .../l2-routing-hwmp => mesh}/hwmp.cc | 0 .../l2-routing-hwmp => mesh}/hwmp.h | 4 +- .../l2-routing-net-device.cc | 0 .../l2-routing-net-device.h | 0 .../mesh}/l2-routing-protocol.cc | 2 +- .../mesh}/l2-routing-protocol.h | 0 .../mesh}/mac48-address-comparator.h | 0 .../mesh-configuration-element.cc | 2 +- .../mesh-configuration-element.h | 2 +- .../{wifi => mesh}/mesh-mgt-headers.cc | 2 +- src/devices/{wifi => mesh}/mesh-mgt-headers.h | 25 ++++----- .../mesh-wifi-beacon-timing-element.cc | 2 +- .../mesh-wifi-beacon-timing-element.h | 4 +- .../mesh}/mesh-wifi-helper.cc | 2 +- .../mesh}/mesh-wifi-helper.h | 2 +- .../{wifi => mesh}/mesh-wifi-mac-header.cc | 2 +- .../{wifi => mesh}/mesh-wifi-mac-header.h | 0 src/devices/{wifi => mesh}/mesh-wifi-mac.cc | 19 +++---- src/devices/{wifi => mesh}/mesh-wifi-mac.h | 12 ++-- .../{wifi => mesh}/mesh-wifi-peer-manager.cc | 4 +- .../{wifi => mesh}/mesh-wifi-peer-manager.h | 7 ++- .../mesh-wifi-perr-information-element.cc | 2 +- .../mesh-wifi-perr-information-element.h | 2 +- .../mesh-wifi-prep-information-element.cc | 2 +- .../mesh-wifi-prep-information-element.h | 3 +- .../mesh-wifi-preq-information-element.cc | 3 +- .../mesh-wifi-preq-information-element.h | 6 +- .../mesh-wifi-rann-information-element.cc | 2 +- .../mesh-wifi-rann-information-element.h | 4 +- src/devices/{wifi => mesh}/tx-statistics.cc | 0 src/devices/{wifi => mesh}/tx-statistics.h | 3 +- src/devices/mesh/waf | 1 + src/devices/mesh/wscript | 56 +++++++++++++++++++ src/devices/wifi/wscript | 32 ++--------- src/helper/wscript | 4 -- src/node/wscript | 3 - src/wscript | 3 +- 53 files changed, 131 insertions(+), 127 deletions(-) delete mode 100644 src/devices/l2-routing/l2-routing-hwmp/waf delete mode 100644 src/devices/l2-routing/l2-routing-hwmp/wscript delete mode 100644 src/devices/l2-routing/l2-routing-main/waf delete mode 100644 src/devices/l2-routing/l2-routing-main/wscript rename src/devices/{wifi => mesh}/dot11s-codes.h (100%) rename src/devices/{wifi => mesh}/dot11s-parameters.cc (100%) rename src/devices/{wifi => mesh}/dot11s-parameters.h (100%) rename src/devices/{wifi => mesh}/dot11s-peer-management-element.cc (98%) rename src/devices/{wifi => mesh}/dot11s-peer-management-element.h (98%) rename src/{helper => devices/mesh}/hwmp-helper.cc (100%) rename src/{helper => devices/mesh}/hwmp-helper.h (100%) rename src/devices/{l2-routing/l2-routing-hwmp => mesh}/hwmp-rtable.cc (99%) rename src/devices/{l2-routing/l2-routing-hwmp => mesh}/hwmp-rtable.h (100%) rename src/devices/{l2-routing/l2-routing-hwmp => mesh}/hwmp-state.cc (99%) rename src/devices/{l2-routing/l2-routing-hwmp => mesh}/hwmp-state.h (100%) rename src/devices/{l2-routing/l2-routing-hwmp => mesh}/hwmp.cc (100%) rename src/devices/{l2-routing/l2-routing-hwmp => mesh}/hwmp.h (98%) rename src/devices/{l2-routing/l2-routing-main => mesh}/l2-routing-net-device.cc (100%) rename src/devices/{l2-routing/l2-routing-main => mesh}/l2-routing-net-device.h (100%) rename src/{node => devices/mesh}/l2-routing-protocol.cc (97%) rename src/{node => devices/mesh}/l2-routing-protocol.h (100%) rename src/{node => devices/mesh}/mac48-address-comparator.h (100%) rename src/devices/{wifi => mesh}/mesh-configuration-element.cc (98%) rename src/devices/{wifi => mesh}/mesh-configuration-element.h (98%) rename src/devices/{wifi => mesh}/mesh-mgt-headers.cc (99%) rename src/devices/{wifi => mesh}/mesh-mgt-headers.h (87%) rename src/devices/{wifi => mesh}/mesh-wifi-beacon-timing-element.cc (99%) rename src/devices/{wifi => mesh}/mesh-wifi-beacon-timing-element.h (99%) rename src/{helper => devices/mesh}/mesh-wifi-helper.cc (99%) rename src/{helper => devices/mesh}/mesh-wifi-helper.h (99%) rename src/devices/{wifi => mesh}/mesh-wifi-mac-header.cc (99%) rename src/devices/{wifi => mesh}/mesh-wifi-mac-header.h (100%) rename src/devices/{wifi => mesh}/mesh-wifi-mac.cc (99%) rename src/devices/{wifi => mesh}/mesh-wifi-mac.h (98%) rename src/devices/{wifi => mesh}/mesh-wifi-peer-manager.cc (99%) rename src/devices/{wifi => mesh}/mesh-wifi-peer-manager.h (98%) rename src/devices/{wifi => mesh}/mesh-wifi-perr-information-element.cc (98%) rename src/devices/{wifi => mesh}/mesh-wifi-perr-information-element.h (98%) rename src/devices/{wifi => mesh}/mesh-wifi-prep-information-element.cc (98%) rename src/devices/{wifi => mesh}/mesh-wifi-prep-information-element.h (98%) rename src/devices/{wifi => mesh}/mesh-wifi-preq-information-element.cc (99%) rename src/devices/{wifi => mesh}/mesh-wifi-preq-information-element.h (99%) rename src/devices/{wifi => mesh}/mesh-wifi-rann-information-element.cc (98%) rename src/devices/{wifi => mesh}/mesh-wifi-rann-information-element.h (98%) rename src/devices/{wifi => mesh}/tx-statistics.cc (100%) rename src/devices/{wifi => mesh}/tx-statistics.h (98%) create mode 100755 src/devices/mesh/waf create mode 100644 src/devices/mesh/wscript diff --git a/examples/mesh.cc b/examples/mesh.cc index 1a167e4c4..dac4fc7ed 100644 --- a/examples/mesh.cc +++ b/examples/mesh.cc @@ -25,6 +25,7 @@ #include "ns3/helper-module.h" #include "ns3/global-routing-module.h" #include "ns3/wifi-module.h" +#include "ns3/mesh-module.h" #include "ns3/mobility-module.h" using namespace ns3; diff --git a/src/devices/l2-routing/l2-routing-hwmp/waf b/src/devices/l2-routing/l2-routing-hwmp/waf deleted file mode 100644 index 0ca1fc3f4..000000000 --- a/src/devices/l2-routing/l2-routing-hwmp/waf +++ /dev/null @@ -1 +0,0 @@ -exec "`dirname "$0"`"/../../../../waf "$@" diff --git a/src/devices/l2-routing/l2-routing-hwmp/wscript b/src/devices/l2-routing/l2-routing-hwmp/wscript deleted file mode 100644 index a7cc524a1..000000000 --- a/src/devices/l2-routing/l2-routing-hwmp/wscript +++ /dev/null @@ -1,16 +0,0 @@ -## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- - -def build(bld): - obj = bld.create_ns3_module('l2-routing-hwmp', ['node', 'l2-routing-main']) - obj.source = [ - 'hwmp-rtable.cc', - 'hwmp-state.cc', - 'hwmp.cc', - ] - headers = bld.new_task_gen('ns3header') - headers.module = 'l2-routing-hwmp' - headers.source = [ - 'hwmp-rtable.h', - 'hwmp-state.h', - 'hwmp.h', - ] diff --git a/src/devices/l2-routing/l2-routing-main/waf b/src/devices/l2-routing/l2-routing-main/waf deleted file mode 100644 index 0ca1fc3f4..000000000 --- a/src/devices/l2-routing/l2-routing-main/waf +++ /dev/null @@ -1 +0,0 @@ -exec "`dirname "$0"`"/../../../../waf "$@" diff --git a/src/devices/l2-routing/l2-routing-main/wscript b/src/devices/l2-routing/l2-routing-main/wscript deleted file mode 100644 index a6cfbd3ab..000000000 --- a/src/devices/l2-routing/l2-routing-main/wscript +++ /dev/null @@ -1,12 +0,0 @@ -## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- - -def build(bld): - obj = bld.create_ns3_module('l2-routing-main', ['node', 'bridge']) - obj.source = [ - 'l2-routing-net-device.cc', - ] - headers = bld.new_task_gen('ns3header') - headers.module = 'l2-routing-main' - headers.source = [ - 'l2-routing-net-device.h', - ] diff --git a/src/devices/wifi/dot11s-codes.h b/src/devices/mesh/dot11s-codes.h similarity index 100% rename from src/devices/wifi/dot11s-codes.h rename to src/devices/mesh/dot11s-codes.h diff --git a/src/devices/wifi/dot11s-parameters.cc b/src/devices/mesh/dot11s-parameters.cc similarity index 100% rename from src/devices/wifi/dot11s-parameters.cc rename to src/devices/mesh/dot11s-parameters.cc diff --git a/src/devices/wifi/dot11s-parameters.h b/src/devices/mesh/dot11s-parameters.h similarity index 100% rename from src/devices/wifi/dot11s-parameters.h rename to src/devices/mesh/dot11s-parameters.h diff --git a/src/devices/wifi/dot11s-peer-management-element.cc b/src/devices/mesh/dot11s-peer-management-element.cc similarity index 98% rename from src/devices/wifi/dot11s-peer-management-element.cc rename to src/devices/mesh/dot11s-peer-management-element.cc index 3323f777d..d767b4549 100644 --- a/src/devices/wifi/dot11s-peer-management-element.cc +++ b/src/devices/mesh/dot11s-peer-management-element.cc @@ -20,7 +20,7 @@ */ -#include "dot11s-peer-management-element.h" +#include "ns3/dot11s-peer-management-element.h" #include "ns3/assert.h" diff --git a/src/devices/wifi/dot11s-peer-management-element.h b/src/devices/mesh/dot11s-peer-management-element.h similarity index 98% rename from src/devices/wifi/dot11s-peer-management-element.h rename to src/devices/mesh/dot11s-peer-management-element.h index 1165226d1..878540ae1 100644 --- a/src/devices/wifi/dot11s-peer-management-element.h +++ b/src/devices/mesh/dot11s-peer-management-element.h @@ -25,7 +25,7 @@ #include #include "ns3/buffer.h" -#include "dot11s-codes.h" +#include "ns3/dot11s-codes.h" namespace ns3 { /** diff --git a/src/helper/hwmp-helper.cc b/src/devices/mesh/hwmp-helper.cc similarity index 100% rename from src/helper/hwmp-helper.cc rename to src/devices/mesh/hwmp-helper.cc diff --git a/src/helper/hwmp-helper.h b/src/devices/mesh/hwmp-helper.h similarity index 100% rename from src/helper/hwmp-helper.h rename to src/devices/mesh/hwmp-helper.h diff --git a/src/devices/l2-routing/l2-routing-hwmp/hwmp-rtable.cc b/src/devices/mesh/hwmp-rtable.cc similarity index 99% rename from src/devices/l2-routing/l2-routing-hwmp/hwmp-rtable.cc rename to src/devices/mesh/hwmp-rtable.cc index 0217c13ed..a54c1d496 100644 --- a/src/devices/l2-routing/l2-routing-hwmp/hwmp-rtable.cc +++ b/src/devices/mesh/hwmp-rtable.cc @@ -25,7 +25,7 @@ #include "ns3/ptr.h" #include "ns3/log.h" #include "ns3/node.h" -#include "hwmp-rtable.h" +#include "ns3/hwmp-rtable.h" NS_LOG_COMPONENT_DEFINE ("HwmpRtable"); diff --git a/src/devices/l2-routing/l2-routing-hwmp/hwmp-rtable.h b/src/devices/mesh/hwmp-rtable.h similarity index 100% rename from src/devices/l2-routing/l2-routing-hwmp/hwmp-rtable.h rename to src/devices/mesh/hwmp-rtable.h diff --git a/src/devices/l2-routing/l2-routing-hwmp/hwmp-state.cc b/src/devices/mesh/hwmp-state.cc similarity index 99% rename from src/devices/l2-routing/l2-routing-hwmp/hwmp-state.cc rename to src/devices/mesh/hwmp-state.cc index d6dbbe07e..89afc518d 100644 --- a/src/devices/l2-routing/l2-routing-hwmp/hwmp-state.cc +++ b/src/devices/mesh/hwmp-state.cc @@ -19,12 +19,12 @@ */ -#include "hwmp-state.h" +#include "ns3/hwmp-state.h" #include "ns3/simulator.h" #include "ns3/nstime.h" #include "ns3/log.h" -namespace ns3 { +namespace ns3 { NS_LOG_COMPONENT_DEFINE ("HwmpState"); TypeId diff --git a/src/devices/l2-routing/l2-routing-hwmp/hwmp-state.h b/src/devices/mesh/hwmp-state.h similarity index 100% rename from src/devices/l2-routing/l2-routing-hwmp/hwmp-state.h rename to src/devices/mesh/hwmp-state.h diff --git a/src/devices/l2-routing/l2-routing-hwmp/hwmp.cc b/src/devices/mesh/hwmp.cc similarity index 100% rename from src/devices/l2-routing/l2-routing-hwmp/hwmp.cc rename to src/devices/mesh/hwmp.cc diff --git a/src/devices/l2-routing/l2-routing-hwmp/hwmp.h b/src/devices/mesh/hwmp.h similarity index 98% rename from src/devices/l2-routing/l2-routing-hwmp/hwmp.h rename to src/devices/mesh/hwmp.h index be12fc7c7..0ee3291d5 100644 --- a/src/devices/l2-routing/l2-routing-hwmp/hwmp.h +++ b/src/devices/mesh/hwmp.h @@ -31,7 +31,7 @@ #include "ns3/l2-routing-protocol.h" #include "ns3/packet.h" #include "ns3/ptr.h" -#include "hwmp-state.h" +#include "ns3/hwmp-state.h" namespace ns3 { class HwmpState; /** @@ -254,7 +254,7 @@ private: * \attention mesh seqno is processed at HWMP */ uint32_t m_seqno; - std::map + std::map m_seqnoDatabase; //Timers: /** diff --git a/src/devices/l2-routing/l2-routing-main/l2-routing-net-device.cc b/src/devices/mesh/l2-routing-net-device.cc similarity index 100% rename from src/devices/l2-routing/l2-routing-main/l2-routing-net-device.cc rename to src/devices/mesh/l2-routing-net-device.cc diff --git a/src/devices/l2-routing/l2-routing-main/l2-routing-net-device.h b/src/devices/mesh/l2-routing-net-device.h similarity index 100% rename from src/devices/l2-routing/l2-routing-main/l2-routing-net-device.h rename to src/devices/mesh/l2-routing-net-device.h diff --git a/src/node/l2-routing-protocol.cc b/src/devices/mesh/l2-routing-protocol.cc similarity index 97% rename from src/node/l2-routing-protocol.cc rename to src/devices/mesh/l2-routing-protocol.cc index 21446a3ac..1344e3155 100644 --- a/src/node/l2-routing-protocol.cc +++ b/src/devices/mesh/l2-routing-protocol.cc @@ -21,7 +21,7 @@ #include "ns3/object.h" #include "ns3/log.h" -#include "l2-routing-protocol.h" +#include "ns3/l2-routing-protocol.h" NS_LOG_COMPONENT_DEFINE ("L2RoutingProtocol"); diff --git a/src/node/l2-routing-protocol.h b/src/devices/mesh/l2-routing-protocol.h similarity index 100% rename from src/node/l2-routing-protocol.h rename to src/devices/mesh/l2-routing-protocol.h diff --git a/src/node/mac48-address-comparator.h b/src/devices/mesh/mac48-address-comparator.h similarity index 100% rename from src/node/mac48-address-comparator.h rename to src/devices/mesh/mac48-address-comparator.h diff --git a/src/devices/wifi/mesh-configuration-element.cc b/src/devices/mesh/mesh-configuration-element.cc similarity index 98% rename from src/devices/wifi/mesh-configuration-element.cc rename to src/devices/mesh/mesh-configuration-element.cc index 06c225671..e43d4b1f5 100644 --- a/src/devices/wifi/mesh-configuration-element.cc +++ b/src/devices/mesh/mesh-configuration-element.cc @@ -20,7 +20,7 @@ */ -#include "mesh-configuration-element.h" +#include "ns3/mesh-configuration-element.h" #include "ns3/assert.h" //NS_LOG_COMPONENT_DEFINE ("MeshConfigurationElement"); diff --git a/src/devices/wifi/mesh-configuration-element.h b/src/devices/mesh/mesh-configuration-element.h similarity index 98% rename from src/devices/wifi/mesh-configuration-element.h rename to src/devices/mesh/mesh-configuration-element.h index 32b61d120..78856de76 100644 --- a/src/devices/wifi/mesh-configuration-element.h +++ b/src/devices/mesh/mesh-configuration-element.h @@ -25,7 +25,7 @@ #include #include "ns3/buffer.h" -#include "dot11s-codes.h" +#include "ns3/dot11s-codes.h" namespace ns3 { /** diff --git a/src/devices/wifi/mesh-mgt-headers.cc b/src/devices/mesh/mesh-mgt-headers.cc similarity index 99% rename from src/devices/wifi/mesh-mgt-headers.cc rename to src/devices/mesh/mesh-mgt-headers.cc index 12981c1f8..086c01fec 100644 --- a/src/devices/wifi/mesh-mgt-headers.cc +++ b/src/devices/mesh/mesh-mgt-headers.cc @@ -20,7 +20,7 @@ */ -#include "mesh-mgt-headers.h" +#include "ns3/mesh-mgt-headers.h" #include "ns3/address-utils.h" #include "ns3/simulator.h" #include "ns3/assert.h" diff --git a/src/devices/wifi/mesh-mgt-headers.h b/src/devices/mesh/mesh-mgt-headers.h similarity index 87% rename from src/devices/wifi/mesh-mgt-headers.h rename to src/devices/mesh/mesh-mgt-headers.h index fd93f6879..3034803a5 100644 --- a/src/devices/wifi/mesh-mgt-headers.h +++ b/src/devices/mesh/mesh-mgt-headers.h @@ -26,19 +26,18 @@ #include #include "ns3/header.h" -#include "status-code.h" -#include "dot11s-peer-management-element.h" -#include "supported-rates.h" -#include "mesh-configuration-element.h" -#include "mesh-wifi-preq-information-element.h" -#include "mesh-wifi-prep-information-element.h" -#include "mesh-wifi-perr-information-element.h" -#include "mesh-wifi-rann-information-element.h" -#include "mesh-configuration-element.h" -#include "mesh-wifi-beacon-timing-element.h" -#include "mgt-headers.h" - -#include "ssid.h" +#include "ns3/status-code.h" +#include "ns3/dot11s-peer-management-element.h" +#include "ns3/supported-rates.h" +#include "ns3/mesh-configuration-element.h" +#include "ns3/mesh-wifi-preq-information-element.h" +#include "ns3/mesh-wifi-prep-information-element.h" +#include "ns3/mesh-wifi-perr-information-element.h" +#include "ns3/mesh-wifi-rann-information-element.h" +#include "ns3/mesh-configuration-element.h" +#include "ns3/mesh-wifi-beacon-timing-element.h" +#include "ns3/mgt-headers.h" +#include "ns3/ssid.h" namespace ns3 { /** diff --git a/src/devices/wifi/mesh-wifi-beacon-timing-element.cc b/src/devices/mesh/mesh-wifi-beacon-timing-element.cc similarity index 99% rename from src/devices/wifi/mesh-wifi-beacon-timing-element.cc rename to src/devices/mesh/mesh-wifi-beacon-timing-element.cc index de3a87d44..e1d3f584a 100644 --- a/src/devices/wifi/mesh-wifi-beacon-timing-element.cc +++ b/src/devices/mesh/mesh-wifi-beacon-timing-element.cc @@ -19,7 +19,7 @@ */ -#include "mesh-wifi-beacon-timing-element.h" +#include "ns3/mesh-wifi-beacon-timing-element.h" namespace ns3 { /******************************************* * WifiBeaconTimingElementUnit diff --git a/src/devices/wifi/mesh-wifi-beacon-timing-element.h b/src/devices/mesh/mesh-wifi-beacon-timing-element.h similarity index 99% rename from src/devices/wifi/mesh-wifi-beacon-timing-element.h rename to src/devices/mesh/mesh-wifi-beacon-timing-element.h index 2f66b9d30..0a8e9ed7a 100644 --- a/src/devices/wifi/mesh-wifi-beacon-timing-element.h +++ b/src/devices/mesh/mesh-wifi-beacon-timing-element.h @@ -23,10 +23,10 @@ #define WIFI_TIMING_ELEMENT_H #include +#include #include "ns3/buffer.h" #include "ns3/nstime.h" -#include -#include "dot11s-codes.h" +#include "ns3/dot11s-codes.h" namespace ns3 { /** * \ingroup mesh diff --git a/src/helper/mesh-wifi-helper.cc b/src/devices/mesh/mesh-wifi-helper.cc similarity index 99% rename from src/helper/mesh-wifi-helper.cc rename to src/devices/mesh/mesh-wifi-helper.cc index c86eefaf5..b7f3f1cfc 100644 --- a/src/helper/mesh-wifi-helper.cc +++ b/src/devices/mesh/mesh-wifi-helper.cc @@ -19,7 +19,7 @@ */ -#include "mesh-wifi-helper.h" +#include "ns3/mesh-wifi-helper.h" #include "ns3/wifi-net-device.h" #include "ns3/wifi-mac.h" #include "ns3/wifi-phy.h" diff --git a/src/helper/mesh-wifi-helper.h b/src/devices/mesh/mesh-wifi-helper.h similarity index 99% rename from src/helper/mesh-wifi-helper.h rename to src/devices/mesh/mesh-wifi-helper.h index e4c2fa94f..4b27fb322 100644 --- a/src/helper/mesh-wifi-helper.h +++ b/src/devices/mesh/mesh-wifi-helper.h @@ -27,7 +27,7 @@ #include "ns3/mesh-wifi-mac.h" #include "ns3/wifi-channel.h" #include "ns3/mesh-wifi-peer-manager.h" -#include "wifi-helper.h" +#include "ns3/wifi-helper.h" namespace ns3 { class WifiChannel; diff --git a/src/devices/wifi/mesh-wifi-mac-header.cc b/src/devices/mesh/mesh-wifi-mac-header.cc similarity index 99% rename from src/devices/wifi/mesh-wifi-mac-header.cc rename to src/devices/mesh/mesh-wifi-mac-header.cc index b1f106165..7603d1e5a 100644 --- a/src/devices/wifi/mesh-wifi-mac-header.cc +++ b/src/devices/mesh/mesh-wifi-mac-header.cc @@ -21,7 +21,7 @@ #include "ns3/assert.h" #include "ns3/address-utils.h" -#include "mesh-wifi-mac-header.h" +#include "ns3/mesh-wifi-mac-header.h" namespace ns3 { diff --git a/src/devices/wifi/mesh-wifi-mac-header.h b/src/devices/mesh/mesh-wifi-mac-header.h similarity index 100% rename from src/devices/wifi/mesh-wifi-mac-header.h rename to src/devices/mesh/mesh-wifi-mac-header.h diff --git a/src/devices/wifi/mesh-wifi-mac.cc b/src/devices/mesh/mesh-wifi-mac.cc similarity index 99% rename from src/devices/wifi/mesh-wifi-mac.cc rename to src/devices/mesh/mesh-wifi-mac.cc index b0e08be4c..d44780479 100644 --- a/src/devices/wifi/mesh-wifi-mac.cc +++ b/src/devices/mesh/mesh-wifi-mac.cc @@ -24,16 +24,15 @@ #include "ns3/simulator.h" #include "ns3/node.h" #include "ns3/random-variable.h" - -#include "mesh-wifi-mac.h" -#include "dca-txop.h" -#include "wifi-mac-header.h" -#include "mesh-wifi-mac-header.h" -#include "mgt-headers.h" -#include "wifi-phy.h" -#include "dcf-manager.h" -#include "mac-rx-middle.h" -#include "mac-low.h" +#include "ns3/mesh-wifi-mac.h" +#include "ns3/dca-txop.h" +#include "ns3/wifi-mac-header.h" +#include "ns3/mesh-wifi-mac-header.h" +#include "ns3/mgt-headers.h" +#include "ns3/wifi-phy.h" +#include "ns3/dcf-manager.h" +#include "ns3/mac-rx-middle.h" +#include "ns3/mac-low.h" #include "ns3/tx-statistics.h" #include "ns3/hwmp.h" diff --git a/src/devices/wifi/mesh-wifi-mac.h b/src/devices/mesh/mesh-wifi-mac.h similarity index 98% rename from src/devices/wifi/mesh-wifi-mac.h rename to src/devices/mesh/mesh-wifi-mac.h index 164b72217..5f57b061b 100644 --- a/src/devices/wifi/mesh-wifi-mac.h +++ b/src/devices/mesh/mesh-wifi-mac.h @@ -26,15 +26,15 @@ #include #include "ns3/mac48-address.h" #include "ns3/mac48-address-comparator.h" -#include "mgt-headers.h" -#include "mesh-mgt-headers.h" +#include "ns3/mgt-headers.h" +#include "ns3/mesh-mgt-headers.h" #include "ns3/callback.h" #include "ns3/packet.h" #include "ns3/nstime.h" -#include "mesh-wifi-beacon-timing-element.h" -#include "wifi-remote-station-manager.h" -#include "mesh-wifi-peer-manager.h" -#include "wifi-mac.h" +#include "ns3/mesh-wifi-beacon-timing-element.h" +#include "ns3/wifi-remote-station-manager.h" +#include "ns3/mesh-wifi-peer-manager.h" +#include "ns3/wifi-mac.h" namespace ns3 { diff --git a/src/devices/wifi/mesh-wifi-peer-manager.cc b/src/devices/mesh/mesh-wifi-peer-manager.cc similarity index 99% rename from src/devices/wifi/mesh-wifi-peer-manager.cc rename to src/devices/mesh/mesh-wifi-peer-manager.cc index 6894190e0..94e401954 100644 --- a/src/devices/wifi/mesh-wifi-peer-manager.cc +++ b/src/devices/mesh/mesh-wifi-peer-manager.cc @@ -20,8 +20,8 @@ */ -#include "mesh-wifi-peer-manager.h" -#include "dot11s-parameters.h" +#include "ns3/mesh-wifi-peer-manager.h" +#include "ns3/dot11s-parameters.h" #include "ns3/simulator.h" #include "ns3/assert.h" #include "ns3/log.h" diff --git a/src/devices/wifi/mesh-wifi-peer-manager.h b/src/devices/mesh/mesh-wifi-peer-manager.h similarity index 98% rename from src/devices/wifi/mesh-wifi-peer-manager.h rename to src/devices/mesh/mesh-wifi-peer-manager.h index 46e40a7fa..7dcfdcdd8 100644 --- a/src/devices/wifi/mesh-wifi-peer-manager.h +++ b/src/devices/mesh/mesh-wifi-peer-manager.h @@ -29,9 +29,10 @@ #include "ns3/mac48-address.h" #include "ns3/uinteger.h" #include "ns3/wifi-net-device.h" -#include "dot11s-peer-management-element.h" -#include "mesh-wifi-beacon-timing-element.h" -#include "mesh-wifi-mac.h" +#include "ns3/dot11s-peer-management-element.h" +#include "ns3/mesh-wifi-beacon-timing-element.h" +#include "ns3/mesh-wifi-mac.h" + #include namespace ns3 { diff --git a/src/devices/wifi/mesh-wifi-perr-information-element.cc b/src/devices/mesh/mesh-wifi-perr-information-element.cc similarity index 98% rename from src/devices/wifi/mesh-wifi-perr-information-element.cc rename to src/devices/mesh/mesh-wifi-perr-information-element.cc index 8ecdfb43b..6bfb3303a 100644 --- a/src/devices/wifi/mesh-wifi-perr-information-element.cc +++ b/src/devices/mesh/mesh-wifi-perr-information-element.cc @@ -19,7 +19,7 @@ */ -#include "mesh-wifi-perr-information-element.h" +#include "ns3/mesh-wifi-perr-information-element.h" #include "ns3/address-utils.h" namespace ns3 { diff --git a/src/devices/wifi/mesh-wifi-perr-information-element.h b/src/devices/mesh/mesh-wifi-perr-information-element.h similarity index 98% rename from src/devices/wifi/mesh-wifi-perr-information-element.h rename to src/devices/mesh/mesh-wifi-perr-information-element.h index 731ce8060..174253ee5 100644 --- a/src/devices/wifi/mesh-wifi-perr-information-element.h +++ b/src/devices/mesh/mesh-wifi-perr-information-element.h @@ -28,7 +28,7 @@ #include "ns3/mac48-address.h" #include "ns3/hwmp-rtable.h" #include "ns3/header.h" -#include "dot11s-codes.h" +#include "ns3/dot11s-codes.h" namespace ns3 { /** diff --git a/src/devices/wifi/mesh-wifi-prep-information-element.cc b/src/devices/mesh/mesh-wifi-prep-information-element.cc similarity index 98% rename from src/devices/wifi/mesh-wifi-prep-information-element.cc rename to src/devices/mesh/mesh-wifi-prep-information-element.cc index 9d9352f9a..2b083de26 100644 --- a/src/devices/wifi/mesh-wifi-prep-information-element.cc +++ b/src/devices/mesh/mesh-wifi-prep-information-element.cc @@ -19,7 +19,7 @@ */ -#include "mesh-wifi-prep-information-element.h" +#include "ns3/mesh-wifi-prep-information-element.h" #include "ns3/address-utils.h" #include "ns3/assert.h" namespace ns3 { diff --git a/src/devices/wifi/mesh-wifi-prep-information-element.h b/src/devices/mesh/mesh-wifi-prep-information-element.h similarity index 98% rename from src/devices/wifi/mesh-wifi-prep-information-element.h rename to src/devices/mesh/mesh-wifi-prep-information-element.h index 158e2d2ea..cbb8fe636 100644 --- a/src/devices/wifi/mesh-wifi-prep-information-element.h +++ b/src/devices/mesh/mesh-wifi-prep-information-element.h @@ -28,7 +28,8 @@ #include "ns3/buffer.h" #include "ns3/mac48-address.h" #include "ns3/header.h" -#include "dot11s-codes.h" +#include "ns3/dot11s-codes.h" + namespace ns3 { /** * \ingroup mesh diff --git a/src/devices/wifi/mesh-wifi-preq-information-element.cc b/src/devices/mesh/mesh-wifi-preq-information-element.cc similarity index 99% rename from src/devices/wifi/mesh-wifi-preq-information-element.cc rename to src/devices/mesh/mesh-wifi-preq-information-element.cc index 1ffc69c17..9ca1b9c9d 100644 --- a/src/devices/wifi/mesh-wifi-preq-information-element.cc +++ b/src/devices/mesh/mesh-wifi-preq-information-element.cc @@ -19,9 +19,10 @@ */ -#include "mesh-wifi-preq-information-element.h" +#include "ns3/mesh-wifi-preq-information-element.h" #include "ns3/address-utils.h" #include "ns3/assert.h" + namespace ns3 { /************************* * DestinationAddressUnit diff --git a/src/devices/wifi/mesh-wifi-preq-information-element.h b/src/devices/mesh/mesh-wifi-preq-information-element.h similarity index 99% rename from src/devices/wifi/mesh-wifi-preq-information-element.h rename to src/devices/mesh/mesh-wifi-preq-information-element.h index 7bd3efc16..f668b51d7 100644 --- a/src/devices/wifi/mesh-wifi-preq-information-element.h +++ b/src/devices/mesh/mesh-wifi-preq-information-element.h @@ -23,12 +23,14 @@ #define WIFI_PREQ_INFORMATION_ELEMENT_H #include +#include + #include "ns3/node.h" #include "ns3/buffer.h" #include "ns3/mac48-address.h" #include "ns3/header.h" -#include -#include "dot11s-codes.h" +#include "ns3/dot11s-codes.h" + namespace ns3 { /** * \ingroup mesh diff --git a/src/devices/wifi/mesh-wifi-rann-information-element.cc b/src/devices/mesh/mesh-wifi-rann-information-element.cc similarity index 98% rename from src/devices/wifi/mesh-wifi-rann-information-element.cc rename to src/devices/mesh/mesh-wifi-rann-information-element.cc index a3d25cfd0..6f15df73a 100644 --- a/src/devices/wifi/mesh-wifi-rann-information-element.cc +++ b/src/devices/mesh/mesh-wifi-rann-information-element.cc @@ -19,7 +19,7 @@ */ -#include "mesh-wifi-rann-information-element.h" +#include "ns3/mesh-wifi-rann-information-element.h" #include "ns3/assert.h" #include "ns3/address-utils.h" diff --git a/src/devices/wifi/mesh-wifi-rann-information-element.h b/src/devices/mesh/mesh-wifi-rann-information-element.h similarity index 98% rename from src/devices/wifi/mesh-wifi-rann-information-element.h rename to src/devices/mesh/mesh-wifi-rann-information-element.h index 71b555adc..5ed996373 100644 --- a/src/devices/wifi/mesh-wifi-rann-information-element.h +++ b/src/devices/mesh/mesh-wifi-rann-information-element.h @@ -22,13 +22,13 @@ #ifndef RANN_INFORMATION_ELEMENT_H #define RANN_INFORMATION_ELEMENT_H - #include + #include "ns3/buffer.h" #include "ns3/mac48-address.h" #include "ns3/node.h" #include "ns3/header.h" -#include "dot11s-codes.h" +#include "ns3/dot11s-codes.h" namespace ns3 { /** diff --git a/src/devices/wifi/tx-statistics.cc b/src/devices/mesh/tx-statistics.cc similarity index 100% rename from src/devices/wifi/tx-statistics.cc rename to src/devices/mesh/tx-statistics.cc diff --git a/src/devices/wifi/tx-statistics.h b/src/devices/mesh/tx-statistics.h similarity index 98% rename from src/devices/wifi/tx-statistics.h rename to src/devices/mesh/tx-statistics.h index 9fb1a1daa..c11dc2cfc 100644 --- a/src/devices/wifi/tx-statistics.h +++ b/src/devices/mesh/tx-statistics.h @@ -24,11 +24,12 @@ #include #include + #include "ns3/mac48-address.h" #include "ns3/packet.h" #include "ns3/object.h" #include "ns3/traced-value.h" -#include "wifi-mode.h" +#include "ns3/wifi-mode.h" namespace ns3 { class WifiTxStatistics : public Object diff --git a/src/devices/mesh/waf b/src/devices/mesh/waf new file mode 100755 index 000000000..4283ec141 --- /dev/null +++ b/src/devices/mesh/waf @@ -0,0 +1 @@ +exec "`dirname "$0"`"/../../../waf "$@" diff --git a/src/devices/mesh/wscript b/src/devices/mesh/wscript new file mode 100644 index 000000000..294bd58b0 --- /dev/null +++ b/src/devices/mesh/wscript @@ -0,0 +1,56 @@ +## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- + +def build(bld): + obj = bld.create_ns3_module('mesh', ['wifi']) + obj.source = [ + 'mesh-wifi-helper.cc', + 'mesh-wifi-mac-header.cc', + 'mesh-wifi-peer-manager.cc', + 'tx-statistics.cc', + 'hwmp-helper.cc', + 'l2-routing-protocol.cc', + 'mesh-wifi-beacon-timing-element.cc', + 'hwmp-rtable.cc', + 'l2-routing-net-device.cc', + 'dot11s-parameters.cc', + 'mesh-wifi-perr-information-element.cc', + 'hwmp.cc', + 'mesh-wifi-prep-information-element.cc', + 'mesh-wifi-mac.cc', + 'hwmp-state.cc', + 'mesh-configuration-element.cc', + 'dot11s-peer-management-element.cc', + 'mesh-mgt-headers.cc', + 'mesh-wifi-rann-information-element.cc', + 'mesh-wifi-preq-information-element.cc', + ] + headers = bld.new_task_gen('ns3header') + headers.module = 'mesh' + headers.source = [ + 'l2-routing-protocol.h', + 'dot11s-codes.h', + 'mesh-wifi-rann-information-element.h', + 'l2-routing-net-device.h', + 'hwmp-state.h', + 'mesh-wifi-beacon-timing-element.h', + 'dot11s-parameters.h', + 'mesh-mgt-headers.h', + 'hwmp.h', + 'tx-statistics.h', + 'dot11s-peer-management-element.h', + 'hwmp-helper.h', + 'mac48-address-comparator.h', + 'mesh-wifi-preq-information-element.h', + 'hwmp-rtable.h', + 'mesh-wifi-peer-manager.h', + 'mesh-wifi-mac-header.h', + 'mesh-wifi-mac.h', + 'mesh-configuration-element.h', + 'mesh-wifi-perr-information-element.h', + 'mesh-wifi-helper.h', + 'mesh-wifi-prep-information-element.h', + ] + +# obj = bld.create_ns3_program('wifi-phy-test', +# ['core', 'simulator', 'mobility', 'node', 'wifi']) +# obj.source = 'wifi-phy-test.cc' diff --git a/src/devices/wifi/wscript b/src/devices/wifi/wscript index b6b04248f..2cccde6cd 100644 --- a/src/devices/wifi/wscript +++ b/src/devices/wifi/wscript @@ -3,7 +3,6 @@ def build(bld): obj = bld.create_ns3_module('wifi', ['node']) obj.source = [ - 'tx-statistics.cc', 'propagation-delay-model.cc', 'propagation-loss-model.cc', 'jakes-propagation-loss-model.cc', @@ -18,7 +17,6 @@ def build(bld): 'yans-wifi-phy.cc', 'yans-wifi-channel.cc', 'wifi-mac-header.cc', - 'mesh-wifi-mac-header.cc', 'wifi-mac-trailer.cc', 'mac-low.cc', 'wifi-mac-queue.cc', @@ -37,16 +35,6 @@ def build(bld): 'adhoc-wifi-mac.cc', 'nqap-wifi-mac.cc', 'nqsta-wifi-mac.cc', - 'mesh-wifi-mac.cc', - 'mesh-configuration-element.cc', - 'mesh-wifi-beacon-timing-element.cc', - 'dot11s-peer-management-element.cc', - 'mesh-mgt-headers.cc', - 'mesh-wifi-peer-manager.cc', - 'mesh-wifi-rann-information-element.cc', - 'mesh-wifi-preq-information-element.cc', - 'mesh-wifi-perr-information-element.cc', - 'mesh-wifi-prep-information-element.cc', 'wifi-net-device.cc', 'arf-wifi-manager.cc', 'aarf-wifi-manager.cc', @@ -56,12 +44,10 @@ def build(bld): 'rraa-wifi-manager.cc', 'constant-rate-wifi-manager.cc', 'wifi-test.cc', - 'dot11s-parameters.cc', ] headers = bld.new_task_gen('ns3header') headers.module = 'wifi' headers.source = [ - 'tx-statistics.h', 'propagation-delay-model.h', 'propagation-loss-model.h', 'jakes-propagation-loss-model.h', @@ -87,25 +73,19 @@ def build(bld): 'adhoc-wifi-mac.h', 'nqsta-wifi-mac.h', 'nqap-wifi-mac.h', - 'mesh-wifi-mac.h', 'wifi-phy.h', 'supported-rates.h', 'mgt-headers.h', 'status-code.h', 'capability-information.h', - 'mesh-configuration-element.h', - 'mesh-wifi-beacon-timing-element.h', - 'dot11s-peer-management-element.h', - 'mesh-mgt-headers.h', - 'mesh-wifi-peer-manager.h', - 'mesh-wifi-rann-information-element.h', - 'mesh-wifi-preq-information-element.h', - 'mesh-wifi-perr-information-element.h', - 'mesh-wifi-prep-information-element.h', 'error-rate-model.h', 'yans-error-rate-model.h', - 'dot11s-codes.h', - 'dot11s-parameters.h', +# Need this for module devices/mesh + 'dca-txop.h', + 'wifi-mac-header.h', + 'dcf-manager.h', + 'mac-rx-middle.h', + 'mac-low.h', ] obj = bld.create_ns3_program('wifi-phy-test', diff --git a/src/helper/wscript b/src/helper/wscript index 3bb9616a9..79fe4abe5 100644 --- a/src/helper/wscript +++ b/src/helper/wscript @@ -23,8 +23,6 @@ def build(bld): 'bridge-helper.cc', 'yans-wifi-helper.cc', 'v4ping-helper.cc', - 'mesh-wifi-helper.cc', - 'hwmp-helper.cc', ] headers = bld.new_task_gen('ns3header') @@ -50,8 +48,6 @@ def build(bld): 'bridge-helper.h', 'yans-wifi-helper.h', 'v4ping-helper.h', - 'mesh-wifi-helper.h', - 'hwmp-helper.h', ] env = bld.env_of_name('default') diff --git a/src/node/wscript b/src/node/wscript index efeaa5045..cf318b0f2 100644 --- a/src/node/wscript +++ b/src/node/wscript @@ -38,14 +38,12 @@ def build(bld): 'ipv6-address.cc', 'ipv6-header.cc', 'ipv4-raw-socket-factory.cc', - 'l2-routing-protocol.cc', ] headers = bld.new_task_gen('ns3header') headers.module = 'node' headers.source = [ 'address.h', - 'mac48-address-comparator.h', 'mac48-address.h', 'mac64-address.h', 'inet-socket-address.h', @@ -79,5 +77,4 @@ def build(bld): 'ipv6-address.h', 'ipv6-header.h', 'ipv4-raw-socket-factory.h', - 'l2-routing-protocol.h', ] diff --git a/src/wscript b/src/wscript index 694bbdb6c..afa71f196 100644 --- a/src/wscript +++ b/src/wscript @@ -34,8 +34,7 @@ all_modules = ( 'helper', 'contrib/stats', 'applications/v4ping', - 'devices/l2-routing/l2-routing-main', - 'devices/l2-routing/l2-routing-hwmp', + 'devices/mesh', ) def set_options(opt):