A Discrete-Event Network Simulator
API
peer-link-frame.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 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  */
20 
21 #ifndef PEER_LINK_FRAME_START_H
22 #define PEER_LINK_FRAME_START_H
23 #include "ns3/header.h"
24 #include "ns3/supported-rates.h"
25 #include "dot11s-mac-header.h"
28 #include "ie-dot11s-id.h"
29 namespace ns3
30 {
31 namespace dot11s
32 {
44 class PeerLinkOpenStart : public Header
45 {
46 public:
50  {
51  IePeeringProtocol protocol; //Peering protocol version - 3 octets
52  uint16_t capability; //open and confirm
53  SupportedRates rates; //open and confirm
54  IeMeshId meshId; //open and close
55  IeConfiguration config; //open and confirm
56  };
59 
60  // Inherited from header:
61  static TypeId GetTypeId ();
62  virtual TypeId GetInstanceTypeId () const;
63  virtual void Print (std::ostream &os) const;
64  virtual uint32_t GetSerializedSize () const;
65  virtual void Serialize (Buffer::Iterator start) const;
66  virtual uint32_t Deserialize (Buffer::Iterator start);
67 
68 private:
69  uint16_t m_capability;
73 
74  friend bool operator== (const PeerLinkOpenStart & a, const PeerLinkOpenStart & b);
75 
78 
79 };
80 
81 bool operator== (const PeerLinkOpenStart & a, const PeerLinkOpenStart & b);
82 
91 class PeerLinkCloseStart : public Header
92 {
93 public:
97  {
98  IePeeringProtocol protocol; //Peering protocol version - 3 octets
99  IeMeshId meshId; //open and close
100  };
103 
104  // Inherited from header:
105  static TypeId GetTypeId ();
106  virtual TypeId GetInstanceTypeId () const;
107  virtual void Print (std::ostream &os) const;
108  virtual uint32_t GetSerializedSize () const;
109  virtual void Serialize (Buffer::Iterator start) const;
110  virtual uint32_t Deserialize (Buffer::Iterator start);
111 
112 private:
114 
115  friend bool operator== (const PeerLinkCloseStart & a, const PeerLinkCloseStart & b);
116 
119 
120 };
121 bool operator== (const PeerLinkCloseStart & a, const PeerLinkCloseStart & b);
122 
134 {
135 public:
139  {
140  IePeeringProtocol protocol; //Peering protocol version - 3 octets
141  uint16_t capability; //open and confirm
142  uint16_t aid; //confirm only
143  SupportedRates rates; //open and confirm
144  IeConfiguration config; //open and confirm
145  };
148 
149  // Inherited from header:
150  static TypeId GetTypeId ();
151  virtual TypeId GetInstanceTypeId () const;
152  virtual void Print (std::ostream &os) const;
153  virtual uint32_t GetSerializedSize () const;
154  virtual void Serialize (Buffer::Iterator start) const;
155  virtual uint32_t Deserialize (Buffer::Iterator start);
156 
157 private:
158  uint16_t m_capability;
159  uint16_t m_aid;
162 
163  friend bool operator== (const PeerLinkConfirmStart & a, const PeerLinkConfirmStart & b);
164 
167 
168 };
169 bool operator== (const PeerLinkConfirmStart & a, const PeerLinkConfirmStart & b);
170 } // namespace dot11s
171 } // namespace ns3
172 #endif
Protocol header serialization and deserialization.
Definition: header.h:42
def start()
Definition: core.py:1482
a IEEE 802.11s Mesh ID 7.3.287 of 802.11s draft 3.0
Definition: ie-dot11s-id.h:34
The Supported Rates Information ElementThis class knows how to serialise and deserialise the Supporte...
bool operator==(const MeshHeader &a, const MeshHeader &b)
iterator in a Buffer instance
Definition: buffer.h:98
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Describes Mesh Configuration Element see 7.3.2.86 of 802.11s draft 3.0.
a unique identifier for an interface.
Definition: type-id.h:58