A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-mac-trailer.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2006 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7 */
8
9#ifndef WIFI_MAC_TRAILER_H
10#define WIFI_MAC_TRAILER_H
11
12#include "ns3/trailer.h"
13
14namespace ns3
15{
16
17/**
18 * The length in octets of the IEEE 802.11 MAC FCS field
19 */
20static const uint16_t WIFI_MAC_FCS_LENGTH = 4;
21
22/**
23 * \ingroup wifi
24 *
25 * Implements the IEEE 802.11 MAC trailer
26 */
27class WifiMacTrailer : public Trailer
28{
29 public:
31 ~WifiMacTrailer() override;
32
33 /**
34 * \brief Get the type ID.
35 * \return the object TypeId
36 */
37 static TypeId GetTypeId();
38 TypeId GetInstanceTypeId() const override;
39 void Print(std::ostream& os) const override;
40 uint32_t GetSerializedSize() const override;
41 void Serialize(Buffer::Iterator start) const override;
43};
44
45} // namespace ns3
46
47#endif /* WIFI_MAC_TRAILER_H */
iterator in a Buffer instance
Definition buffer.h:89
Protocol trailer serialization and deserialization.
Definition trailer.h:30
a unique identifier for an interface.
Definition type-id.h:48
Implements the IEEE 802.11 MAC trailer.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint32_t Deserialize(Buffer::Iterator start) override
uint32_t GetSerializedSize() const override
void Serialize(Buffer::Iterator start) const override
static TypeId GetTypeId()
Get the type ID.
void Print(std::ostream &os) const override
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static const uint16_t WIFI_MAC_FCS_LENGTH
The length in octets of the IEEE 802.11 MAC FCS field.