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
ssid.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2006 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7
*/
8
9
#ifndef SSID_H
10
#define SSID_H
11
12
#include "
wifi-information-element.h
"
13
14
namespace
ns3
15
{
16
17
/**
18
* \ingroup wifi
19
*
20
* The IEEE 802.11 SSID Information Element
21
*
22
* \see attribute_Ssid
23
*/
24
class
Ssid
:
public
WifiInformationElement
25
{
26
public
:
27
/**
28
* Create SSID with broadcast SSID
29
*/
30
Ssid
();
31
/**
32
* Create SSID from a given string
33
*
34
* \param s SSID in string
35
*/
36
Ssid
(std::string s);
37
38
// Implementations of pure virtual methods of WifiInformationElement
39
WifiInformationElementId
ElementId
()
const override
;
40
void
Print
(std::ostream& os)
const override
;
41
42
/**
43
* Check if the two SSIDs are equal.
44
*
45
* \param o SSID to compare to
46
*
47
* \return true if the two SSIDs are equal,
48
* false otherwise
49
*/
50
bool
IsEqual
(
const
Ssid
& o)
const
;
51
/**
52
* Check if the SSID is broadcast.
53
*
54
* \return true if the SSID is broadcast,
55
* false otherwise
56
*/
57
bool
IsBroadcast
()
const
;
58
59
/**
60
* Peek the SSID.
61
*
62
* \return a pointer to SSID string
63
*/
64
char
*
PeekString
()
const
;
65
66
private
:
67
uint16_t
GetInformationFieldSize
()
const override
;
68
void
SerializeInformationField
(
Buffer::Iterator
start)
const override
;
69
uint16_t
DeserializeInformationField
(
Buffer::Iterator
start, uint16_t length)
override
;
70
71
uint8_t
m_ssid
[33];
//!< Raw SSID value
72
uint8_t
m_length
;
//!< Length of the SSID
73
};
74
75
/**
76
* Serialize from the given istream to this SSID.
77
*
78
* \param is the input stream
79
* \param ssid the SSID
80
*
81
* \return std::istream
82
*/
83
std::istream&
operator>>
(std::istream& is,
Ssid
& ssid);
84
85
ATTRIBUTE_HELPER_HEADER
(
Ssid
);
86
87
}
// namespace ns3
88
89
#endif
/* SSID_H */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::Ssid
The IEEE 802.11 SSID Information Element.
Definition
ssid.h:25
ns3::Ssid::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
ssid.cc:81
ns3::Ssid::IsEqual
bool IsEqual(const Ssid &o) const
Check if the two SSIDs are equal.
Definition
ssid.cc:50
ns3::Ssid::m_length
uint8_t m_length
Length of the SSID.
Definition
ssid.h:72
ns3::Ssid::ElementId
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
Definition
ssid.cc:75
ns3::Ssid::PeekString
char * PeekString() const
Peek the SSID.
Definition
ssid.cc:67
ns3::Ssid::IsBroadcast
bool IsBroadcast() const
Check if the SSID is broadcast.
Definition
ssid.cc:61
ns3::Ssid::Print
void Print(std::ostream &os) const override
Generate human-readable form of IE.
Definition
ssid.cc:44
ns3::Ssid::m_ssid
uint8_t m_ssid[33]
Raw SSID value.
Definition
ssid.h:71
ns3::Ssid::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
ssid.cc:94
ns3::Ssid::Ssid
Ssid()
Create SSID with broadcast SSID.
Definition
ssid.cc:14
ns3::Ssid::SerializeInformationField
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
Definition
ssid.cc:87
ns3::WifiInformationElement
Information element, as defined in 802.11-2007 standard.
Definition
wifi-information-element.h:278
ATTRIBUTE_HELPER_HEADER
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type
Definition
attribute-helper.h:397
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::operator>>
std::istream & operator>>(std::istream &is, Angles &a)
Definition
angles.cc:172
ns3::WifiInformationElementId
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
Definition
wifi-information-element.h:34
wifi-information-element.h
src
wifi
model
ssid.h
Generated on Fri Nov 8 2024 13:59:08 for ns-3 by
1.11.0