src/devices/mesh/dot11s/ie-dot11s-preq.h
author Andrey Mazo <mazo@iitp.ru>
Fri, 23 Apr 2010 15:09:31 +0400
changeset 6273 8d70de29d514
parent 5505 c0ac392289c3
child 6378 57485ed01268
permissions -rw-r--r--
spell check, mostly in comments.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
     1
/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
     2
/*
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
     3
 * Copyright (c) 2008,2009 IITP RAS
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
     4
 *
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
     8
 *
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    12
 * GNU General Public License for more details.
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    13
 *
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    17
 *
4811
080b8f23fa4a Added license information to some files.
Andrey Mazo <mazo@iitp.ru>
parents: 4810
diff changeset
    18
 * Author: Kirill Andreev <andreev@iitp.ru>
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    19
 */
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    20
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    21
#ifndef WIFI_PREQ_INFORMATION_ELEMENT_H
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    22
#define WIFI_PREQ_INFORMATION_ELEMENT_H
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    23
4813
e4e2c44d27cd All mesh related filed moved to devices/mesh. Let the refactoring begins!
Pavel Boyko <boyko@iitp.ru>
parents: 4812
diff changeset
    24
#include <vector>
e4e2c44d27cd All mesh related filed moved to devices/mesh. Let the refactoring begins!
Pavel Boyko <boyko@iitp.ru>
parents: 4812
diff changeset
    25
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    26
#include "ns3/mac48-address.h"
5161
1c685e8be8d1 Restructured files, removed unneeded includes
Kirill Andreev <andreev@iitp.ru>
parents: 5159
diff changeset
    27
#include "ns3/wifi-information-element-vector.h"
4813
e4e2c44d27cd All mesh related filed moved to devices/mesh. Let the refactoring begins!
Pavel Boyko <boyko@iitp.ru>
parents: 4812
diff changeset
    28
5132
aee541a30256 Restored newline at namespace
Kirill Andreev <andreev@iitp.ru>
parents: 5130
diff changeset
    29
