This documentation is not the
Latest Release
.
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
ie-dot11s-peer-management.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
#ifndef IE_DOT11S_PEER_MANAGEMENT_H
23
#define IE_DOT11S_PEER_MANAGEMENT_H
24
25
#include "ns3/mesh-information-element-vector.h"
26
27
namespace
ns3
{
28
namespace
dot11s {
29
34
enum
PmpReasonCode
35
{
36
REASON11S_PEERING_CANCELLED
= 52,
// according to IEEE 802.11 - 2012
37
REASON11S_MESH_MAX_PEERS
= 53,
38
REASON11S_MESH_CAPABILITY_POLICY_VIOLATION
= 54,
39
REASON11S_MESH_CLOSE_RCVD
= 55,
40
REASON11S_MESH_MAX_RETRIES
= 56,
41
REASON11S_MESH_CONFIRM_TIMEOUT
= 57,
42
REASON11S_MESH_INVALID_GTK
= 58,
43
REASON11S_MESH_INCONSISTENT_PARAMETERS
= 59,
44
REASON11S_MESH_INVALID_SECURITY_CAPABILITY
=60,
45
REASON11S_RESERVED
= 67,
46
};
47
48
49
// according to IEEE 802.11 - 2012
50
51
class
IePeerManagement
:
public
WifiInformationElement
52
{
53
public
:
54
IePeerManagement
();
55
enum
Subtype
56
{
57
PEER_OPEN
= 1,
58
PEER_CONFIRM
= 2,
59
PEER_CLOSE
= 3,
60
};
61
void
SetPeerOpen
(uint16_t localLinkId);
62
void
SetPeerClose
(uint16_t localLinkID, uint16_t peerLinkId,
PmpReasonCode
reasonCode);
63
void
SetPeerConfirm
(uint16_t localLinkID, uint16_t peerLinkId);
64
65
PmpReasonCode
GetReasonCode
()
const
;
66
uint16_t
GetLocalLinkId
()
const
;
67
uint16_t
GetPeerLinkId
()
const
;
68
bool
SubtypeIsOpen
()
const
;
69
bool
SubtypeIsClose
()
const
;
70
bool
SubtypeIsConfirm
()
const
;
71
uint8_t
GetSubtype
()
const
;
72
73
// Inherited from WifiInformationElement
74
virtual
WifiInformationElementId
ElementId
()
const
;
75
virtual
uint8_t
GetInformationFieldSize
(
void
)
const
;
76
virtual
void
SerializeInformationField
(
Buffer::Iterator
i)
const
;
77
virtual
uint8_t
DeserializeInformationField
(
Buffer::Iterator
i, uint8_t length);
78
virtual
void
Print
(std::ostream& os)
const
;
79
80
private
:
81
uint8_t
m_length
;
82
uint8_t
m_subtype
;
83
uint16_t
m_localLinkId
;
87
uint16_t
m_peerLinkId
;
91
PmpReasonCode
m_reasonCode
;
92
friend
bool
operator==
(
const
IePeerManagement
& a,
const
IePeerManagement
& b);
93
};
94
bool
operator==
(
const
IePeerManagement
& a,
const
IePeerManagement
& b);
95
std::ostream &
operator <<
(std::ostream &os,
const
IePeerManagement
&peerMan);
96
}
// namespace dot11s
97
}
// namespace ns3
98
99
#endif
/* IE_DOT11S_PEER_MANAGEMENT_H */
ns3::dot11s::REASON11S_RESERVED
Definition:
ie-dot11s-peer-management.h:45
ns3::dot11s::REASON11S_MESH_INVALID_GTK
Definition:
ie-dot11s-peer-management.h:42
ns3::dot11s::REASON11S_MESH_INVALID_SECURITY_CAPABILITY
Definition:
ie-dot11s-peer-management.h:44
ns3::dot11s::IePeerManagement::GetLocalLinkId
uint16_t GetLocalLinkId() const
Definition:
ie-dot11s-peer-management.cc:71
ns3::dot11s::IePeerManagement::m_reasonCode
PmpReasonCode m_reasonCode
Present only within close frame.
Definition:
ie-dot11s-peer-management.h:91
ns3::dot11s::IePeerManagement::m_length
uint8_t m_length
Definition:
ie-dot11s-peer-management.h:81
ns3::dot11s::REASON11S_MESH_CLOSE_RCVD
Definition:
ie-dot11s-peer-management.h:39
ns3::dot11s::operator==
bool operator==(const MeshHeader &a, const MeshHeader &b)
Definition:
dot11s-mac-header.cc:172
ns3::dot11s::IePeerManagement::ElementId
virtual WifiInformationElementId ElementId() const
Own unique Element ID.
Definition:
ie-dot11s-peer-management.cc:34
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:98
ns3::dot11s::REASON11S_PEERING_CANCELLED
Definition:
ie-dot11s-peer-management.h:36
ns3::dot11s::IePeerManagement::Subtype
Subtype
Definition:
ie-dot11s-peer-management.h:55
ns3::dot11s::IePeerManagement::PEER_OPEN
Definition:
ie-dot11s-peer-management.h:57
ns3::WifiInformationElement
Information element, as defined in 802.11-2007 standardThe IEEE 802.11 standard includes the notion o...
Definition:
wifi-information-element.h:160
ns3::dot11s::IePeerManagement::SubtypeIsOpen
bool SubtypeIsOpen() const
Definition:
ie-dot11s-peer-management.cc:93
ns3::dot11s::IePeerManagement::operator==
friend bool operator==(const IePeerManagement &a, const IePeerManagement &b)
Definition:
ie-dot11s-peer-management.cc:162
ns3::dot11s::IePeerManagement
Definition:
ie-dot11s-peer-management.h:51
ns3::dot11s::IePeerManagement::GetInformationFieldSize
virtual uint8_t GetInformationFieldSize(void) const
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
Definition:
ie-dot11s-peer-management.cc:83
ns3::dot11s::IePeerManagement::GetSubtype
uint8_t GetSubtype() const
Definition:
ie-dot11s-peer-management.cc:88
ns3::dot11s::IePeerManagement::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-peer-management.cc:123
ns3::dot11s::IePeerManagement::SetPeerClose
void SetPeerClose(uint16_t localLinkID, uint16_t peerLinkId, PmpReasonCode reasonCode)
Definition:
ie-dot11s-peer-management.cc:46
ns3::dot11s::IePeerManagement::Print
virtual void Print(std::ostream &os) const
Generate human-readable form of IE.
Definition:
ie-dot11s-peer-management.cc:152
ns3::dot11s::IePeerManagement::m_subtype
uint8_t m_subtype
Definition:
ie-dot11s-peer-management.h:82
ns3::dot11s::IePeerManagement::m_peerLinkId
uint16_t m_peerLinkId
Present within confirm and may be present in close.
Definition:
ie-dot11s-peer-management.h:87
ns3::dot11s::IePeerManagement::m_localLinkId
uint16_t m_localLinkId
Definition:
ie-dot11s-peer-management.h:83
ns3::dot11s::IePeerManagement::IePeerManagement
IePeerManagement()
Definition:
ie-dot11s-peer-management.cc:29
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::dot11s::IePeerManagement::GetPeerLinkId
uint16_t GetPeerLinkId() const
Definition:
ie-dot11s-peer-management.cc:77
ns3::dot11s::REASON11S_MESH_CONFIRM_TIMEOUT
Definition:
ie-dot11s-peer-management.h:41
ns3::dot11s::REASON11S_MESH_INCONSISTENT_PARAMETERS
Definition:
ie-dot11s-peer-management.h:43
ns3::dot11s::REASON11S_MESH_MAX_RETRIES
Definition:
ie-dot11s-peer-management.h:40
ns3::dot11s::IePeerManagement::SetPeerConfirm
void SetPeerConfirm(uint16_t localLinkID, uint16_t peerLinkId)
Definition:
ie-dot11s-peer-management.cc:56
ns3::dot11s::IePeerManagement::SubtypeIsClose
bool SubtypeIsClose() const
Definition:
ie-dot11s-peer-management.cc:98
ns3::dot11s::PmpReasonCode
PmpReasonCode
Codes used by 802.11s Peer Management Protocol.
Definition:
ie-dot11s-peer-management.h:34
ns3::dot11s::REASON11S_MESH_MAX_PEERS
Definition:
ie-dot11s-peer-management.h:37
ns3::dot11s::IePeerManagement::SetPeerOpen
void SetPeerOpen(uint16_t localLinkId)
Definition:
ie-dot11s-peer-management.cc:39
ns3::WifiInformationElementId
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
Definition:
wifi-information-element.h:41
ns3::dot11s::IePeerManagement::PEER_CONFIRM
Definition:
ie-dot11s-peer-management.h:58
ns3::dot11s::operator<<
std::ostream & operator<<(std::ostream &os, const IeBeaconTiming &a)
Definition:
ie-dot11s-beacon-timing.cc:215
ns3::dot11s::IePeerManagement::GetReasonCode
PmpReasonCode GetReasonCode() const
Definition:
ie-dot11s-peer-management.cc:65
ns3::dot11s::IePeerManagement::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-peer-management.cc:109
ns3::dot11s::IePeerManagement::PEER_CLOSE
Definition:
ie-dot11s-peer-management.h:59
ns3::dot11s::REASON11S_MESH_CAPABILITY_POLICY_VIOLATION
Definition:
ie-dot11s-peer-management.h:38
ns3::dot11s::IePeerManagement::SubtypeIsConfirm
bool SubtypeIsConfirm() const
Definition:
ie-dot11s-peer-management.cc:103
src
mesh
model
dot11s
ie-dot11s-peer-management.h
Generated on Wed Nov 11 2015 20:00:42 for ns-3 by
1.8.9.1