A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
amsdu-subframe-header.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009 MIRKO BANCHI
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Mirko Banchi <mk.banchi@gmail.com>
7 */
8
9#ifndef AMSDU_SUBFRAME_HEADER_H
10#define AMSDU_SUBFRAME_HEADER_H
11
12#include "ns3/header.h"
13#include "ns3/mac48-address.h"
14#include "ns3/wifi-export.h"
15
16namespace ns3
17{
18
19/**
20 * @ingroup wifi
21 * @brief Headers for A-MSDU subframes
22 */
23class WIFI_EXPORT AmsduSubframeHeader : public Header
24{
25 public:
27 ~AmsduSubframeHeader() override;
28
29 /**
30 * @brief Get the type ID.
31 * @return the object TypeId
32 */
33 static TypeId GetTypeId();
34
35 TypeId GetInstanceTypeId() const override;
36 void Print(std::ostream& os) const override;
37 uint32_t GetSerializedSize() const override;
38 void Serialize(Buffer::Iterator start) const override;
40
41 /**
42 * Set destination address function
43 * @param to the destination MAC address
44 */
46 /**
47 * Set source address function
48 * @param to the source MAC address
49 */
51 /**
52 * Set length function
53 * @param length the length in bytes
54 */
55 void SetLength(uint16_t length);
56 /**
57 * Get destination address function
58 * @returns the destination MAC address
59 */
61 /**
62 * Get source address function
63 * @returns the source MAC address
64 */
66 /**
67 * Get length function
68 * @returns the length in bytes
69 */
70 uint16_t GetLength() const;
71
72 private:
73 Mac48Address m_da; ///< destination address
74 Mac48Address m_sa; ///< source address
75 uint16_t m_length; ///< length in bytes
76};
77
78} // namespace ns3
79
80#endif /* AMSDU_SUBFRAME_HEADER_H */
static TypeId GetTypeId()
Get the type ID.
uint32_t GetSerializedSize() const override
void SetSourceAddr(Mac48Address to)
Set source address function.
Mac48Address GetSourceAddr() const
Get source address function.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void SetDestinationAddr(Mac48Address to)
Set destination address function.
Mac48Address m_sa
source address
void Serialize(Buffer::Iterator start) const override
uint16_t m_length
length in bytes
Mac48Address m_da
destination address
void SetLength(uint16_t length)
Set length function.
Mac48Address GetDestinationAddr() const
Get destination address function.
uint16_t GetLength() const
Get length function.
uint32_t Deserialize(Buffer::Iterator start) override
iterator in a Buffer instance
Definition buffer.h:109
Protocol header serialization and deserialization.
Definition header.h:36
an EUI-48 address
a unique identifier for an interface.
Definition type-id.h:50
void Print(ComponentCarrier cc)
Every class exported by the ns3 library is enclosed in the ns3 namespace.