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
gcr-group-address.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2023 Universita' degli Studi di Napoli Federico II
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Stefano Avallone <stavallo@unina.it>
7
*/
8
9
#include "
gcr-group-address.h
"
10
11
#include "ns3/address-utils.h"
12
13
namespace
ns3
14
{
15
16
void
17
GcrGroupAddress::Print
(std::ostream& os)
const
18
{
19
os <<
"gcrGroupAddress="
<<
m_gcrGroupAddress
;
20
}
21
22
WifiInformationElementId
23
GcrGroupAddress::ElementId
()
const
24
{
25
return
IE_GCR_GROUP_ADDRESS
;
26
}
27
28
uint16_t
29
GcrGroupAddress::GetInformationFieldSize
()
const
30
{
31
return
6;
// GCR Group Address field
32
}
33
34
void
35
GcrGroupAddress::SerializeInformationField
(
Buffer::Iterator
start)
const
36
{
37
WriteTo
(start,
m_gcrGroupAddress
);
38
}
39
40
uint16_t
41
GcrGroupAddress::DeserializeInformationField
(
Buffer::Iterator
start, uint16_t length)
42
{
43
ReadFrom
(start,
m_gcrGroupAddress
);
44
return
6;
45
}
46
47
}
// namespace ns3
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::GcrGroupAddress::ElementId
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
Definition
gcr-group-address.cc:23
ns3::GcrGroupAddress::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
gcr-group-address.cc:41
ns3::GcrGroupAddress::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
gcr-group-address.cc:35
ns3::GcrGroupAddress::m_gcrGroupAddress
Mac48Address m_gcrGroupAddress
GCR Group Address field.
Definition
gcr-group-address.h:32
ns3::GcrGroupAddress::Print
void Print(std::ostream &os) const override
Generate human-readable form of IE.
Definition
gcr-group-address.cc:17
ns3::GcrGroupAddress::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
gcr-group-address.cc:29
gcr-group-address.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WriteTo
void WriteTo(Buffer::Iterator &i, Ipv4Address ad)
Write an Ipv4Address to a Buffer.
Definition
address-utils.cc:21
ns3::WifiInformationElementId
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
Definition
wifi-information-element.h:34
ns3::ReadFrom
void ReadFrom(Buffer::Iterator &i, Ipv4Address &ad)
Read an Ipv4Address from a Buffer.
Definition
address-utils.cc:74
IE_GCR_GROUP_ADDRESS
#define IE_GCR_GROUP_ADDRESS
Definition
wifi-information-element.h:207
src
wifi
model
gcr-group-address.cc
Generated on Tue Jan 21 2025 09:20:54 for ns-3 by
1.11.0