A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ie-dot11s-peering-protocol.cc
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 * Authors: Kirill Andreev <andreev@iitp.ru>
7 */
8
10
11namespace ns3
12{
13namespace dot11s
14{
15uint16_t
17{
18 return 1;
19}
20
22 : m_protocol(0)
23{
24}
25
31
32void
37
38uint16_t
40{
41 Buffer::Iterator start = i;
42 m_protocol = i.ReadU8();
43 return i.GetDistanceFrom(start);
44}
45
46void
47IePeeringProtocol::Print(std::ostream& os) const
48{
49 os << "PeeringProtocol=(peering protocol=" << m_protocol << ")";
50}
51
52std::ostream&
53operator<<(std::ostream& os, const IePeeringProtocol& a)
54{
55 a.Print(os);
56 return os;
57}
58} // namespace dot11s
59} // namespace ns3
iterator in a Buffer instance
Definition buffer.h:89
void WriteU8(uint8_t data)
Definition buffer.h:870
uint32_t GetDistanceFrom(const Iterator &o) const
Definition buffer.cc:769
Mesh Peering Protocol Identifier information element Note that it does not permit to set any value be...
void SerializeInformationField(Buffer::Iterator i) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
uint16_t DeserializeInformationField(Buffer::Iterator i, uint16_t length) override
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
void Print(std::ostream &os) const override
Generate human-readable form of IE.
#define IE11S_MESH_PEERING_PROTOCOL_VERSION
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.