A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 {
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;
84  uint16_t GetUint16 () const;
88  bool forwarding;
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 ();
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:
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
friend bool operator==(const IeConfiguration &a, const IeConfiguration &b)
dot11sAuthenticationProtocol m_APId
Auth protocol 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) ...
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) ...
dot11sPathSelectionProtocol
See 7.3.2.86.1 in 802.11s draft 3.0.
virtual WifiInformationElementId ElementId() const
Own unique Element ID.
Buffer::Iterator Serialize(Buffer::Iterator i) const
dot11sPathSelectionMetric m_APSMId
Active Path Metric ID.
bool operator==(const MeshHeader &a, const MeshHeader &b)
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
Active Path Selection Protocol ID.
Information element, as defined in 802.11-2007 standardThe IEEE 802.11 standard includes the notion o...
dot11sCongestionControlMode m_CCMId
Congestion Control Mode ID.
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.
bool Is(uint16_t cap, uint8_t n) const
Dot11sMeshCapability const & MeshCapability()
void SetMetric(dot11sPathSelectionMetric metricId)
friend bool operator==(const Dot11sMeshCapability &a, const Dot11sMeshCapability &b)
dot11sSynchronizationProtocolIdentifier m_SPId
Sync protocol ID.
Describes Mesh Configuration Element see 7.3.2.86 of 802.11s draft 3.0.
void SetNeighborCount(uint8_t neighbors)
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
dot11sAuthenticationProtocol
See 7.3.2.86.5 in 802.11s draft 3.0.
Buffer::Iterator Deserialize(Buffer::Iterator i)
std::ostream & operator<<(std::ostream &os, const IeBeaconTiming &a)
void SetRouting(dot11sPathSelectionProtocol routingId)
dot11sCongestionControlMode
See 7.3.2.86.3 in 802.11s draft 3.0.
virtual uint8_t GetInformationFieldSize() const
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...