namespace ns3 {
aee541a30256 Restored newline at namespace
Kirill Andreev <andreev@iitp.ru>
parents: 5130
diff changeset
    30
namespace dot11s {
4807
a1f43e372f9f 1. HIDE_UNDOC_CLASSES is temporary set to NO in doxygen.conf
Pavel Boyko <boyko@iitp.ru>
parents: 4802
diff changeset
    31
/**
4851
44a5075d854e 11s information elements commented as "\ingroup dot11s" for doxygen
Pavel Boyko <boyko@iitp.ru>
parents: 4850
diff changeset
    32
 * \ingroup dot11s
4850
c3ee1deaa07a Code refactoring: fixed names, added references to draft
Kirill Andreev <andreev@iitp.ru>
parents: 4847
diff changeset
    33
 * \brief Describes an address unit in PREQ information element
c3ee1deaa07a Code refactoring: fixed names, added references to draft
Kirill Andreev <andreev@iitp.ru>
parents: 4847
diff changeset
    34
 * See 7.3.2.96 for more details
4807
a1f43e372f9f 1. HIDE_UNDOC_CLASSES is temporary set to NO in doxygen.conf
Pavel Boyko <boyko@iitp.ru>
parents: 4802
diff changeset
    35
 */
5505
c0ac392289c3 replace RefCountBase with SimpleRefCount<> to avoid duplicate refcounting implementations.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 5162
diff changeset
    36
class DestinationAddressUnit : public SimpleRefCount<DestinationAddressUnit>
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    37
{
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    38
public:
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    39
  DestinationAddressUnit ();
4955
b83a62acbcf2 Added proper flags to HWMP PREQ, routing information is updated in accordance
Kirill Andreev <andreev@iitp.ru>
parents: 4904
diff changeset
    40
  void SetFlags (bool doFlag, bool rfFlag, bool usnFlag);
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    41
  void SetDestinationAddress (Mac48Address dest_address);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    42
  void SetDestSeqNumber (uint32_t dest_seq_number);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    43
  bool IsDo ();
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    44
  bool IsRf ();
4955
b83a62acbcf2 Added proper flags to HWMP PREQ, routing information is updated in accordance
Kirill Andreev <andreev@iitp.ru>
parents: 4904
diff changeset
    45
  bool IsUsn ();
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    46
  Mac48Address GetDestinationAddress () const;
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    47
  uint32_t GetDestSeqNumber () const;
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    48
private:
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    49
  bool m_do;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    50
  bool m_rf;
4955
b83a62acbcf2 Added proper flags to HWMP PREQ, routing information is updated in accordance
Kirill Andreev <andreev@iitp.ru>
parents: 4904
diff changeset
    51
  bool m_usn;
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    52
  Mac48Address m_destinationAddress;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    53
  uint32_t m_destSeqNumber;
5129
5688b8da4526 Fixed coding style
Kirill Andreev <andreev@iitp.ru>
parents: 5124
diff changeset
    54
4904
4e2ac4a8b5c6 PREQ unit test created
Pavel Boyko <boyko@iitp.ru>
parents: 4899
diff changeset
    55
  friend bool operator== (const DestinationAddressUnit & a, const DestinationAddressUnit & b);
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    56
};
4807
a1f43e372f9f 1. HIDE_UNDOC_CLASSES is temporary set to NO in doxygen.conf
Pavel Boyko <boyko@iitp.ru>
parents: 4802
diff changeset
    57
/**
4851
44a5075d854e 11s information elements commented as "\ingroup dot11s" for doxygen
Pavel Boyko <boyko@iitp.ru>
parents: 4850
diff changeset
    58
 * \ingroup dot11s
4850
c3ee1deaa07a Code refactoring: fixed names, added references to draft
Kirill Andreev <andreev@iitp.ru>
parents: 4847
diff changeset
    59
 * \brief See 7.3.2.96 of 802.11s draft 2.07
4807
a1f43e372f9f 1. HIDE_UNDOC_CLASSES is temporary set to NO in doxygen.conf
Pavel Boyko <boyko@iitp.ru>
parents: 4802
diff changeset
    60
 */
4876
d78f1b978dac Rstructured file names: IeDot11s* no is Ie, because it is in namespace dot11s
Kirill Andreev <andreev@iitp.ru>
parents: 4872
diff changeset
    61
class IePreq : public WifiInformationElement
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    62
{
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    63
public:
4876
d78f1b978dac Rstructured file names: IeDot11s* no is Ie, because it is in namespace dot11s
Kirill Andreev <andreev@iitp.ru>
parents: 4872
diff changeset
    64
  IePreq ();
d78f1b978dac Rstructured file names: IeDot11s* no is Ie, because it is in namespace dot11s
Kirill Andreev <andreev@iitp.ru>
parents: 4872
diff changeset
    65
  ~IePreq ();
5107
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
    66
  /**
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
    67
   * Add a destination address unit: flags, destination and sequence
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
    68
   * number
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
    69
   */
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    70
  void AddDestinationAddressElement (
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    71
    bool doFlag,
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    72
    bool rfFlag,
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    73
    Mac48Address dest_address,
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    74
    uint32_t dest_seq_number
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    75
  );
5107
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
    76
  /// Delete a destination address unit by destination
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    77
  void DelDestinationAddressElement (Mac48Address dest_address);
5107
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
    78
  /// Clear PREQ: remove all destinations
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
    79
  void ClearDestinationAddressElements ();
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
    80
  /// Get all destinations, which are stored in PREQ:
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    81
  std::vector<Ptr<DestinationAddressUnit> > GetDestinationList ();
5107
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
    82
  /// SetProper flags which indicate that PREQ is unicast
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    83
  void SetUnicastPreq ();
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    84
  /*
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    85
   * \brief In proactive case: need we send PREP
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    86
   */
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    87
  void SetNeedNotPrep ();
5107
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
    88
  ///\name Setters for fields:
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
    89
  ///\{
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    90
  void SetHopcount (uint8_t hopcount);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    91
  void SetTTL (uint8_t ttl);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    92
  void SetPreqID (uint32_t id);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    93
  void SetOriginatorAddress (Mac48Address originator_address);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    94
  void SetOriginatorSeqNumber (uint32_t originator_seq_number);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    95
  void SetLifetime (uint32_t lifetime);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    96
  void SetMetric (uint32_t metric);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
    97
  void SetDestCount (uint8_t dest_count);
5107
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
    98
  ///\}
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
    99
  ///\name Getters for fields:
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
   100
  ///\{
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
   101
  bool  IsUnicastPreq () const;
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
   102
  bool  IsNeedNotPrep () const;
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
   103
  uint8_t  GetHopCount () const;
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
   104
  uint8_t  GetTtl ()const ;
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
   105
  uint32_t GetPreqID () const;
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
   106
  Mac48Address GetOriginatorAddress () const;
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
   107
  uint32_t GetOriginatorSeqNumber () const;
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
   108
  uint32_t GetLifetime () const;
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
   109
  uint32_t GetMetric () const;
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
   110
  uint8_t  GetDestCount () const;
5107
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
   111
  ///\}
ec4196c70800 Fixed PREQ propagation, added comments to PREQ information element
Kirill Andreev <andreev@iitp.ru>
parents: 5059
diff changeset
   112
  /// Handle TTL and Metric:
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
   113
  void  DecrementTtl ();
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4851
diff changeset
   114
  void  IncrementMetric (uint32_t metric);
4965
e6e44c9415e7 Preq queue bugfix. deleted m_myPreq
Kirill Andreev <andreev@iitp.ru>
parents: 4955
diff changeset
   115
  /*
e6e44c9415e7 Preq queue bugfix. deleted m_myPreq
Kirill Andreev <andreev@iitp.ru>
parents: 4955
diff changeset
   116
   * \brief Checks that preq's originator address equals to originator, and
e6e44c9415e7 Preq queue bugfix. deleted m_myPreq
Kirill Andreev <andreev@iitp.ru>
parents: 4955
diff changeset
   117
   * this preq is not proactive
e6e44c9415e7 Preq queue bugfix. deleted m_myPreq
Kirill Andreev <andreev@iitp.ru>
parents: 4955
diff changeset
   118
   */
5130
b5062e8e0da1 Fixed coding style
Kirill Andreev <andreev@iitp.ru>
parents: 5129
diff changeset
   119
  bool MayAddAddress (Mac48Address originator);
5113
a912d4372406 PREQ, PREP overflow is handled correctly
Kirill Andreev <andreev@iitp.ru>
parents: 5107
diff changeset
   120
  bool IsFull () const;
5159
7e0731625f67 Removed inheritance from Header in WifiInformationElement. TODO: restore unit
Kirill Andreev <andreev@iitp.ru>
parents: 5132
diff changeset
   121
  /**
7e0731625f67 Removed inheritance from Header in WifiInformationElement. TODO: restore unit
Kirill Andreev <andreev@iitp.ru>
parents: 5132
diff changeset
   122
   * \name Inherited from WifiInformationElement
7e0731625f67 Removed inheritance from Header in WifiInformationElement. TODO: restore unit
Kirill Andreev <andreev@iitp.ru>
parents: 5132
diff changeset
   123
   * \{
7e0731625f67 Removed inheritance from Header in WifiInformationElement. TODO: restore unit
Kirill Andreev <andreev@iitp.ru>
parents: 5132
diff changeset
   124
   */
5162
35963e5411c0 PrintInformation replaced with Prin in information elements, added operator
Kirill Andreev <andreev@iitp.ru>
parents: 5161
diff changeset
   125
  virtual WifiElementId ElementId () const;
35963e5411c0 PrintInformation replaced with Prin in information elements, added operator
Kirill Andreev <andreev@iitp.ru>
parents: 5161
diff changeset
   126
  virtual void SerializeInformation (Buffer::Iterator i) const;
35963e5411c0 PrintInformation replaced with Prin in information elements, added operator
Kirill Andreev <andreev@iitp.ru>
parents: 5161
diff changeset
   127
  virtual uint8_t DeserializeInformation (Buffer::Iterator i, uint8_t length);
35963e5411c0 PrintInformation replaced with Prin in information elements, added operator
Kirill Andreev <andreev@iitp.ru>
parents: 5161
diff changeset
   128
  virtual uint8_t GetInformationSize () const;
35963e5411c0 PrintInformation replaced with Prin in information elements, added operator
Kirill Andreev <andreev@iitp.ru>
parents: 5161
diff changeset
   129
  virtual void Print (std::ostream& os) const;
5159
7e0731625f67 Removed inheritance from Header in WifiInformationElement. TODO: restore unit
Kirill Andreev <andreev@iitp.ru>
parents: 5132
diff changeset
   130
  ///\}
7e0731625f67 Removed inheritance from Header in WifiInformationElement. TODO: restore unit
Kirill Andreev <andreev@iitp.ru>
parents: 5132
diff changeset
   131
private:
4847
695b7aca9f88 Fixes with comments
Kirill Andreev <andreev@iitp.ru>
parents: 4841
diff changeset
   132
  /**
695b7aca9f88 Fixes with comments
Kirill Andreev <andreev@iitp.ru>
parents: 4841
diff changeset
   133
   * how many destinations we support
695b7aca9f88 Fixes with comments
Kirill Andreev <andreev@iitp.ru>
parents: 4841
diff changeset
   134
   */
6273
8d70de29d514 spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents: 5505
diff changeset
   135
  uint8_t m_maxSize; //TODO: make as an attribute
4847
695b7aca9f88 Fixes with comments
Kirill Andreev <andreev@iitp.ru>
parents: 4841
diff changeset
   136
  /**
695b7aca9f88 Fixes with comments
Kirill Andreev <andreev@iitp.ru>
parents: 4841
diff changeset
   137
   * Fields of information element:
695b7aca9f88 Fixes with comments
Kirill Andreev <andreev@iitp.ru>
parents: 4841
diff changeset
   138
   */
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
   139
  uint8_t m_flags;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
   140
  uint8_t m_hopCount;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
   141
  uint8_t m_ttl;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
   142
  uint32_t m_preqId;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
   143
  Mac48Address m_originatorAddress;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
   144
  uint32_t m_originatorSeqNumber;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
   145
  uint32_t m_lifetime;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
   146
  uint32_t m_metric;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
   147
  uint8_t  m_destCount;
4853
cb12c7003071 Coding style changes: remove unneeded line breaks.
Andrey Mazo <mazo@iitp.ru>
parents: 4852
diff changeset
   148
  std::vector<Ptr<DestinationAddressUnit> >  m_destinations;
5129
5688b8da4526 Fixed coding style
Kirill Andreev <andreev@iitp.ru>
parents: 5124
diff changeset
   149
4904
4e2ac4a8b5c6 PREQ unit test created
Pavel Boyko <boyko@iitp.ru>
parents: 4899
diff changeset
   150
  friend bool operator== (const IePreq & a, const IePreq & b);
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
   151
};
4904
4e2ac4a8b5c6 PREQ unit test created
Pavel Boyko <boyko@iitp.ru>
parents: 4899
diff changeset
   152
4e2ac4a8b5c6 PREQ unit test created
Pavel Boyko <boyko@iitp.ru>
parents: 4899
diff changeset
   153
bool operator== (const DestinationAddressUnit & a, const DestinationAddressUnit & b);
4e2ac4a8b5c6 PREQ unit test created
Pavel Boyko <boyko@iitp.ru>
parents: 4899
diff changeset
   154
bool operator== (const IePreq & a, const IePreq & b);
5162
35963e5411c0 PrintInformation replaced with Prin in information elements, added operator
Kirill Andreev <andreev@iitp.ru>
parents: 5161
diff changeset
   155
std::ostream &operator << (std::ostream &os, const IePreq &preq);
4904
4e2ac4a8b5c6 PREQ unit test created
Pavel Boyko <boyko@iitp.ru>
parents: 4899
diff changeset
   156
4872
ea1bce018a44 Added namespace dot11s
Kirill Andreev <andreev@iitp.ru>
parents: 4871
diff changeset
   157
} // namespace dot11s
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
   158
} //namespace ns3
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
   159
#endif
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
   160