A Discrete-Event Network Simulator
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"
29namespace ns3 {
30namespace dot11s {
48class HwmpTag : public Tag
49{
50public:
51 HwmpTag ();
52 ~HwmpTag ();
57 void SetAddress (Mac48Address retransmitter);
67 void SetTtl (uint8_t ttl);
72 uint8_t GetTtl ();
77 void SetMetric (uint32_t metric);
87 void SetSeqno (uint32_t seqno);
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;
106private:
108 uint8_t m_ttl;
111};
112} // namespace dot11s
113} // namespace ns3
114#endif
an EUI-48 address
Definition: mac48-address.h:44
read and write tag data
Definition: tag-buffer.h:52
tag a set of bytes in a packet
Definition: tag.h:37
a unique identifier for an interface.
Definition: type-id.h:59
Hwmp tag implements interaction between HWMP protocol and MeshWifiMac.
Definition: hwmp-tag.h:49
void SetTtl(uint8_t ttl)
Set the TTL value.
Definition: hwmp-tag.cc:51
uint32_t GetSeqno()
Get the sequence number.
Definition: hwmp-tag.cc:81
void SetMetric(uint32_t metric)
Set the metric value.
Definition: hwmp-tag.cc:63
virtual uint32_t GetSerializedSize() const
Definition: hwmp-tag.cc:108
void SetSeqno(uint32_t seqno)
Set sequence number.
Definition: hwmp-tag.cc:75
virtual void Print(std::ostream &os) const
Definition: hwmp-tag.cc:147
Mac48Address GetAddress()
Get address from tag.
Definition: hwmp-tag.cc:45
static TypeId GetTypeId()
Get the type ID.
Definition: hwmp-tag.cc:91
virtual void Deserialize(TagBuffer i)
Definition: hwmp-tag.cc:132
uint8_t GetTtl()
Get the TTL value.
Definition: hwmp-tag.cc:57
Mac48Address m_address
address
Definition: hwmp-tag.h:107
uint8_t m_ttl
TTL.
Definition: hwmp-tag.h:108
uint32_t m_metric
metric
Definition: hwmp-tag.h:109
uint32_t GetMetric()
Get the metric value.
Definition: hwmp-tag.cc:69
void SetAddress(Mac48Address retransmitter)
Set address.
Definition: hwmp-tag.cc:39
virtual void Serialize(TagBuffer i) const
Definition: hwmp-tag.cc:117
uint32_t m_seqno
sequence no
Definition: hwmp-tag.h:110
void DecrementTtl()
Decrement TTL.
Definition: hwmp-tag.cc:155
virtual TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
Definition: hwmp-tag.cc:102
Every class exported by the ns3 library is enclosed in the ns3 namespace.