From 42e5bb46f2940675e258e7d3f4aacf3ed0afafb1 Mon Sep 17 00:00:00 2001 From: Kirill Andreev Date: Tue, 25 Aug 2009 14:37:10 +0400 Subject: [PATCH] Restructured files, removed unneeded includes --- .../mesh/dot11s/ie-dot11s-beacon-timing.cc | 8 - .../mesh/dot11s/ie-dot11s-beacon-timing.h | 2 +- .../mesh/dot11s/ie-dot11s-configuration.cc | 1 - .../mesh/dot11s/ie-dot11s-configuration.h | 2 +- src/devices/mesh/dot11s/ie-dot11s-id.h | 2 +- .../mesh/dot11s/ie-dot11s-metric-report.h | 2 +- .../mesh/dot11s/ie-dot11s-peer-management.cc | 1 - .../mesh/dot11s/ie-dot11s-peer-management.h | 2 +- .../mesh/dot11s/ie-dot11s-peering-protocol.h | 2 +- src/devices/mesh/dot11s/ie-dot11s-perr.cc | 2 - src/devices/mesh/dot11s/ie-dot11s-perr.h | 2 +- src/devices/mesh/dot11s/ie-dot11s-prep.cc | 2 - src/devices/mesh/dot11s/ie-dot11s-prep.h | 2 +- src/devices/mesh/dot11s/ie-dot11s-preq.cc | 2 - src/devices/mesh/dot11s/ie-dot11s-preq.h | 2 +- src/devices/mesh/dot11s/ie-dot11s-rann.cc | 2 - src/devices/mesh/dot11s/ie-dot11s-rann.h | 2 +- src/devices/mesh/flame/flame-header.cc | 2 +- src/devices/mesh/mesh-wifi-beacon.h | 1 - .../mesh/wifi-information-element-vector.cc | 18 ++- .../mesh/wifi-information-element-vector.h | 82 +++++++++- src/devices/mesh/wifi-information-element.cc | 41 ----- src/devices/mesh/wifi-information-element.h | 140 ------------------ src/devices/mesh/wscript | 4 +- 24 files changed, 109 insertions(+), 217 deletions(-) delete mode 100644 src/devices/mesh/wifi-information-element.cc delete mode 100644 src/devices/mesh/wifi-information-element.h diff --git a/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc b/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc index cdf6bd931..a9bd1772d 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc +++ b/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc @@ -19,12 +19,7 @@ */ #include "ie-dot11s-beacon-timing.h" -#include "ns3/log.h" -#include "ns3/test.h" #include "ns3/packet.h" - -NS_LOG_COMPONENT_DEFINE ("IeBeaconTiming"); - namespace ns3 { namespace dot11s { /******************************************* @@ -88,8 +83,6 @@ IeBeaconTiming::AddNeighboursTimingElementUnit (uint16_t aid, Time last_beacon, { if (m_numOfUnits == 50) { - NS_LOG_WARN ( - "Neighbor timing element is ignored, since more than 50 neighbors can not be supported in single information element."); return; } //First we lookup if this element already exists @@ -98,7 +91,6 @@ IeBeaconTiming::AddNeighboursTimingElementUnit (uint16_t aid, Time last_beacon, if (((*i)->GetAid () == AidToU8 (aid)) && ((*i)->GetLastBeacon () == TimestampToU16 (last_beacon)) && ((*i)->GetBeaconInterval () == BeaconIntervalToU16 (beacon_interval))) { - NS_LOG_WARN ("Duplicated neighbor timing element is ignored."); return; } } diff --git a/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.h b/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.h index 75153edb7..0e25d2dd3 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.h +++ b/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.h @@ -23,7 +23,7 @@ #include #include "ns3/nstime.h" -#include "ns3/wifi-information-element.h" +#include "ns3/wifi-information-element-vector.h" namespace ns3 { namespace dot11s { diff --git a/src/devices/mesh/dot11s/ie-dot11s-configuration.cc b/src/devices/mesh/dot11s/ie-dot11s-configuration.cc index ca97d210c..59e6f6f63 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-configuration.cc +++ b/src/devices/mesh/dot11s/ie-dot11s-configuration.cc @@ -20,7 +20,6 @@ */ #include "ie-dot11s-configuration.h" -#include "ns3/test.h" #include "ns3/packet.h" namespace ns3 { namespace dot11s { diff --git a/src/devices/mesh/dot11s/ie-dot11s-configuration.h b/src/devices/mesh/dot11s/ie-dot11s-configuration.h index acf023397..80779432e 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-configuration.h +++ b/src/devices/mesh/dot11s/ie-dot11s-configuration.h @@ -23,7 +23,7 @@ #ifndef MESH_CONFIGURATION_H #define MESH_CONFIGURATION_H -#include "ns3/wifi-information-element.h" +#include "ns3/wifi-information-element-vector.h" namespace ns3 { namespace dot11s { diff --git a/src/devices/mesh/dot11s/ie-dot11s-id.h b/src/devices/mesh/dot11s/ie-dot11s-id.h index 52dacb726..c41c921f0 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-id.h +++ b/src/devices/mesh/dot11s/ie-dot11s-id.h @@ -23,7 +23,7 @@ #include #include "ns3/buffer.h" -#include "ns3/wifi-information-element.h" +#include "ns3/wifi-information-element-vector.h" namespace ns3 { namespace dot11s { diff --git a/src/devices/mesh/dot11s/ie-dot11s-metric-report.h b/src/devices/mesh/dot11s/ie-dot11s-metric-report.h index 19c1fc2a1..b93fcac18 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-metric-report.h +++ b/src/devices/mesh/dot11s/ie-dot11s-metric-report.h @@ -23,7 +23,7 @@ #include #include "ns3/buffer.h" -#include "ns3/wifi-information-element.h" +#include "ns3/wifi-information-element-vector.h" namespace ns3 { namespace dot11s { diff --git a/src/devices/mesh/dot11s/ie-dot11s-peer-management.cc b/src/devices/mesh/dot11s/ie-dot11s-peer-management.cc index 9eb734278..f0a125f59 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-peer-management.cc +++ b/src/devices/mesh/dot11s/ie-dot11s-peer-management.cc @@ -21,7 +21,6 @@ #include "ie-dot11s-peer-management.h" #include "ns3/assert.h" -#include "ns3/test.h" #include "ns3/packet.h" namespace ns3 { diff --git a/src/devices/mesh/dot11s/ie-dot11s-peer-management.h b/src/devices/mesh/dot11s/ie-dot11s-peer-management.h index 0c75bdbe0..5d7a16dcf 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-peer-management.h +++ b/src/devices/mesh/dot11s/ie-dot11s-peer-management.h @@ -22,7 +22,7 @@ #ifndef MESH_PEER_MAN_ELEMENT #define MESH_PEER_MAN_ELEMENT -#include "ns3/wifi-information-element.h" +#include "ns3/wifi-information-element-vector.h" namespace ns3 { namespace dot11s { diff --git a/src/devices/mesh/dot11s/ie-dot11s-peering-protocol.h b/src/devices/mesh/dot11s/ie-dot11s-peering-protocol.h index d8d83fb64..689695112 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-peering-protocol.h +++ b/src/devices/mesh/dot11s/ie-dot11s-peering-protocol.h @@ -21,7 +21,7 @@ #ifndef MESH_PERING_PROTOCOL_H #define MESH_PEERING_PROTOCOL_H -#include "ns3/wifi-information-element.h" +#include "ns3/wifi-information-element-vector.h" namespace ns3 { diff --git a/src/devices/mesh/dot11s/ie-dot11s-perr.cc b/src/devices/mesh/dot11s/ie-dot11s-perr.cc index 0baba8889..2f0d13056 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-perr.cc +++ b/src/devices/mesh/dot11s/ie-dot11s-perr.cc @@ -20,9 +20,7 @@ #include "ie-dot11s-perr.h" #include "ns3/address-utils.h" -#include "ns3/node.h" #include "ns3/packet.h" -#include "ns3/test.h" namespace ns3 { namespace dot11s { IePerr::IePerr () diff --git a/src/devices/mesh/dot11s/ie-dot11s-perr.h b/src/devices/mesh/dot11s/ie-dot11s-perr.h index 851ec352f..d764179f2 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-perr.h +++ b/src/devices/mesh/dot11s/ie-dot11s-perr.h @@ -22,7 +22,7 @@ #define PERR_INFORMATION_ELEMENT_H #include "ns3/mac48-address.h" -#include "ns3/wifi-information-element.h" +#include "ns3/wifi-information-element-vector.h" namespace ns3 { namespace dot11s { diff --git a/src/devices/mesh/dot11s/ie-dot11s-prep.cc b/src/devices/mesh/dot11s/ie-dot11s-prep.cc index 6132ffd3e..6deb94cba 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-prep.cc +++ b/src/devices/mesh/dot11s/ie-dot11s-prep.cc @@ -20,9 +20,7 @@ #include "ie-dot11s-prep.h" #include "ns3/address-utils.h" -#include "ns3/node.h" #include "ns3/assert.h" -#include "ns3/test.h" #include "ns3/packet.h" namespace ns3 { namespace dot11s { diff --git a/src/devices/mesh/dot11s/ie-dot11s-prep.h b/src/devices/mesh/dot11s/ie-dot11s-prep.h index 235c80d27..94a285c4b 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-prep.h +++ b/src/devices/mesh/dot11s/ie-dot11s-prep.h @@ -22,7 +22,7 @@ #define WIFI_PREP_INFORMATION_ELEMENT_H #include "ns3/mac48-address.h" -#include "ns3/wifi-information-element.h" +#include "ns3/wifi-information-element-vector.h" namespace ns3 { namespace dot11s { diff --git a/src/devices/mesh/dot11s/ie-dot11s-preq.cc b/src/devices/mesh/dot11s/ie-dot11s-preq.cc index cbe791b3c..4a6e4822c 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-preq.cc +++ b/src/devices/mesh/dot11s/ie-dot11s-preq.cc @@ -20,9 +20,7 @@ #include "ie-dot11s-preq.h" #include "ns3/address-utils.h" -#include "ns3/node.h" #include "ns3/assert.h" -#include "ns3/test.h" #include "ns3/packet.h" namespace ns3 { diff --git a/src/devices/mesh/dot11s/ie-dot11s-preq.h b/src/devices/mesh/dot11s/ie-dot11s-preq.h index 562ed5a1d..13bc13be3 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-preq.h +++ b/src/devices/mesh/dot11s/ie-dot11s-preq.h @@ -24,7 +24,7 @@ #include #include "ns3/mac48-address.h" -#include "ns3/wifi-information-element.h" +#include "ns3/wifi-information-element-vector.h" namespace ns3 { namespace dot11s { diff --git a/src/devices/mesh/dot11s/ie-dot11s-rann.cc b/src/devices/mesh/dot11s/ie-dot11s-rann.cc index ed01daca7..4d3505417 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-rann.cc +++ b/src/devices/mesh/dot11s/ie-dot11s-rann.cc @@ -21,9 +21,7 @@ #include "ie-dot11s-rann.h" #include "ns3/assert.h" #include "ns3/address-utils.h" -#include "ns3/node.h" #include "ns3/packet.h" -#include "ns3/test.h" namespace ns3 { namespace dot11s { diff --git a/src/devices/mesh/dot11s/ie-dot11s-rann.h b/src/devices/mesh/dot11s/ie-dot11s-rann.h index c266895c1..743d2fb41 100644 --- a/src/devices/mesh/dot11s/ie-dot11s-rann.h +++ b/src/devices/mesh/dot11s/ie-dot11s-rann.h @@ -22,7 +22,7 @@ #define RANN_INFORMATION_ELEMENT_H #include "ns3/mac48-address.h" -#include "ns3/wifi-information-element.h" +#include "ns3/wifi-information-element-vector.h" namespace ns3 { namespace dot11s { diff --git a/src/devices/mesh/flame/flame-header.cc b/src/devices/mesh/flame/flame-header.cc index 52cde33f5..8deb86103 100644 --- a/src/devices/mesh/flame/flame-header.cc +++ b/src/devices/mesh/flame/flame-header.cc @@ -149,7 +149,7 @@ operator== (const FlameHeader & a, const FlameHeader & b) struct FlameHeaderBist : public Test { FlameHeaderBist () : - Test ("mesh/Flame/FlameHeader") + Test ("Mesh/Flame/FlameHeader") { } virtual bool diff --git a/src/devices/mesh/mesh-wifi-beacon.h b/src/devices/mesh/mesh-wifi-beacon.h index 3a038f6b3..4ac8afed7 100644 --- a/src/devices/mesh/mesh-wifi-beacon.h +++ b/src/devices/mesh/mesh-wifi-beacon.h @@ -23,7 +23,6 @@ #include "ns3/object.h" #include "ns3/packet.h" -#include "ns3/wifi-information-element.h" #include "ns3/mgt-headers.h" // from wifi module #include "ns3/wifi-mac-header.h" #include "ns3/wifi-information-element-vector.h" diff --git a/src/devices/mesh/wifi-information-element-vector.cc b/src/devices/mesh/wifi-information-element-vector.cc index 39314254f..e4e54639d 100644 --- a/src/devices/mesh/wifi-information-element-vector.cc +++ b/src/devices/mesh/wifi-information-element-vector.cc @@ -35,6 +35,20 @@ #include "dot11s/ie-dot11s-rann.h" namespace ns3 { + +void +WifiInformationElement::Print (std::ostream &os) const +{ + os << std::endl << "" << std::endl; + PrintInformation (os); + os << "" << std::endl; +} +bool +operator< (WifiInformationElement const & a, WifiInformationElement const & b) +{ + return (a.ElementId () < b.ElementId ()); +} + WifiInformationElementVector::WifiInformationElementVector () : m_maxSize (1500) { @@ -360,10 +374,10 @@ operator== (const WifiInformationElementVector & a, const WifiInformationElement #ifdef RUN_SELF_TESTS /// Built-in self test for WifiInformationElementVector -struct WifiInformationElementVectorBist : public IeTest +struct WifiInformationElementVectorBist : public Test { WifiInformationElementVectorBist () : - IeTest ("Mesh/WifiInformationElementVector") + Test ("Mesh/WifiInformationElementVector") { }; virtual bool diff --git a/src/devices/mesh/wifi-information-element-vector.h b/src/devices/mesh/wifi-information-element-vector.h index a3886aedd..9b10d3b80 100644 --- a/src/devices/mesh/wifi-information-element-vector.h +++ b/src/devices/mesh/wifi-information-element-vector.h @@ -15,17 +15,95 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Author: Kirill Andreev + * Authors: Kirill Andreev + * Pavel Boyko */ #ifndef IE_VECTOR_H #define IE_VECTOR_H -#include "ns3/wifi-information-element.h" #include "ns3/header.h" namespace ns3 { class Packet; +/** + * \ingroup mesh + * + * \brief Enum of all known information element id (aka tags). + * + * For now only 802.11s (mesh) related elements are supported here (so 11S prefix), + * but this can change in future. + * + * Note that 802.11s element ids are not yet officially assigned, we use ones + * compatible with open80211s (http://o11s.org/) implementation. + */ +enum WifiElementId { + /* begin of open80211s-compatible IDs */ + IE11S_MESH_CONFIGURATION = 51, + IE11S_MESH_ID = 52, + /* end of open80211s-compatible IDs */ + IE11S_LINK_METRIC_REPORT = 20, + IE11S_CONGESTION_NOTIFICATION, + /* begin of open80211s-compatible IDs */ + IE11S_PEERING_MANAGEMENT = 55, + /* end of open80211s-compatible IDs */ + IE11S_SUPP_MBSS_REG_CLASSES_CHANNELS = 23, + IE11S_MESH_CHANNEL_SWITCH_ANNOUNCEMENT, + IE11S_MESH_TIM, + IE11S_AWAKE_WINDOW, + IE11S_BEACON_TIMING, + IE11S_MCCAOP_SETUP_REQUEST, + IE11S_MCCAOP_SETUP_REPLY, + IE11S_MCCAOP_ADVERTISEMENT, + IE11S_MCCAOP_RESERVATION_TEARDOWN, + IE11S_PORTAL_ANNOUNCEMENT, + IE11S_RANN = 67, + /* begin of open80211s-compatible IDs */ + IE11S_PREQ = 68, + IE11S_PREP = 69, + IE11S_PERR = 70, + /* end of open80211s-compatible IDs */ + IE11S_PROXY_UPDATE = 37, + IE11S_PROXY_UPDATE_CONFIRMATION, + IE11S_ABBREVIATED_HANDSHAKE, + IE11S_MESH_PEERING_PROTOCOL_VERSION = 74, +}; + +/** + * \ingroup mesh + * + * \brief Information element, as defined in 802.11-2007 standard + * + * Elements are defined to have a common general format consisting of a 1 octet Element ID field, a 1 octet + * length field, and a variable-length element-specific information field. Each element is assigned a unique + * Element ID as defined in this standard. The Length field specifies the number of octets in the Information + * field. + */ +class WifiInformationElement : public RefCountBase +{ +public: + virtual void Print (std::ostream &os) const; + ///\name Each subclass must implement + //\{ + /// Own unique Element ID + virtual WifiElementId ElementId () const = 0; + /// Length of serialized information + virtual uint8_t GetInformationSize () const = 0; + /// Serialize information + virtual void SerializeInformation (Buffer::Iterator start) const = 0; + /// Deserialize information + virtual uint8_t DeserializeInformation (Buffer::Iterator start, uint8_t length) = 0; + /// Print information + virtual void PrintInformation (std::ostream &os) const = 0; + //\} + + /// Compare information elements using Element ID + friend bool operator< (WifiInformationElement const & a, WifiInformationElement const & b); +}; + +/// Compare information elements using Element ID +bool operator< (WifiInformationElement const & a, WifiInformationElement const & b); + /** * \ingroup mesh * diff --git a/src/devices/mesh/wifi-information-element.cc b/src/devices/mesh/wifi-information-element.cc deleted file mode 100644 index 07b469d40..000000000 --- a/src/devices/mesh/wifi-information-element.cc +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * Copyright (c) 2009 IITP RAS - * - * 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: Pavel Boyko - */ - -#include "ns3/wifi-information-element.h" -#include "ns3/packet.h" -#include "ns3/log.h" - -namespace ns3 -{ -void -WifiInformationElement::Print (std::ostream &os) const -{ - os << std::endl << "" << std::endl; - PrintInformation (os); - os << "" << std::endl; -} -bool -operator< (WifiInformationElement const & a, WifiInformationElement const & b) -{ - return (a.ElementId () < b.ElementId ()); -} - -} - diff --git a/src/devices/mesh/wifi-information-element.h b/src/devices/mesh/wifi-information-element.h deleted file mode 100644 index 1aac5f6dd..000000000 --- a/src/devices/mesh/wifi-information-element.h +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * Copyright (c) 2009 IITP RAS - * - * 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: Pavel Boyko - */ - -#ifndef WIFIINFORMATIONELEMENT_H_ -#define WIFIINFORMATIONELEMENT_H_ - -#include "ns3/header.h" -#include "ns3/ref-count-base.h" -#include "ns3/test.h" -#include "ns3/packet.h" - -namespace ns3 { -class Packet; -/** - * \ingroup mesh - * - * \brief Enum of all known information element id (aka tags). - * - * For now only 802.11s (mesh) related elements are supported here (so 11S prefix), - * but this can change in future. - * - * Note that 802.11s element ids are not yet officially assigned, we use ones - * compatible with open80211s (http://o11s.org/) implementation. - */ -enum WifiElementId { - /* begin of open80211s-compatible IDs */ - IE11S_MESH_CONFIGURATION = 51, - IE11S_MESH_ID = 52, - /* end of open80211s-compatible IDs */ - IE11S_LINK_METRIC_REPORT = 20, - IE11S_CONGESTION_NOTIFICATION, - /* begin of open80211s-compatible IDs */ - IE11S_PEERING_MANAGEMENT = 55, - /* end of open80211s-compatible IDs */ - IE11S_SUPP_MBSS_REG_CLASSES_CHANNELS = 23, - IE11S_MESH_CHANNEL_SWITCH_ANNOUNCEMENT, - IE11S_MESH_TIM, - IE11S_AWAKE_WINDOW, - IE11S_BEACON_TIMING, - IE11S_MCCAOP_SETUP_REQUEST, - IE11S_MCCAOP_SETUP_REPLY, - IE11S_MCCAOP_ADVERTISEMENT, - IE11S_MCCAOP_RESERVATION_TEARDOWN, - IE11S_PORTAL_ANNOUNCEMENT, - IE11S_RANN = 67, - /* begin of open80211s-compatible IDs */ - IE11S_PREQ = 68, - IE11S_PREP = 69, - IE11S_PERR = 70, - /* end of open80211s-compatible IDs */ - IE11S_PROXY_UPDATE = 37, - IE11S_PROXY_UPDATE_CONFIRMATION, - IE11S_ABBREVIATED_HANDSHAKE, - IE11S_MESH_PEERING_PROTOCOL_VERSION = 74, -}; - -/** - * \ingroup mesh - * - * \brief Information element, as defined in 802.11-2007 standard - * - * Elements are defined to have a common general format consisting of a 1 octet Element ID field, a 1 octet - * length field, and a variable-length element-specific information field. Each element is assigned a unique - * Element ID as defined in this standard. The Length field specifies the number of octets in the Information - * field. - */ -class WifiInformationElement : public RefCountBase -{ -public: - virtual void Print (std::ostream &os) const; - ///\name Each subclass must implement - //\{ - /// Own unique Element ID - virtual WifiElementId ElementId () const = 0; - /// Length of serialized information - virtual uint8_t GetInformationSize () const = 0; - /// Serialize information - virtual void SerializeInformation (Buffer::Iterator start) const = 0; - /// Deserialize information - virtual uint8_t DeserializeInformation (Buffer::Iterator start, uint8_t length) = 0; - /// Print information - virtual void PrintInformation (std::ostream &os) const = 0; - //\} - - /// Compare information elements using Element ID - friend bool operator< (WifiInformationElement const & a, WifiInformationElement const & b); -}; - -/// Compare information elements using Element ID -bool operator< (WifiInformationElement const & a, WifiInformationElement const & b); - -#ifdef RUN_SELF_TESTS -/// Generic test of information element -class IeTest : public Test -{ -public: - IeTest (const char * name) : Test (name) {} - /// Test round-trip serialization - template bool TestRoundtripSerialization (IE a); -}; - -template bool -IeTest::TestRoundtripSerialization (IE a) -{ - bool result (true); -#if 0 - Ptr packet = Create (); - packet->AddHeader (a); - IE b; - packet->RemoveHeader (b); - NS_TEST_ASSERT_EQUAL (a, b); - packet->AddHeader (a); - IE c; - bool ok = packet->RemoveHeader (c); - NS_TEST_ASSERT (ok); - NS_TEST_ASSERT_EQUAL (a, c); -#endif - return result; -} -#endif - -} // namespace ns3 -#endif /* WIFIINFORMATIONELEMENT_H_ */ diff --git a/src/devices/mesh/wscript b/src/devices/mesh/wscript index 833db6b8a..ecf9f8f9b 100644 --- a/src/devices/mesh/wscript +++ b/src/devices/mesh/wscript @@ -4,7 +4,7 @@ def build(bld): obj = bld.create_ns3_module('mesh', ['wifi', 'dot11s']) obj.source = [ - 'wifi-information-element.cc', + #'wifi-information-element.cc', 'wifi-information-element-vector.cc', 'mesh-point-device.cc', 'mesh-l2-routing-protocol.cc', @@ -14,7 +14,7 @@ def build(bld): headers = bld.new_task_gen('ns3header') headers.module = 'mesh' headers.source = [ - 'wifi-information-element.h', + #'wifi-information-element.h', 'wifi-information-element-vector.h', 'mesh-point-device.h', 'mesh-l2-routing-protocol.h',