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 class MeshWifiInterfaceMac;
32 namespace dot11s
33 {
45 class PeerLinkFrameStart : public Header
46 {
47 public:
51  {
52  uint8_t subtype;
53  IePeeringProtocol protocol; //Peering protocol version - in all subtypes - 3 octets
54  uint16_t capability; //open and confirm
55  uint16_t aid; //confirm only
56  SupportedRates rates; //open and confirm
57  IeMeshId meshId; //open and close
58  IeConfiguration config; //open and confirm
59  uint16_t reasonCode; //close only
60  };
62  //action header knows about subtype
63  void SetPlinkFrameSubtype (uint8_t subtype);
66 
67  // Inherited from header:
68  static TypeId GetTypeId ();
69  virtual TypeId GetInstanceTypeId () const;
70  virtual void Print (std::ostream &os) const;
71  virtual uint32_t GetSerializedSize () const;
72  virtual void Serialize (Buffer::Iterator start) const;
73  virtual uint32_t Deserialize (Buffer::Iterator start);
74 
75 private:
76  uint8_t m_subtype;
78  uint16_t m_capability;
79  uint16_t m_aid;
83  uint16_t m_reasonCode;
84 
85  friend bool operator== (const PeerLinkFrameStart & a, const PeerLinkFrameStart & b);
86 
89 
90 };
91 bool operator== (const PeerLinkFrameStart & a, const PeerLinkFrameStart & b);
92 } // namespace dot11s
93 } // namespace ns3
94 #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:57