A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
hwmp-tag.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008,2009 IITP RAS
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Authors: Kirill Andreev <andreev@iitp.ru>
18
* Aleksey Kovalenko <kovalenko@iitp.ru>
19
* Pavel Boyko <boyko@iitp.ru>
20
*/
21
22
#ifndef HWMP_TAG_H
23
#define HWMP_TAG_H
24
25
#include "ns3/mac48-address.h"
26
#include "ns3/object.h"
27
#include "ns3/tag.h"
28
29
namespace
ns3
30
{
31
namespace
dot11s
32
{
50
class
HwmpTag
:
public
Tag
51
{
52
public
:
53
HwmpTag
();
54
~HwmpTag
()
override
;
59
void
SetAddress
(
Mac48Address
retransmitter);
64
Mac48Address
GetAddress
();
69
void
SetTtl
(uint8_t ttl);
74
uint8_t
GetTtl
()
const
;
79
void
SetMetric
(uint32_t metric);
84
uint32_t
GetMetric
()
const
;
89
void
SetSeqno
(uint32_t seqno);
94
uint32_t
GetSeqno
()
const
;
96
void
DecrementTtl
();
97
102
static
TypeId
GetTypeId
();
103
TypeId
GetInstanceTypeId
()
const override
;
104
uint32_t
GetSerializedSize
()
const override
;
105
void
Serialize
(
TagBuffer
i)
const override
;
106
void
Deserialize
(
TagBuffer
i)
override
;
107
void
Print
(std::ostream& os)
const override
;
108
109
private
:
110
Mac48Address
m_address
;
111
uint8_t
m_ttl
;
112
uint32_t
m_metric
;
113
uint32_t
m_seqno
;
114
};
115
}
// namespace dot11s
116
}
// namespace ns3
117
#endif
ns3::Mac48Address
an EUI-48 address
Definition:
mac48-address.h:46
ns3::TagBuffer
read and write tag data
Definition:
tag-buffer.h:52
ns3::Tag
tag a set of bytes in a packet
Definition:
tag.h:39
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::dot11s::HwmpTag
Hwmp tag implements interaction between HWMP protocol and MeshWifiMac.
Definition:
hwmp-tag.h:51
ns3::dot11s::HwmpTag::SetTtl
void SetTtl(uint8_t ttl)
Set the TTL value.
Definition:
hwmp-tag.cc:55
ns3::dot11s::HwmpTag::GetSeqno
uint32_t GetSeqno() const
Get the sequence number.
Definition:
hwmp-tag.cc:85
ns3::dot11s::HwmpTag::SetMetric
void SetMetric(uint32_t metric)
Set the metric value.
Definition:
hwmp-tag.cc:67
ns3::dot11s::HwmpTag::SetSeqno
void SetSeqno(uint32_t seqno)
Set sequence number.
Definition:
hwmp-tag.cc:79
ns3::dot11s::HwmpTag::GetTtl
uint8_t GetTtl() const
Get the TTL value.
Definition:
hwmp-tag.cc:61
ns3::dot11s::HwmpTag::GetAddress
Mac48Address GetAddress()
Get address from tag.
Definition:
hwmp-tag.cc:49
ns3::dot11s::HwmpTag::~HwmpTag
~HwmpTag() override
Definition:
hwmp-tag.cc:38
ns3::dot11s::HwmpTag::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
hwmp-tag.cc:105
ns3::dot11s::HwmpTag::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
hwmp-tag.cc:95
ns3::dot11s::HwmpTag::Serialize
void Serialize(TagBuffer i) const override
Definition:
hwmp-tag.cc:120
ns3::dot11s::HwmpTag::m_address
Mac48Address m_address
address
Definition:
hwmp-tag.h:110
ns3::dot11s::HwmpTag::m_ttl
uint8_t m_ttl
TTL.
Definition:
hwmp-tag.h:111
ns3::dot11s::HwmpTag::Deserialize
void Deserialize(TagBuffer i) override
Definition:
hwmp-tag.cc:135
ns3::dot11s::HwmpTag::m_metric
uint32_t m_metric
metric
Definition:
hwmp-tag.h:112
ns3::dot11s::HwmpTag::HwmpTag
HwmpTag()
Definition:
hwmp-tag.cc:30
ns3::dot11s::HwmpTag::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
hwmp-tag.cc:111
ns3::dot11s::HwmpTag::Print
void Print(std::ostream &os) const override
Definition:
hwmp-tag.cc:150
ns3::dot11s::HwmpTag::SetAddress
void SetAddress(Mac48Address retransmitter)
Set address.
Definition:
hwmp-tag.cc:43
ns3::dot11s::HwmpTag::m_seqno
uint32_t m_seqno
sequence no
Definition:
hwmp-tag.h:113
ns3::dot11s::HwmpTag::GetMetric
uint32_t GetMetric() const
Get the metric value.
Definition:
hwmp-tag.cc:73
ns3::dot11s::HwmpTag::DecrementTtl
void DecrementTtl()
Decrement TTL.
Definition:
hwmp-tag.cc:159
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
mesh
model
dot11s
hwmp-tag.h
Generated on Sun Mar 3 2024 17:11:04 for ns-3 by
1.9.1