A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ie-dot11s-configuration.h
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 {
35 {
36  PROTOCOL_HWMP = 0x000fac00,
37 };
43 {
44  METRIC_AIRTIME = 0x000fac00,
45 };
51 {
52  CONGESTION_SIGNALING = 0x000fac00,
53  CONGESTION_NULL = 0x000facff,
54 };
60 {
61  SYNC_NEIGHBOUR_OFFSET = 0x000fac00,
62  SYNC_NULL = 0x000facff,
63 };
69 {
70  AUTH_NULL = 0x000fac00,
71  AUTH_SAE = 0x000fac01,
72 };
78 {
79 public:
81  uint8_t GetSerializedSize () const;
82  Buffer::Iterator Serialize (Buffer::Iterator i) const;
83  Buffer::Iterator Deserialize (Buffer::Iterator i);
84  uint16_t GetUint16 () const;
85  bool acceptPeerLinks;
86  bool MCCASupported;
87  bool MCCAEnabled;
88  bool forwarding;
89  bool beaconTimingReport;
90  bool TBTTAdjustment;
91  bool powerSaveLevel;
92  bool Is (uint16_t cap,uint8_t n) const;
93  friend bool operator== (const Dot11sMeshCapability & a, const Dot11sMeshCapability & b);
94 };
95 
102 {
103 public:
104  IeConfiguration ();
105  void SetRouting (dot11sPathSelectionProtocol routingId);
106  void SetMetric (dot11sPathSelectionMetric metricId);
107  bool IsHWMP ();
108  bool IsAirtime ();
109  void SetNeighborCount (uint8_t neighbors);
110  uint8_t GetNeighborCount ();
111  Dot11sMeshCapability const& MeshCapability ();
116  virtual WifiInformationElementId ElementId () const;
117  virtual uint8_t GetInformationFieldSize () const;
118  virtual void SerializeInformationField (Buffer::Iterator i) const;
119  virtual uint8_t DeserializeInformationField (Buffer::Iterator i, uint8_t length);
120  virtual void Print (std::ostream& os) const;
122 private:
133  Dot11sMeshCapability m_meshCap;
134  uint8_t m_neighbors;
135  friend bool operator== (const IeConfiguration & a, const IeConfiguration & b);
136 };
137 bool operator== (const IeConfiguration & a, const IeConfiguration & b);
138 bool operator== (const Dot11sMeshCapability & a, const Dot11sMeshCapability & b);
139 std::ostream &operator << (std::ostream &os, const IeConfiguration &config);
140 } // namespace dot11s
141 } // namespace ns3
142 #endif
dot11sAuthenticationProtocol m_APId
virtual void SerializeInformationField(Buffer::Iterator i) const
virtual uint8_t DeserializeInformationField(Buffer::Iterator i, uint8_t length)
dot11sPathSelectionProtocol
See 7.3.2.86.1 in 802.11s draft 3.0.
virtual WifiInformationElementId ElementId() const
Own unique Element ID.
dot11sPathSelectionMetric m_APSMId
iterator in a Buffer instance
Definition: buffer.h:98
dot11sSynchronizationProtocolIdentifier
See 7.3.2.86.4 in 802.11s draft 3.0.
dot11sPathSelectionProtocol m_APSPId
Information element, as defined in 802.11-2007 standardThe IEEE 802.11 standard includes the notion o...
dot11sCongestionControlMode m_CCMId
dot11sPathSelectionMetric
See 7.3.2.86.2 in 802.11s draft 3.0.
virtual void Print(std::ostream &os) const
In addition, a subclass may optionally override the following...
See 7.3.2.86.7 in 802.11s draft 3.0.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:43
dot11sSynchronizationProtocolIdentifier m_SPId
Describes Mesh Configuration Element see 7.3.2.86 of 802.11s draft 3.0.
uint8_t WifiInformationElementId
dot11sAuthenticationProtocol
See 7.3.2.86.5 in 802.11s draft 3.0.
dot11sCongestionControlMode
See 7.3.2.86.3 in 802.11s draft 3.0.
virtual uint8_t GetInformationFieldSize() const