src/wifi/model/mgt-headers.h
author Ghada Badawy <gbadawy@gmail.com>
Tue, 13 Aug 2013 22:05:25 -0700
changeset 10139 17a71cd49da3
parent 7385 10beb0e53130
child 10459 f2e90c12a44f
permissions -rw-r--r--
partial 802.11n support
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7385
10beb0e53130 standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents: 7141
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
/*
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
 * Copyright (c) 2006 INRIA
5949
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
     4
 * Copyright (c) 2009 MIRKO BANCHI
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
 *
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     6
 * This program is free software; you can redistribute it and/or modify
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
     7
 * it under the terms of the GNU General Public License version 2 as
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     8
 * published by the Free Software Foundation;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     9
 *
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
 * GNU General Public License for more details.
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
 *
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    16
 * along with this program; if not, write to the Free Software
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
 *
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
5949
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
    20
 * Author: Mirko Banchi <mk.banchi@gmail.com>
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
 */
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    22
#ifndef MGT_HEADERS_H
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    23
#define MGT_HEADERS_H
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    24
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
#include <stdint.h>
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
#include "ns3/header.h"
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
#include "status-code.h"
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
#include "capability-information.h"
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    30
#include "supported-rates.h"
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    31
#include "ssid.h"
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 7385
diff changeset
    32
