A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ();
53  void SetAddress (Mac48Address retransmitter);
55  void SetTtl (uint8_t ttl);
56  uint8_t GetTtl ();
57  void SetMetric (uint32_t metric);
58  uint32_t GetMetric ();
59  void SetSeqno (uint32_t seqno);
60  uint32_t GetSeqno ();
61  void DecrementTtl ();
62 
63  static TypeId GetTypeId ();
64  virtual TypeId GetInstanceTypeId () const;
65  virtual uint32_t GetSerializedSize () const;
66  virtual void Serialize (TagBuffer i) const;
67  virtual void Deserialize (TagBuffer i);
68  virtual void Print (std::ostream &os) const;
69 private:
71  uint8_t m_ttl;
72  uint32_t m_metric;
73  uint32_t m_seqno;
74 };
75 } // namespace dot11s
76 } // namespace ns3
77 #endif
virtual uint32_t GetSerializedSize() const
Definition: hwmp-tag.cc:100
Hwmp tag implements interaction between HWMP protocol and MeshWifiMac.
Definition: hwmp-tag.h:48
virtual TypeId GetInstanceTypeId() const
Definition: hwmp-tag.cc:94
static TypeId GetTypeId()
Definition: hwmp-tag.cc:87
uint32_t GetSeqno()
Definition: hwmp-tag.cc:81
void SetTtl(uint8_t ttl)
Definition: hwmp-tag.cc:51
void SetAddress(Mac48Address retransmitter)
Definition: hwmp-tag.cc:39
Mac48Address GetAddress()
Definition: hwmp-tag.cc:45
tag a set of bytes in a packet
Definition: tag.h:36
an EUI-48 address
Definition: mac48-address.h:41
void SetMetric(uint32_t metric)
Definition: hwmp-tag.cc:63
virtual void Print(std::ostream &os) const
Definition: hwmp-tag.cc:139
uint8_t GetTtl()
Definition: hwmp-tag.cc:57
read and write tag data
Definition: tag-buffer.h:51
Mac48Address m_address
Definition: hwmp-tag.h:70
uint32_t GetMetric()
Definition: hwmp-tag.cc:69
virtual void Serialize(TagBuffer i) const
Definition: hwmp-tag.cc:109
uint32_t m_metric
Definition: hwmp-tag.h:72
uint32_t m_seqno
Definition: hwmp-tag.h:73
void SetSeqno(uint32_t seqno)
Definition: hwmp-tag.cc:75
virtual void Deserialize(TagBuffer i)
Definition: hwmp-tag.cc:124
a unique identifier for an interface.
Definition: type-id.h:49