A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
ie-dot11s-id.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008,2009 IITP RAS
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Kirill Andreev <andreev@iitp.ru>
7
*/
8
9
#ifndef MESH_ID_H
10
#define MESH_ID_H
11
12
#include "ns3/buffer.h"
13
#include "ns3/mesh-information-element-vector.h"
14
15
#include <stdint.h>
16
17
namespace
ns3
18
{
19
namespace
dot11s
20
{
21
22
/**
23
* \brief a IEEE 802.11 Mesh ID element (Section 8.4.2.101 of IEEE 802.11-2012)
24
*/
25
class
IeMeshId
:
public
WifiInformationElement
26
{
27
public
:
28
// broadcast meshId
29
IeMeshId
();
30
/**
31
* Constructor
32
*
33
* \param s reference id
34
*/
35
IeMeshId
(std::string s);
36
37
/**
38
* Equality test
39
* \param o another IeMeshId
40
* \returns true if equal
41
*/
42
bool
IsEqual
(
const
IeMeshId
& o)
const
;
43
/**
44
* Return true if broadcast (if first octet of Mesh ID is zero)
45
* \returns true if broadcast
46
*/
47
bool
IsBroadcast
()
const
;
48
// uint32_t GetLength () const;
49
/**
50
* Peek the IeMeshId as a string value
51
* \returns the mesh ID as a string
52
*/
53
char
*
PeekString
()
const
;
54
55
// Inherited from WifiInformationElement
56
WifiInformationElementId
ElementId
()
const override
;
57
void
SerializeInformationField
(
Buffer::Iterator
i)
const override
;
58
uint16_t
DeserializeInformationField
(
Buffer::Iterator
start, uint16_t length)
override
;
59
void
Print
(std::ostream& os)
const override
;
60
uint16_t
GetInformationFieldSize
()
const override
;
61
62
private
:
63
uint8_t
m_meshId
[33];
///< mesh ID
64
/**
65
* equality operator
66
*
67
* \param a lhs
68
* \param b lhs
69
* \returns true if equal
70
*/
71
friend
bool
operator==
(
const
IeMeshId
& a,
const
IeMeshId
& b);
72
};
73
74
/**
75
* \brief Stream insertion operator.
76
*
77
* \param [in] os The reference to the output stream.
78
* \param [in] meshId The IeMeshId object.
79
* \returns The reference to the output stream.
80
*/
81
std::ostream&
operator<<
(std::ostream& os,
const
IeMeshId
& meshId);
82
83
}
// namespace dot11s
84
}
// namespace ns3
85
#endif
/* MESH_ID_H */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::WifiInformationElement
Information element, as defined in 802.11-2007 standard.
Definition
wifi-information-element.h:278
ns3::dot11s::IeMeshId
a IEEE 802.11 Mesh ID element (Section 8.4.2.101 of IEEE 802.11-2012)
Definition
ie-dot11s-id.h:26
ns3::dot11s::IeMeshId::ElementId
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
Definition
ie-dot11s-id.cc:46
ns3::dot11s::IeMeshId::GetInformationFieldSize
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
Definition
ie-dot11s-id.cc:75
ns3::dot11s::IeMeshId::IeMeshId
IeMeshId()
Definition
ie-dot11s-id.cc:18
ns3::dot11s::IeMeshId::IsBroadcast
bool IsBroadcast() const
Return true if broadcast (if first octet of Mesh ID is zero)
Definition
ie-dot11s-id.cc:63
ns3::dot11s::IeMeshId::Print
void Print(std::ostream &os) const override
Generate human-readable form of IE.
Definition
ie-dot11s-id.cc:108
ns3::dot11s::IeMeshId::IsEqual
bool IsEqual(const IeMeshId &o) const
Equality test.
Definition
ie-dot11s-id.cc:52
ns3::dot11s::IeMeshId::operator==
friend bool operator==(const IeMeshId &a, const IeMeshId &b)
equality operator
Definition
ie-dot11s-id.cc:114
ns3::dot11s::IeMeshId::m_meshId
uint8_t m_meshId[33]
mesh ID
Definition
ie-dot11s-id.h:63
ns3::dot11s::IeMeshId::SerializeInformationField
void SerializeInformationField(Buffer::Iterator i) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
Definition
ie-dot11s-id.cc:87
ns3::dot11s::IeMeshId::DeserializeInformationField
uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
Definition
ie-dot11s-id.cc:98
ns3::dot11s::IeMeshId::PeekString
char * PeekString() const
Peek the IeMeshId as a string value.
Definition
ie-dot11s-id.cc:69
ns3::dot11s::operator<<
std::ostream & operator<<(std::ostream &os, const IeBeaconTiming &a)
Definition
ie-dot11s-beacon-timing.cc:231
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WifiInformationElementId
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
Definition
wifi-information-element.h:34
src
mesh
model
dot11s
ie-dot11s-id.h
Generated on Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0