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
15namespace ns3
16{
17
18/**
19 * \ingroup wifi
20 * \brief Headers for A-MSDU subframes
21 */
23{
24 public:
26 ~AmsduSubframeHeader() override;
27
28 /**
29 * \brief Get the type ID.
30 * \return the object TypeId
31 */
32 static TypeId GetTypeId();
33
34 TypeId GetInstanceTypeId() const override;
35 void Print(std::ostream& os) const override;
36 uint32_t GetSerializedSize() const override;
37 void Serialize(Buffer::Iterator start) const override;
39
40 /**
41 * Set destination address function
42 * \param to the destination MAC address
43 */
45 /**
46 * Set source address function
47 * \param to the source MAC address
48 */
50 /**
51 * Set length function
52 * \param length the length in bytes
53 */
54 void SetLength(uint16_t length);
55 /**
56 * Get destination address function
57 * \returns the destination MAC address
58 */
60 /**
61 * Get source address function
62 * \returns the source MAC address
63 */
65 /**
66 * Get length function
67 * \returns the length in bytes
68 */
69 uint16_t GetLength() const;
70
71 private:
72 Mac48Address m_da; ///< destination address
73 Mac48Address m_sa; ///< source address
74 uint16_t m_length; ///< length in bytes
75};
76
77} // namespace ns3
78
79#endif /* AMSDU_SUBFRAME_HEADER_H */
Headers for A-MSDU subframes.
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
void Print(std::ostream &os) const override
iterator in a Buffer instance
Definition buffer.h:89
Protocol header serialization and deserialization.
Definition header.h:33
an EUI-48 address
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.