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