A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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 {
34
enum
dot11sPathSelectionProtocol
35
{
36
PROTOCOL_HWMP
= 0x000fac00,
37
};
42
enum
dot11sPathSelectionMetric
43
{
44
METRIC_AIRTIME
= 0x000fac00,
45
};
50
enum
dot11sCongestionControlMode
51
{
52
CONGESTION_SIGNALING
= 0x000fac00,
53
CONGESTION_NULL
= 0x000facff,
54
};
59
enum
dot11sSynchronizationProtocolIdentifier
60
{
61
SYNC_NEIGHBOUR_OFFSET
= 0x000fac00,
62
SYNC_NULL
= 0x000facff,
63
};
68
enum
dot11sAuthenticationProtocol
69
{
70
AUTH_NULL
= 0x000fac00,
71
AUTH_SAE
= 0x000fac01,
72
};
77
class
Dot11sMeshCapability
78
{
79
public
:
80
Dot11sMeshCapability
();
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
101
class
IeConfiguration
:
public
WifiInformationElement
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
:
124
dot11sPathSelectionProtocol
m_APSPId
;
126
dot11sPathSelectionMetric
m_APSMId
;
128
dot11sCongestionControlMode
m_CCMId
;
130
dot11sSynchronizationProtocolIdentifier
m_SPId
;
132
dot11sAuthenticationProtocol
m_APId
;
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
src
mesh
model
dot11s
ie-dot11s-configuration.h
Generated on Tue May 14 2013 11:08:28 for ns-3 by
1.8.1.2