move definition of Wifi information element IDs from mesh to wifi module; implement more fully the WifiInformationElementVector header class
--- a/src/mesh/model/mesh-information-element-vector.cc Mon Aug 17 14:02:17 2015 -0700
+++ b/src/mesh/model/mesh-information-element-vector.cc Mon Aug 17 14:29:32 2015 -0700
@@ -36,6 +36,33 @@
namespace ns3 {
+NS_OBJECT_ENSURE_REGISTERED (MeshInformationElementVector);
+
+MeshInformationElementVector::MeshInformationElementVector ()
+{
+}
+
+MeshInformationElementVector::~MeshInformationElementVector ()
+{
+}
+
+
+TypeId
+MeshInformationElementVector::GetTypeId ()
+{
+ static TypeId tid = TypeId ("ns3::MeshInformationElementVector")
+ .SetParent<WifiInformationElementVector> ()
+ .SetGroupName ("Mesh")
+ .AddConstructor<MeshInformationElementVector> ();
+ return tid;
+}
+
+TypeId
+MeshInformationElementVector::GetInstanceTypeId () const
+{
+ return GetTypeId ();
+}
+
uint32_t
MeshInformationElementVector::DeserializeSingleIe (Buffer::Iterator start)
{
--- a/src/mesh/model/mesh-information-element-vector.h Mon Aug 17 14:02:17 2015 -0700
+++ b/src/mesh/model/mesh-information-element-vector.h Mon Aug 17 14:29:32 2015 -0700
@@ -23,13 +23,18 @@
#define MESH_INFORMATION_ELEMENT_VECTOR_H
#include "ns3/wifi-information-element-vector.h"
-#include "ns3/mesh-information-element.h"
+#include "ns3/wifi-information-element.h"
namespace ns3 {
class MeshInformationElementVector : public WifiInformationElementVector
{
public:
+ MeshInformationElementVector ();
+ ~MeshInformationElementVector ();
+
+ static TypeId GetTypeId ();
+ TypeId GetInstanceTypeId () const;
virtual uint32_t DeserializeSingleIe (Buffer::Iterator start);
};
--- a/src/mesh/model/mesh-information-element.h Mon Aug 17 14:02:17 2015 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2010 Dean Armstrong
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Author: Dean Armstrong <deanarm@gmail.com>
- */
-
-#ifndef MESH_INFORMATION_ELEMENT_H
-#define MESH_INFORMATION_ELEMENT_H
-
-#include "ns3/wifi-information-element.h"
-
-namespace ns3 {
-
-#define IE11S_LINK_METRIC_REPORT ((WifiInformationElementId)115)
-#define IE11S_CONGESTION_NOTIFICATION ((WifiInformationElementId)116)
-#define IE11S_SUPP_MBSS_REG_CLASSES_CHANNELS ((WifiInformationElementId)23)
-#define IE11S_MESH_CHANNEL_SWITCH_ANNOUNCEMENT ((WifiInformationElementId)24)
-#define IE11S_MESH_TIM ((WifiInformationElementId)25)
-#define IE11S_AWAKE_WINDOW ((WifiInformationElementId)119)
-#define IE11S_BEACON_TIMING ((WifiInformationElementId)120)
-#define IE11S_MCCAOP_SETUP_REQUEST ((WifiInformationElementId)121)
-#define IE11S_MCCAOP_SETUP_REPLY ((WifiInformationElementId)122)
-#define IE11S_MCCAOP_ADVERTISEMENT ((WifiInformationElementId)123)
-#define IE11S_MCCAOP_RESERVATION_TEARDOWN ((WifiInformationElementId)31)
-#define IE11S_PORTAL_ANNOUNCEMENT ((WifiInformationElementId)32)
-#define IE11S_PROXY_UPDATE ((WifiInformationElementId)137)
-#define IE11S_PROXY_UPDATE_CONFIRMATION ((WifiInformationElementId)138)
-#define IE11S_ABBREVIATED_HANDSHAKE ((WifiInformationElementId)39)
-/* begin of open80211s-compatible IDs */
-#define IE11S_MESH_CONFIGURATION ((WifiInformationElementId)113)
-#define IE11S_MESH_ID ((WifiInformationElementId)114)
-#define IE11S_PEERING_MANAGEMENT ((WifiInformationElementId)117)
-/* end of open80211s-compatible IDs */
-#define IE11S_RANN ((WifiInformationElementId)126)
-/* begin of open80211s-compatible IDs */
-#define IE11S_PREQ ((WifiInformationElementId)130)
-#define IE11S_PREP ((WifiInformationElementId)131)
-#define IE11S_PERR ((WifiInformationElementId)132)
-/* end of open80211s-compatible IDs */
-#define IE11S_MESH_PEERING_PROTOCOL_VERSION ((WifiInformationElementId)74)
-
-}
-
-#endif /* MESH_INFORMATION_ELEMENT_H */
--- a/src/mesh/model/mesh-wifi-beacon.h Mon Aug 17 14:02:17 2015 -0700
+++ b/src/mesh/model/mesh-wifi-beacon.h Mon Aug 17 14:29:32 2015 -0700
@@ -67,7 +67,7 @@
/// Beacon header
MgtBeaconHeader m_header;
/// List of information elements added
- WifiInformationElementVector m_elements;
+ MeshInformationElementVector m_elements;
};
}
--- a/src/mesh/wscript Mon Aug 17 14:02:17 2015 -0700
+++ b/src/mesh/wscript Mon Aug 17 14:29:32 2015 -0700
@@ -57,7 +57,6 @@
headers = bld(features='ns3header')
headers.module = 'mesh'
headers.source = [
- 'model/mesh-information-element.h',
'model/mesh-information-element-vector.h',
'model/mesh-point-device.h',
'model/mesh-l2-routing-protocol.h',
--- a/src/wifi/model/wifi-information-element-vector.h Mon Aug 17 14:02:17 2015 -0700
+++ b/src/wifi/model/wifi-information-element-vector.h Mon Aug 17 14:29:32 2015 -0700
@@ -42,7 +42,7 @@
{
public:
WifiInformationElementVector ();
- ~WifiInformationElementVector ();
+ virtual ~WifiInformationElementVector ();
static TypeId GetTypeId ();
TypeId GetInstanceTypeId () const;
--- a/src/wifi/model/wifi-information-element.h Mon Aug 17 14:02:17 2015 -0700
+++ b/src/wifi/model/wifi-information-element.h Mon Aug 17 14:29:32 2015 -0700
@@ -88,6 +88,35 @@
// 128 to 220 are reserved in 802.11-2007
#define IE_VENDOR_SPECIFIC ((WifiInformationElementId)221)
// 222 to 255 are reserved in 802.11-2007
+#define IE11S_LINK_METRIC_REPORT ((WifiInformationElementId)115)
+#define IE11S_CONGESTION_NOTIFICATION ((WifiInformationElementId)116)
+#define IE11S_SUPP_MBSS_REG_CLASSES_CHANNELS ((WifiInformationElementId)23)
+#define IE11S_MESH_CHANNEL_SWITCH_ANNOUNCEMENT ((WifiInformationElementId)24)
+#define IE11S_MESH_TIM ((WifiInformationElementId)25)
+#define IE11S_AWAKE_WINDOW ((WifiInformationElementId)119)
+#define IE11S_BEACON_TIMING ((WifiInformationElementId)120)
+#define IE11S_MCCAOP_SETUP_REQUEST ((WifiInformationElementId)121)
+#define IE11S_MCCAOP_SETUP_REPLY ((WifiInformationElementId)122)
+#define IE11S_MCCAOP_ADVERTISEMENT ((WifiInformationElementId)123)
+#define IE11S_MCCAOP_RESERVATION_TEARDOWN ((WifiInformationElementId)31)
+#define IE11S_PORTAL_ANNOUNCEMENT ((WifiInformationElementId)32)
+#define IE11S_PROXY_UPDATE ((WifiInformationElementId)137)
+#define IE11S_PROXY_UPDATE_CONFIRMATION ((WifiInformationElementId)138)
+#define IE11S_ABBREVIATED_HANDSHAKE ((WifiInformationElementId)39)
+/* begin of open80211s-compatible IDs */
+#define IE11S_MESH_CONFIGURATION ((WifiInformationElementId)113)
+#define IE11S_MESH_ID ((WifiInformationElementId)114)
+#define IE11S_PEERING_MANAGEMENT ((WifiInformationElementId)117)
+/* end of open80211s-compatible IDs */
+#define IE11S_RANN ((WifiInformationElementId)126)
+/* begin of open80211s-compatible IDs */
+#define IE11S_PREQ ((WifiInformationElementId)130)
+#define IE11S_PREP ((WifiInformationElementId)131)
+#define IE11S_PERR ((WifiInformationElementId)132)
+/* end of open80211s-compatible IDs */
+#define IE11S_MESH_PEERING_PROTOCOL_VERSION ((WifiInformationElementId)74)
+
+
/**