A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ie-dot11s-perr.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 PERR_INFORMATION_ELEMENT_H
10#define PERR_INFORMATION_ELEMENT_H
11
12#include "hwmp-protocol.h"
13
14#include "ns3/mac48-address.h"
15#include "ns3/mesh-information-element-vector.h"
16
17namespace ns3
18{
19namespace dot11s
20{
21/**
22 * \ingroup dot11s
23 * \brief See 7.3.2.98 of 802.11s draft 2.07
24 */
26{
27 public:
28 IePerr();
29 ~IePerr() override;
30 /**
31 * Get number of destination function
32 * \returns the number of destinations
33 */
34 uint8_t GetNumOfDest() const;
35 /**
36 * Add address unit function
37 * \param unit the address of the failed destination
38 */
40 /**
41 * Is full function
42 * \returns true if full
43 */
44 bool IsFull() const;
45 /**
46 * Get address unit vector function
47 * \returns the list of failed destinations
48 */
49 std::vector<HwmpProtocol::FailedDestination> GetAddressUnitVector() const;
50 /**
51 * Delete address unit function
52 * \param address the MAC address of the deleted unit
53 */
54 void DeleteAddressUnit(Mac48Address address);
55 /// Reset PERR
56 void ResetPerr();
57
58 // Inherited from WifiInformationElement
59 WifiInformationElementId ElementId() const override;
60 void SerializeInformationField(Buffer::Iterator i) const override;
61 uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override;
62 void Print(std::ostream& os) const override;
63 uint16_t GetInformationFieldSize() const override;
64
65 private:
66 std::vector<HwmpProtocol::FailedDestination> m_addressUnits; ///< address units
67 /**
68 * equality operator
69 *
70 * \param a lhs
71 * \param b rhs
72 * \returns true if equal
73 */
74 friend bool operator==(const IePerr& a, const IePerr& b);
75};
76
77bool operator==(const IePerr& a, const IePerr& b);
78std::ostream& operator<<(std::ostream& os, const IePerr& perr);
79} // namespace dot11s
80} // namespace ns3
81#endif
iterator in a Buffer instance
Definition buffer.h:89
an EUI-48 address
Information element, as defined in 802.11-2007 standard.
See 7.3.2.98 of 802.11s draft 2.07.
void Print(std::ostream &os) const override
Generate human-readable form of IE.
void SerializeInformationField(Buffer::Iterator i) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
void DeleteAddressUnit(Mac48Address address)
Delete address unit function.
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)
bool IsFull() const
Is full function.
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
friend bool operator==(const IePerr &a, const IePerr &b)
equality operator
void ResetPerr()
Reset PERR.
void AddAddressUnit(HwmpProtocol::FailedDestination unit)
Add address unit function.
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
uint8_t GetNumOfDest() const
Get number of destination function.
std::vector< HwmpProtocol::FailedDestination > GetAddressUnitVector() const
Get address unit vector function.
std::vector< HwmpProtocol::FailedDestination > m_addressUnits
address units
bool operator==(const MeshHeader &a, const MeshHeader &b)
std::ostream & operator<<(std::ostream &os, const IeBeaconTiming &a)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
structure of unreachable destination - address and sequence number