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;
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;
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
iterator in a Buffer instance
Definition: buffer.h:99
Information element, as defined in 802.11-2007 standard.
A set of values indicating whether a mesh STA is a possible candidate for mesh peering establishment ...
friend bool operator==(const Dot11sMeshCapability &a, const Dot11sMeshCapability &b)
equality operator
uint8_t GetUint8() const
The Mesh Capability is expressed in terms of 8 single bit fields.
Buffer::Iterator Serialize(Buffer::Iterator i) const
Serialize to a buffer.
uint8_t GetSerializedSize() const
Size of the field in bytes when serialized.
bool Is(uint8_t cap, uint8_t n) const
This is a utility function to test if the bit at position n is true.
bool beaconTimingReport
beacon timing report
Buffer::Iterator Deserialize(Buffer::Iterator i)
Deserialize from a buffer.
Describes Mesh Configuration Element see 7.3.2.86 of 802.11s draft 3.0.
void SetNeighborCount(uint8_t neighbors)
Set neighbor count.
void SetMetric(dot11sPathSelectionMetric metricId)
Set metric value.
Dot11sMeshCapability m_meshCap
Mesh capability.
dot11sAuthenticationProtocol m_APId
Auth protocol ID.
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)
virtual uint8_t GetInformationFieldSize() const
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
dot11sPathSelectionMetric m_APSMId
Active Path Metric ID.
virtual void SerializeInformationField(Buffer::Iterator i) const
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
Dot11sMeshCapability const & MeshCapability()
Mesh capability.
virtual WifiInformationElementId ElementId() const
dot11sCongestionControlMode m_CCMId
Congestion Control Mode ID.
dot11sPathSelectionProtocol m_APSPId
Active Path Selection Protocol ID.
virtual void Print(std::ostream &os) const
Generate human-readable form of IE.
void SetRouting(dot11sPathSelectionProtocol routingId)
Set routing value.
uint8_t GetNeighborCount()
Get neighbor count.
dot11sSynchronizationProtocolIdentifier m_SPId
Sync protocol ID.
friend bool operator==(const IeConfiguration &a, const IeConfiguration &b)
equality operator
bool IsAirtime()
Is airtime function.
bool operator==(const MeshHeader &a, const MeshHeader &b)
std::ostream & operator<<(std::ostream &os, const IeBeaconTiming &a)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.