A Discrete-Event Network Simulator
API
ie-dot11s-configuration.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2008,2009 IITP RAS
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Authors: Kirill Andreev <andreev@iitp.ru>
19  * Aleksey Kovalenko <kovalenko@iitp.ru>
20  */
21 
22 
23 #ifndef MESH_CONFIGURATION_H
24 #define MESH_CONFIGURATION_H
25 
26 #include "ns3/mesh-information-element-vector.h"
27 
28 namespace ns3 {
29 namespace dot11s {
30 
31 //according to IEEE 802.11 - 2012
32 
33 //in 7.3.2.98.2 Active Path Selection Protocol Identifier - 802.11s-2011
35 {
36  PROTOCOL_HWMP = 0x01,
37 };
38 
39 //in 7.3.2.98.3 Active Path Selection Metric Identifier - 802.11s-2011
41 {
43 };
44 
45 // in 7.3.2.98.4 Congestion Control Mode Identifier - 802.11s-2011
47 {
50 };
51 
52 // in 7.3.2.98.5 Synchronization Method Identifier - 802.11s-2011
54 {
55  SYNC_NEIGHBOUR_OFFSET = 0x01, //Neighbor offset synchronization method
56  SYNC_NULL = 0x00, //Reserved
57 };
58 
59 // in 7.3.2.98.6 Authentication Protocol Identifier - 802.11s-2011
61 {
62  AUTH_NULL = 0x00, //No authentication method is required to establish mesh peerings within the MBSS
63  AUTH_SAE = 0x01, //SAE defined in 8.2a
64  AUTH_IEEE = 0x02, //IEEE 802.1X authentication
65 };
72 {
73 public:
79  uint8_t GetSerializedSize () const;
97  uint8_t GetUint8 () const;
100  bool MCCAEnabled;
101  bool forwarding;
105 
111  bool Is (uint8_t cap, uint8_t n) const;
119  friend bool operator== (const Dot11sMeshCapability & a, const Dot11sMeshCapability & b);
120 };
121 
128 {
129 public:
130  IeConfiguration ();
135  void SetRouting (dot11sPathSelectionProtocol routingId);
140  void SetMetric (dot11sPathSelectionMetric metricId);
146  bool IsHWMP ();
152  bool IsAirtime ();
157  void SetNeighborCount (uint8_t neighbors);
162  uint8_t GetNeighborCount ();
168 
169  // Inherited from WifiInformationElement
170  virtual WifiInformationElementId ElementId () const;
171  virtual uint8_t GetInformationFieldSize () const;
172  virtual void SerializeInformationField (Buffer::Iterator i) const;
173  virtual uint8_t DeserializeInformationField (Buffer::Iterator i, uint8_t length);
174  virtual void Print (std::ostream& os) const;
175 
176 private:
189  uint8_t m_neighbors;
190 
197  friend bool operator== (const IeConfiguration & a, const IeConfiguration & b);
198 };
199 bool operator== (const IeConfiguration & a, const IeConfiguration & b);
200 bool operator== (const Dot11sMeshCapability & a, const Dot11sMeshCapability & b);
201 std::ostream &operator << (std::ostream &os, const IeConfiguration &config);
202 } // namespace dot11s
203 } // namespace ns3
204 #endif
ns3::dot11s::PROTOCOL_HWMP
@ PROTOCOL_HWMP
Definition: ie-dot11s-configuration.h:36
ns3::dot11s::Dot11sMeshCapability::Serialize
Buffer::Iterator Serialize(Buffer::Iterator i) const
Serialize to a buffer.
Definition: ie-dot11s-configuration.cc:72
ns3::dot11s::IeConfiguration::m_APSMId
dot11sPathSelectionMetric m_APSMId
Active Path Metric ID.
Definition: ie-dot11s-configuration.h:180
ns3::dot11s::IeConfiguration::IeConfiguration
IeConfiguration()
Definition: ie-dot11s-configuration.cc:102
ns3::dot11s::Dot11sMeshCapability
A set of values indicating whether a mesh STA is a possible candidate for mesh peering establishment ...
Definition: ie-dot11s-configuration.h:72
ns3::dot11s::METRIC_AIRTIME
@ METRIC_AIRTIME
Definition: ie-dot11s-configuration.h:42
ns3::dot11s::IeConfiguration::Print
virtual void Print(std::ostream &os) const
Generate human-readable form of IE.
Definition: ie-dot11s-configuration.cc:152
ns3::dot11s::operator==
bool operator==(const MeshHeader &a, const MeshHeader &b)
Definition: dot11s-mac-header.cc:172
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::dot11s::AUTH_SAE
@ AUTH_SAE
Definition: ie-dot11s-configuration.h:63
ns3::dot11s::Dot11sMeshCapability::Deserialize
Buffer::Iterator Deserialize(Buffer::Iterator i)
Deserialize from a buffer.
Definition: ie-dot11s-configuration.cc:78
ns3::WifiInformationElement
Information element, as defined in 802.11-2007 standard.
Definition: wifi-information-element.h:234
ns3::dot11s::IeConfiguration::operator==
friend bool operator==(const IeConfiguration &a, const IeConfiguration &b)
equality operator
Definition: ie-dot11s-configuration.cc:206
ns3::dot11s::IeConfiguration::IsHWMP
bool IsHWMP()
Is HWMP function.
Definition: ie-dot11s-configuration.cc:174
ns3::dot11s::IeConfiguration
Describes Mesh Configuration Element see 7.3.2.86 of 802.11s draft 3.0.
Definition: ie-dot11s-configuration.h:128
ns3::dot11s::AUTH_NULL
@ AUTH_NULL
Definition: ie-dot11s-configuration.h:62
ns3::WifiInformationElementId
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
Definition: wifi-information-element.h:40
ns3::dot11s::IeConfiguration::SetNeighborCount
void SetNeighborCount(uint8_t neighbors)
Set neighbor count.
Definition: ie-dot11s-configuration.cc:184
ns3::dot11s::IeConfiguration::DeserializeInformationField
virtual uint8_t DeserializeInformationField(Buffer::Iterator i, uint8_t length)
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
Definition: ie-dot11s-configuration.cc:136
ns3::dot11s::dot11sPathSelectionProtocol
dot11sPathSelectionProtocol
Definition: ie-dot11s-configuration.h:35
ns3::dot11s::Dot11sMeshCapability::GetUint8
uint8_t GetUint8() const
The Mesh Capability is expressed in terms of 8 single bit fields.
Definition: ie-dot11s-configuration.cc:38
ns3::dot11s::IeConfiguration::m_APId
dot11sAuthenticationProtocol m_APId
Auth protocol ID.
Definition: ie-dot11s-configuration.h:186
ns3::dot11s::IeConfiguration::SetRouting
void SetRouting(dot11sPathSelectionProtocol routingId)
Set routing value.
Definition: ie-dot11s-configuration.cc:164
ns3::dot11s::IeConfiguration::SerializeInformationField
virtual void SerializeInformationField(Buffer::Iterator i) const
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
Definition: ie-dot11s-configuration.cc:120
ns3::dot11s::IeConfiguration::m_neighbors
uint8_t m_neighbors
neighbors
Definition: ie-dot11s-configuration.h:189
ns3::dot11s::Dot11sMeshCapability::Is
bool Is(uint8_t cap, uint8_t n) const
This is a utility function to test if the bit at position n is true.
Definition: ie-dot11s-configuration.cc:91
ns3::dot11s::IeConfiguration::SetMetric
void SetMetric(dot11sPathSelectionMetric metricId)
Set metric value.
Definition: ie-dot11s-configuration.cc:169
ns3::dot11s::dot11sAuthenticationProtocol
dot11sAuthenticationProtocol
Definition: ie-dot11s-configuration.h:61
ns3::dot11s::IeConfiguration::IsAirtime
bool IsAirtime()
Is airtime function.
Definition: ie-dot11s-configuration.cc:179
ns3::dot11s::dot11sPathSelectionMetric
dot11sPathSelectionMetric
Definition: ie-dot11s-configuration.h:41
ns3::dot11s::IeConfiguration::ElementId
virtual WifiInformationElementId ElementId() const
Definition: ie-dot11s-configuration.cc:97
ns3::dot11s::Dot11sMeshCapability::operator==
friend bool operator==(const Dot11sMeshCapability &a, const Dot11sMeshCapability &b)
equality operator
Definition: ie-dot11s-configuration.cc:199
ns3::dot11s::Dot11sMeshCapability::acceptPeerLinks
bool acceptPeerLinks
accept peer links
Definition: ie-dot11s-configuration.h:98
ns3::dot11s::CONGESTION_SIGNALING
@ CONGESTION_SIGNALING
Definition: ie-dot11s-configuration.h:48
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition: buffer.h:99
ns3::dot11s::CONGESTION_NULL
@ CONGESTION_NULL
Definition: ie-dot11s-configuration.h:49
ns3::dot11s::IeConfiguration::MeshCapability
Dot11sMeshCapability const & MeshCapability()
Mesh capability.
Definition: ie-dot11s-configuration.cc:194
ns3::dot11s::AUTH_IEEE
@ AUTH_IEEE
Definition: ie-dot11s-configuration.h:64
ns3::dot11s::Dot11sMeshCapability::Dot11sMeshCapability
Dot11sMeshCapability()
Definition: ie-dot11s-configuration.cc:27
ns3::dot11s::dot11sSynchronizationProtocolIdentifier
dot11sSynchronizationProtocolIdentifier
Definition: ie-dot11s-configuration.h:54
ns3::dot11s::Dot11sMeshCapability::forwarding
bool forwarding
forwarding?
Definition: ie-dot11s-configuration.h:101
ns3::dot11s::SYNC_NEIGHBOUR_OFFSET
@ SYNC_NEIGHBOUR_OFFSET
Definition: ie-dot11s-configuration.h:55
ns3::dot11s::IeConfiguration::GetNeighborCount
uint8_t GetNeighborCount()
Get neighbor count.
Definition: ie-dot11s-configuration.cc:189
ns3::dot11s::IeConfiguration::m_CCMId
dot11sCongestionControlMode m_CCMId
Congestion Control Mode ID.
Definition: ie-dot11s-configuration.h:182
ns3::dot11s::Dot11sMeshCapability::TBTTAdjustment
bool TBTTAdjustment
TBTT adjustment.
Definition: ie-dot11s-configuration.h:103
ns3::dot11s::Dot11sMeshCapability::MCCAEnabled
bool MCCAEnabled
MCCA enabled.
Definition: ie-dot11s-configuration.h:100
ns3::dot11s::Dot11sMeshCapability::beaconTimingReport
bool beaconTimingReport
beacon timing report
Definition: ie-dot11s-configuration.h:102
ns3::dot11s::IeConfiguration::m_meshCap
Dot11sMeshCapability m_meshCap
Mesh capability.
Definition: ie-dot11s-configuration.h:188
ns3::dot11s::SYNC_NULL
@ SYNC_NULL
Definition: ie-dot11s-configuration.h:56
ns3::dot11s::Dot11sMeshCapability::GetSerializedSize
uint8_t GetSerializedSize() const
Size of the field in bytes when serialized.
Definition: ie-dot11s-configuration.cc:33
ns3::dot11s::IeConfiguration::GetInformationFieldSize
virtual uint8_t GetInformationFieldSize() const
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
Definition: ie-dot11s-configuration.cc:108
ns3::dot11s::Dot11sMeshCapability::powerSaveLevel
bool powerSaveLevel
power save level
Definition: ie-dot11s-configuration.h:104
ns3::dot11s::operator<<
std::ostream & operator<<(std::ostream &os, const IeBeaconTiming &a)
Definition: ie-dot11s-beacon-timing.cc:215
ns3::dot11s::IeConfiguration::m_SPId
dot11sSynchronizationProtocolIdentifier m_SPId
Sync protocol ID.
Definition: ie-dot11s-configuration.h:184
ns3::dot11s::IeConfiguration::m_APSPId
dot11sPathSelectionProtocol m_APSPId
Active Path Selection Protocol ID.
Definition: ie-dot11s-configuration.h:178
ns3::dot11s::dot11sCongestionControlMode
dot11sCongestionControlMode
Definition: ie-dot11s-configuration.h:47
ns3::dot11s::Dot11sMeshCapability::MCCASupported
bool MCCASupported
MCCA supported.
Definition: ie-dot11s-configuration.h:99
sample-rng-plot.n
n
Definition: sample-rng-plot.py:37