#include "ht-capabilities.h"
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    33
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    34
namespace ns3 {
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    35
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    36
/**
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    37
 * \ingroup wifi
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    38
 * Implement the header for management frames of type association request.
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    39
 */
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    40
class MgtAssocRequestHeader : public Header
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    41
{
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    42
public:
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    43
  MgtAssocRequestHeader ();
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    44
  ~MgtAssocRequestHeader ();
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    45
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    46
  void SetSsid (Ssid ssid);
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    47
  void SetSupportedRates (SupportedRates rates);
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    48
  void SetListenInterval (uint16_t interval);
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 7385
diff changeset
    49
  void SetHtCapabilities(HtCapabilities htcapabilities);
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 7385
diff changeset
    50
  
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 7385
diff changeset
    51
  HtCapabilities GetHtCapabilities (void) const;
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    52
  Ssid GetSsid (void) const;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    53
  SupportedRates GetSupportedRates (void) const;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    54
  uint16_t GetListenInterval (void) const;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    55
2643
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
    56
  static TypeId GetTypeId (void);
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
    57
  virtual TypeId GetInstanceTypeId (void) const;
2646
c1fef7686472 remove dead code.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2643
diff changeset
    58
  virtual void Print (std::ostream &os) const;
2643
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
    59
  virtual uint32_t GetSerializedSize (void) const;
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
    60
  virtual void Serialize (Buffer::Iterator start) const;
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
    61
  virtual uint32_t Deserialize (Buffer::Iterator start);
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    62
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    63
private:
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    64
  Ssid m_ssid;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    65
  SupportedRates m_rates;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    66
  CapabilityInformation m_capability;
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 7385
diff changeset
    67
  HtCapabilities m_htCapability;
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    68
  uint16_t m_listenInterval;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    69
};
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    70
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    71
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    72
/**
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    73
 * \ingroup wifi
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    74
 * Implement the header for management frames of type association response.
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
    75
 */
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    76
class MgtAssocResponseHeader : public Header
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
    77
{
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    78
public:
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    79
  MgtAssocResponseHeader ();
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    80
  ~MgtAssocResponseHeader ();
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    81
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    82
  StatusCode GetStatusCode (void);
2007
a5fefe9916a0 add support for set/get supported rates in assoc resp packets
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1939
diff changeset
    83
  SupportedRates GetSupportedRates (void);
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 7385
diff changeset
    84
  HtCapabilities GetHtCapabilities (void) const;
2007
a5fefe9916a0 add support for set/get supported rates in assoc resp packets
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1939
diff changeset
    85
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 7385
diff changeset
    86
  void SetHtCapabilities(HtCapabilities htcapabilities);
2007
a5fefe9916a0 add support for set/get supported rates in assoc resp packets
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1939
diff changeset
    87
  void SetSupportedRates (SupportedRates rates);
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    88
  void SetStatusCode (StatusCode code);
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    89
2643
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
    90
  static TypeId GetTypeId (void);
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
    91
  virtual TypeId GetInstanceTypeId (void) const;
2646
c1fef7686472 remove dead code.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2643
diff changeset
    92
  virtual void Print (std::ostream &os) const;
2643
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
    93
  virtual uint32_t GetSerializedSize (void) const;
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
    94
  virtual void Serialize (Buffer::Iterator start) const;
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
    95
  virtual uint32_t Deserialize (Buffer::Iterator start);
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    96
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    97
private:
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    98
  SupportedRates m_rates;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    99
  CapabilityInformation m_capability;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   100
  StatusCode m_code;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   101
  uint16_t m_aid;
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 7385
diff changeset
   102
  HtCapabilities m_htCapability;
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   103
};
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   104
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   105
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   106
/**
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   107
 * \ingroup wifi
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   108
 * Implement the header for management frames of type probe request.
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   109
 */
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   110
class MgtProbeRequestHeader : public Header
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   111
{
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   112
public:
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   113
  ~MgtProbeRequestHeader ();
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   114
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   115
  void SetSsid (Ssid ssid);
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   116
  void SetSupportedRates (SupportedRates rates);
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   117
  Ssid GetSsid (void) const;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   118
  SupportedRates GetSupportedRates (void) const;
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 7385
diff changeset
   119
 HtCapabilities GetHtCapabilities (void) const;
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   120
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 7385
diff changeset
   121
  void SetHtCapabilities(HtCapabilities htcapabilities);
2643
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
   122
  static TypeId GetTypeId (void);
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
   123
  virtual TypeId GetInstanceTypeId (void) const;
2646
c1fef7686472 remove dead code.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2643
diff changeset
   124
  virtual void Print (std::ostream &os) const;
2643
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
   125
  virtual uint32_t GetSerializedSize (void) const;
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
   126
  virtual void Serialize (Buffer::Iterator start) const;
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
   127
  virtual uint32_t Deserialize (Buffer::Iterator start);
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   128
private:
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   129
  Ssid m_ssid;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   130
  SupportedRates m_rates;
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 7385
diff changeset
   131
  HtCapabilities m_htCapability;
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   132
};
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   133
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   134
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   135
/**
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   136
 * \ingroup wifi
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   137
 * Implement the header for management frames of type probe response.
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   138
 */
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   139
class MgtProbeResponseHeader : public Header
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   140
{
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   141
public:
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   142
  MgtProbeResponseHeader ();
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   143
  ~MgtProbeResponseHeader ();
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   144
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   145
  Ssid GetSsid (void) const;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   146
  uint64_t GetBeaconIntervalUs (void) const;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   147
  SupportedRates GetSupportedRates (void) const;
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 7385
diff changeset
   148
 HtCapabilities GetHtCapabilities (void) const;
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   149
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 7385
diff changeset
   150
  void SetHtCapabilities(HtCapabilities htcapabilities);
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   151
  void SetSsid (Ssid ssid);
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   152
  void SetBeaconIntervalUs (uint64_t us);
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   153
  void SetSupportedRates (SupportedRates rates);
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   154
  uint64_t GetTimestamp ();
2643
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
   155
  static TypeId GetTypeId (void);
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
   156
  virtual TypeId GetInstanceTypeId (void) const;
2646
c1fef7686472 remove dead code.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2643
diff changeset
   157
  virtual void Print (std::ostream &os) const;
2643
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
   158
  virtual uint32_t GetSerializedSize (void) const;
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
   159
  virtual void Serialize (Buffer::Iterator start) const;
2a3324f4dabe define a TypeId for each Header/Trailer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2007
diff changeset
   160
  virtual uint32_t Deserialize (Buffer::Iterator start);
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   161
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   162
private:
4692
f4cd995f1718 Review issue 88093: Minor changes in wifi module needed by 802.11s
Pavel Boyko <boyko@iitp.ru>
parents: 2646
diff changeset
   163
  uint64_t m_timestamp;
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   164
  Ssid m_ssid;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   165
  uint64_t m_beaconInterval;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   166
  SupportedRates m_rates;
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   167
  CapabilityInformation m_capability;
10139
17a71cd49da3 partial 802.11n support
Ghada Badawy <gbadawy@gmail.com>
parents: 7385
diff changeset
   168
  HtCapabilities m_htCapability;
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   169
};
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   170
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   171
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   172
/**
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   173
 * \ingroup wifi
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   174
 * Implement the header for management frames of type beacon.
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   175
 */
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   176
class MgtBeaconHeader : public MgtProbeResponseHeader
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   177
{
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   178
};
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   179
5949
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   180
/****************************
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   181
*     Action frames
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   182
*****************************/
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   183
5824
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   184
/**
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   185
 * \ingroup wifi
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   186
 *
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   187
 * See IEEE 802.11 chapter 7.3.1.11
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   188
 * Header format: | category: 1 | action value: 1 |
5824
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   189
 *
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   190
 */
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   191
class WifiActionHeader : public Header
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   192
{
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   193
public:
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   194
  WifiActionHeader ();
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   195
  ~WifiActionHeader ();
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   196
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   197
  /* Compatible with open80211s implementation */
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   198
  enum CategoryValue //table 7-24 staring from 4
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   199
  {
5949
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   200
    BLOCK_ACK = 3,
5824
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   201
    MESH_PEERING_MGT = 30,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   202
    MESH_LINK_METRIC = 31,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   203
    MESH_PATH_SELECTION = 32,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   204
    MESH_INTERWORKING = 33,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   205
    MESH_RESOURCE_COORDINATION = 34,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   206
    MESH_PROXY_FORWARDING = 35,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   207
  };
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   208
  /* Compatible with open80211s implementation */
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   209
  enum PeerLinkMgtActionValue
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   210
  {
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   211
    PEER_LINK_OPEN = 0,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   212
    PEER_LINK_CONFIRM = 1,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   213
    PEER_LINK_CLOSE = 2,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   214
  };
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   215
  enum LinkMetricActionValue
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   216
  {
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   217
    LINK_METRIC_REQUEST = 0,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   218
    LINK_METRIC_REPORT,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   219
  };
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   220
  /* Compatible with open80211s implementation */
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   221
  enum PathSelectionActionValue
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   222
  {
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   223
    PATH_SELECTION = 0,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   224
  };
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   225
  enum InterworkActionValue
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   226
  {
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   227
    PORTAL_ANNOUNCEMENT = 0,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   228
  };
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   229
  enum ResourceCoordinationActionValue
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   230
  {
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   231
    CONGESTION_CONTROL_NOTIFICATION = 0,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   232
    MDA_SETUP_REQUEST,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   233
    MDA_SETUP_REPLY,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   234
    MDAOP_ADVERTISMENT_REQUEST,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   235
    MDAOP_ADVERTISMENTS,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   236
    MDAOP_SET_TEARDOWN,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   237
    BEACON_TIMING_REQUEST,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   238
    BEACON_TIMING_RESPONSE,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   239
    TBTT_ADJUSTMENT_REQUEST,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   240
    MESH_CHANNEL_SWITCH_ANNOUNCEMENT,
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   241
  };
5949
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   242
  enum BlockAckActionValue
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   243
  {
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   244
    BLOCK_ACK_ADDBA_REQUEST = 0,
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   245
    BLOCK_ACK_ADDBA_RESPONSE = 1,
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   246
    BLOCK_ACK_DELBA = 2
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   247
  };
5824
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   248
  typedef union
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   249
  {
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   250
    enum PeerLinkMgtActionValue peerLink;
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   251
    enum LinkMetricActionValue linkMetrtic;
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   252
    enum PathSelectionActionValue pathSelection;
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   253
    enum InterworkActionValue interwork;
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   254
    enum ResourceCoordinationActionValue resourceCoordination;
5949
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   255
    enum BlockAckActionValue blockAck;
5824
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   256
  } ActionValue;
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   257
  void   SetAction (enum CategoryValue type,ActionValue action);
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   258
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   259
  CategoryValue GetCategory ();
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   260
  ActionValue GetAction ();
6393
f7e1f9dfa08d ensure objects are regsitered
Josh Pelkey <jpelkey@gatech.edu>
parents: 5949
diff changeset
   261
  static TypeId GetTypeId (void);
5824
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   262
  virtual TypeId GetInstanceTypeId () const;
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   263
  virtual void Print (std::ostream &os) const;
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   264
  virtual uint32_t GetSerializedSize () const;
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   265
  virtual void Serialize (Buffer::Iterator start) const;
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   266
  virtual uint32_t Deserialize (Buffer::Iterator start);
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   267
private:
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   268
  uint8_t m_category;
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   269
  uint8_t m_actionValue;
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   270
};
5abf274b52d4 Mesh: action header moved from dot11s namespace and placed to
Kirill Andreev <andreev@iitp.ru>
parents: 5133
diff changeset
   271
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   272
/**
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   273
 * \ingroup wifi
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   274
 * Implement the header for management frames of type add block ack request.
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   275
 */
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   276
class MgtAddBaRequestHeader : public Header
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   277
{
5949
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   278
public:
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   279
  MgtAddBaRequestHeader ();
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   280
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   281
  static TypeId GetTypeId (void);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   282
  virtual TypeId GetInstanceTypeId (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   283
  virtual void Print (std::ostream &os) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   284
  virtual uint32_t GetSerializedSize (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   285
  virtual void Serialize (Buffer::Iterator start) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   286
  virtual uint32_t Deserialize (Buffer::Iterator start);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   287
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   288
  void SetDelayedBlockAck ();
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   289
  void SetImmediateBlockAck ();
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   290
  void SetTid (uint8_t tid);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   291
  void SetTimeout (uint16_t timeout);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   292
  void SetBufferSize (uint16_t size);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   293
  void SetStartingSequence (uint16_t seq);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   294
  void SetAmsduSupport (bool supported);
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   295
5949
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   296
  uint16_t GetStartingSequence (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   297
  uint8_t GetTid (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   298
  bool IsImmediateBlockAck (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   299
  uint16_t GetTimeout (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   300
  uint16_t GetBufferSize (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   301
  bool IsAmsduSupported (void) const;
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   302
5949
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   303
private:
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   304
  uint16_t GetParameterSet (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   305
  void SetParameterSet (uint16_t params);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   306
  uint16_t GetStartingSequenceControl (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   307
  void SetStartingSequenceControl (uint16_t seqControl);
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   308
5949
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   309
  uint8_t m_dialogToken; /* Not used for now */
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   310
  uint8_t m_amsduSupport;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   311
  uint8_t m_policy;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   312
  uint8_t m_tid;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   313
  uint16_t m_bufferSize;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   314
  uint16_t m_timeoutValue;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   315
  uint16_t m_startingSeq;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   316
};
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   317
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   318
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   319
/**
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   320
 * \ingroup wifi
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   321
 * Implement the header for management frames of type add block ack response.
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   322
 */
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   323
class MgtAddBaResponseHeader : public Header
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   324
{
5949
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   325
public:
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   326
  MgtAddBaResponseHeader ();
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   327
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   328
  static TypeId GetTypeId (void);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   329
  virtual TypeId GetInstanceTypeId (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   330
  virtual void Print (std::ostream &os) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   331
  virtual uint32_t GetSerializedSize (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   332
  virtual void Serialize (Buffer::Iterator start) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   333
  virtual uint32_t Deserialize (Buffer::Iterator start);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   334
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   335
  void SetDelayedBlockAck ();
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   336
  void SetImmediateBlockAck ();
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   337
  void SetTid (uint8_t tid);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   338
  void SetTimeout (uint16_t timeout);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   339
  void SetBufferSize (uint16_t size);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   340
  void SetStatusCode (StatusCode code);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   341
  void SetAmsduSupport (bool supported);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   342
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   343
  StatusCode GetStatusCode (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   344
  uint8_t GetTid (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   345
  bool IsImmediateBlockAck (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   346
  uint16_t GetTimeout (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   347
  uint16_t GetBufferSize (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   348
  bool IsAmsduSupported (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   349
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   350
private:
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   351
  uint16_t GetParameterSet (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   352
  void SetParameterSet (uint16_t params);
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   353
5949
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   354
  uint8_t m_dialogToken; /* Not used for now */
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   355
  StatusCode m_code;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   356
  uint8_t m_amsduSupport;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   357
  uint8_t m_policy;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   358
  uint8_t m_tid;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   359
  uint16_t m_bufferSize;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   360
  uint16_t m_timeoutValue;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   361
};
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   362
7139
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   363
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   364
/**
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   365
 * \ingroup wifi
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   366
 * Implement the header for management frames of type del block ack.
79dd02ed46ec doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents: 6852
diff changeset
   367
 */
7141
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   368
class MgtDelBaHeader : public Header
072fb225b714 run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents: 7139
diff changeset
   369
{
5949
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   370
public:
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   371
  MgtDelBaHeader ();
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   372
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   373
  static TypeId GetTypeId (void);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   374
  virtual TypeId GetInstanceTypeId (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   375
  virtual void Print (std::ostream &os) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   376
  virtual uint32_t GetSerializedSize (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   377
  virtual void Serialize (Buffer::Iterator start) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   378
  virtual uint32_t Deserialize (Buffer::Iterator start);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   379
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   380
  bool IsByOriginator (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   381
  uint8_t GetTid (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   382
  void SetTid (uint8_t);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   383
  void SetByOriginator (void);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   384
  void SetByRecipient (void);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   385
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   386
private:
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   387
  uint16_t GetParameterSet (void) const;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   388
  void SetParameterSet (uint16_t params);
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   389
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   390
  uint16_t m_initiator;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   391
  uint16_t m_tid;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   392
  /* Not used for now.
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   393
     Always set to 1: "Unspecified reason" */
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   394
  uint16_t m_reasonCode;
66f939e7aaec add action frames needed by block ack
Mirko Banchi <mk.banchi@gmail.com>
parents: 5824
diff changeset
   395
};
1939
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   396
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   397
} // namespace ns3
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   398
40af0232df83 add management frame implementations
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   399
#endif /* MGT_HEADERS_H */