A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
peer-link-frame.h
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"
26 #include "ie-dot11s-configuration.h"
27 #include "ie-dot11s-peering-protocol.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);
64  void SetPlinkFrameStart (PlinkFrameStartFields);
65  PlinkFrameStartFields GetFields () const;
69  static TypeId GetTypeId ();
70  virtual TypeId GetInstanceTypeId () const;
71  virtual void Print (std::ostream &os) const;
72  virtual uint32_t GetSerializedSize () const;
73  virtual void Serialize (Buffer::Iterator start) const;
74  virtual uint32_t Deserialize (Buffer::Iterator start);
78 private:
79  uint8_t m_subtype;
80  IePeeringProtocol m_protocol;
81  uint16_t m_capability;
82  uint16_t m_aid;
83  SupportedRates m_rates;
84  IeMeshId m_meshId;
85  IeConfiguration m_config;
86  uint16_t m_reasonCode;
87 
88  friend bool operator== (const PeerLinkFrameStart & a, const PeerLinkFrameStart & b);
89 
90  PeerLinkFrameStart& operator= (const PeerLinkFrameStart &);
92 
93 };
94 bool operator== (const PeerLinkFrameStart & a, const PeerLinkFrameStart & b);
95 } // namespace dot11s
96 } // namespace ns3
97 #endif
Protocol header serialization and deserialization.
Definition: header.h:42
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...
iterator in a Buffer instance
Definition: buffer.h:98
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:44