A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
hwmp-tag.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2008,2009 IITP RAS
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Authors: Kirill Andreev <andreev@iitp.ru>
19
* Aleksey Kovalenko <kovalenko@iitp.ru>
20
* Pavel Boyko <boyko@iitp.ru>
21
*/
22
23
#ifndef HWMP_TAG_H
24
#define HWMP_TAG_H
25
26
#include "ns3/tag.h"
27
#include "ns3/object.h"
28
#include "ns3/mac48-address.h"
29
namespace
ns3
{
30
namespace
dot11s {
48
class
HwmpTag
:
public
Tag
49
{
50
public
:
51
HwmpTag
();
52
~HwmpTag
();
57
void
SetAddress
(
Mac48Address
retransmitter);
62
Mac48Address
GetAddress
();
67
void
SetTtl
(uint8_t ttl);
72
uint8_t
GetTtl
();
77
void
SetMetric
(uint32_t metric);
82
uint32_t
GetMetric
();
87
void
SetSeqno
(uint32_t seqno);
92
uint32_t
GetSeqno
();
94
void
DecrementTtl
();
95
100
static
TypeId
GetTypeId
();
101
virtual
TypeId
GetInstanceTypeId
()
const
;
102
virtual
uint32_t
GetSerializedSize
()
const
;
103
virtual
void
Serialize
(
TagBuffer
i)
const
;
104
virtual
void
Deserialize
(
TagBuffer
i);
105
virtual
void
Print
(std::ostream &os)
const
;
106
private
:
107
Mac48Address
m_address
;
108
uint8_t
m_ttl
;
109
uint32_t
m_metric
;
110
uint32_t
m_seqno
;
111
};
112
}
// namespace dot11s
113
}
// namespace ns3
114
#endif
ns3::Mac48Address
an EUI-48 address
Definition:
mac48-address.h:44
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:37
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:49
ns3::dot11s::HwmpTag::SetTtl
void SetTtl(uint8_t ttl)
Set the TTL value.
Definition:
hwmp-tag.cc:51
ns3::dot11s::HwmpTag::GetSeqno
uint32_t GetSeqno()
Get the sequence number.
Definition:
hwmp-tag.cc:81
ns3::dot11s::HwmpTag::SetMetric
void SetMetric(uint32_t metric)
Set the metric value.
Definition:
hwmp-tag.cc:63
ns3::dot11s::HwmpTag::GetSerializedSize
virtual uint32_t GetSerializedSize() const
Definition:
hwmp-tag.cc:108
ns3::dot11s::HwmpTag::SetSeqno
void SetSeqno(uint32_t seqno)
Set sequence number.
Definition:
hwmp-tag.cc:75
ns3::dot11s::HwmpTag::Print
virtual void Print(std::ostream &os) const
Definition:
hwmp-tag.cc:147
ns3::dot11s::HwmpTag::GetAddress
Mac48Address GetAddress()
Get address from tag.
Definition:
hwmp-tag.cc:45
ns3::dot11s::HwmpTag::~HwmpTag
~HwmpTag()
Definition:
hwmp-tag.cc:34
ns3::dot11s::HwmpTag::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
hwmp-tag.cc:91
ns3::dot11s::HwmpTag::Deserialize
virtual void Deserialize(TagBuffer i)
Definition:
hwmp-tag.cc:132
ns3::dot11s::HwmpTag::GetTtl
uint8_t GetTtl()
Get the TTL value.
Definition:
hwmp-tag.cc:57
ns3::dot11s::HwmpTag::m_address
Mac48Address m_address
address
Definition:
hwmp-tag.h:107
ns3::dot11s::HwmpTag::m_ttl
uint8_t m_ttl
TTL.
Definition:
hwmp-tag.h:108
ns3::dot11s::HwmpTag::m_metric
uint32_t m_metric
metric
Definition:
hwmp-tag.h:109
ns3::dot11s::HwmpTag::HwmpTag
HwmpTag()
Definition:
hwmp-tag.cc:29
ns3::dot11s::HwmpTag::GetMetric
uint32_t GetMetric()
Get the metric value.
Definition:
hwmp-tag.cc:69
ns3::dot11s::HwmpTag::SetAddress
void SetAddress(Mac48Address retransmitter)
Set address.
Definition:
hwmp-tag.cc:39
ns3::dot11s::HwmpTag::Serialize
virtual void Serialize(TagBuffer i) const
Definition:
hwmp-tag.cc:117
ns3::dot11s::HwmpTag::m_seqno
uint32_t m_seqno
sequence no
Definition:
hwmp-tag.h:110
ns3::dot11s::HwmpTag::DecrementTtl
void DecrementTtl()
Decrement TTL.
Definition:
hwmp-tag.cc:155
ns3::dot11s::HwmpTag::GetInstanceTypeId
virtual TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
Definition:
hwmp-tag.cc:102
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
mesh
model
dot11s
hwmp-tag.h
Generated on Tue Feb 6 2024 19:21:24 for ns-3 by
1.9.1