src/devices/mesh/mesh-mgt-headers.h
author Kirill Andreev <andreev@iitp.ru>
Wed, 25 Mar 2009 12:23:12 +0300
changeset 4876 d78f1b978dac
parent 4852 123dc54d734e
permissions -rw-r--r--
Rstructured file names: IeDot11s* no is Ie, because it is in namespace dot11s
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
 *
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    18
 * Authors: Kirill Andreev <andreev@iitp.ru>
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    19
 *          Aleksey Kovalenko <kovalenko@iitp.ru>
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
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    22
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    23
#ifndef MESH_MGT_HEADERS_H
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    24
#define MESH_MGT_HEADERS_H
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    25
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    26
#include "ns3/header.h"
4813
e4e2c44d27cd All mesh related filed moved to devices/mesh. Let the refactoring begins!
Pavel Boyko <boyko@iitp.ru>
parents: 4812
diff changeset
    27
#include "ns3/supported-rates.h"
4838
ce31277d72ad Finished restructuring information elements
Kirill Andreev <andreev@iitp.ru>
parents: 4835
diff changeset
    28
#include "ns3/ie-dot11s-peer-management.h"
4833
9e10eae04db9 Restructured filenames in information elements
Kirill Andreev <andreev@iitp.ru>
parents: 4813
diff changeset
    29
#include "ns3/ie-dot11s-configuration.h"
9e10eae04db9 Restructured filenames in information elements
Kirill Andreev <andreev@iitp.ru>
parents: 4813
diff changeset
    30
#include "ns3/ie-dot11s-beacon-timing.h"
4813
e4e2c44d27cd All mesh related filed moved to devices/mesh. Let the refactoring begins!
Pavel Boyko <boyko@iitp.ru>
parents: 4812
diff changeset
    31
#include "ns3/mgt-headers.h"
e4e2c44d27cd All mesh related filed moved to devices/mesh. Let the refactoring begins!
Pavel Boyko <boyko@iitp.ru>
parents: 4812
diff changeset
    32
#include "ns3/ssid.h"
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    33
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    34
namespace ns3 {
4807
a1f43e372f9f 1. HIDE_UNDOC_CLASSES is temporary set to NO in doxygen.conf
Pavel Boyko <boyko@iitp.ru>
parents: 4799
diff changeset
    35
/**
a1f43e372f9f 1. HIDE_UNDOC_CLASSES is temporary set to NO in doxygen.conf
Pavel Boyko <boyko@iitp.ru>
parents: 4799
diff changeset
    36
 * \ingroup mesh
a1f43e372f9f 1. HIDE_UNDOC_CLASSES is temporary set to NO in doxygen.conf
Pavel Boyko <boyko@iitp.ru>
parents: 4799
diff changeset
    37
 */
4799
34d837b1a529 Restructured files
Kirill Andreev <andreev@iitp.ru>
parents: 4793
diff changeset
    38
class MgtMeshBeaconHeader : public MgtBeaconHeader
34d837b1a529 Restructured files
Kirill Andreev <andreev@iitp.ru>
parents: 4793
diff changeset
    39
{
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    40
public:
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    41
  void    SetIeDot11sConfiguration (IeDot11sConfiguration mesh_config);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    42
  void    SetIeDot11sBeaconTiming (IeDot11sBeaconTiming wifi_timing);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    43
  IeDot11sConfiguration GetIeDot11sConfiguration ();
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    44
  IeDot11sBeaconTiming  GetIeDot11sBeaconTiming ();
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    45
  virtual uint32_t  GetSerializedSize () const;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    46
  virtual void   Serialize (Buffer::Iterator start) const;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    47
  virtual uint32_t  Deserialize (Buffer::Iterator start);
4799
34d837b1a529 Restructured files
Kirill Andreev <andreev@iitp.ru>
parents: 4793
diff changeset
    48
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    49
private:
4835
eca7ff6b2b47 Class names restructured
Kirill Andreev <andreev@iitp.ru>
parents: 4833
diff changeset
    50
  IeDot11sConfiguration m_meshConfig;
eca7ff6b2b47 Class names restructured
Kirill Andreev <andreev@iitp.ru>
parents: 4833
diff changeset
    51
  IeDot11sBeaconTiming  m_meshTiming;
4799
34d837b1a529 Restructured files
Kirill Andreev <andreev@iitp.ru>
parents: 4793
diff changeset
    52
};
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    53
4807
a1f43e372f9f 1. HIDE_UNDOC_CLASSES is temporary set to NO in doxygen.conf
Pavel Boyko <boyko@iitp.ru>
parents: 4799
diff changeset
    54
/**
a1f43e372f9f 1. HIDE_UNDOC_CLASSES is temporary set to NO in doxygen.conf
Pavel Boyko <boyko@iitp.ru>
parents: 4799
diff changeset
    55
 * \ingroup mesh
a1f43e372f9f 1. HIDE_UNDOC_CLASSES is temporary set to NO in doxygen.conf
Pavel Boyko <boyko@iitp.ru>
parents: 4799
diff changeset
    56
 */
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    57
class MeshMgtPeerLinkManFrame : public Header
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    58
{
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    59
public:
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    60
  MeshMgtPeerLinkManFrame ();
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    61
  void    SetAid (uint16_t aid);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    62
  void    SetSupportedRates (SupportedRates rates);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    63
  void    SetQosField (uint16_t qos);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    64
  void    SetMeshId (Ssid Id);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    65
  void    SetIeDot11sConfiguration (IeDot11sConfiguration MeshConf);
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    66
  void    SetIeDot11sPeerManagement (IeDot11sPeerManagement meshPeerElement);
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    67
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    68
  uint16_t         GetAid ();
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    69
  SupportedRates   GetSupportedRates ();
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    70
  uint16_t         GetQosField ();
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    71
  Ssid             GetMeshId ();
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    72
  IeDot11sConfiguration  GetIeDot11sConfiguration ();
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    73
  IeDot11sPeerManagement GetIeDot11sPeerManagement ();
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    74
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    75
  static  TypeId   GetTypeId ();
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    76
  virtual TypeId   GetInstanceTypeId () const;
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    77
  virtual void     Print (std::ostream &os) const;
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    78
  virtual uint32_t GetSerializedSize () const;
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    79
  virtual void     Serialize (Buffer::Iterator start) const;
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    80
  virtual uint32_t Deserialize (Buffer::Iterator start);
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    81
  //Subtype defining methods:
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    82
  void    SetOpen ();
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    83
  void    SetConfirm ();
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    84
  void    SetClose ();
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    85
4852
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    86
  bool    IsOpen ();
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    87
  bool    IsConfirm ();
123dc54d734e Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents: 4841
diff changeset
    88
  bool    IsClose ();
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
    89
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    90
private:
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    91
  uint8_t   Subtype;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    92
  static const uint8_t MESH_MGT_HEADER_PEER_OPEN = 1;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    93
  static const uint8_t MESH_MGT_HEADER_PEER_CONFIRM = 2;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    94
  static const uint8_t MESH_MGT_HEADER_PEER_CLOSE = 3;
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    95
  // Standart is also requires a ReasonCode to be within
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    96
  // PeerLinkClose frame format, but it is present within
4838
ce31277d72ad Finished restructuring information elements
Kirill Andreev <andreev@iitp.ru>
parents: 4835
diff changeset
    97
  // IeDot11sPeerManagement, so we did not duplicate
4812
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    98
  // it.
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
    99
  uint16_t   Aid;  //only in Confirm
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
   100
  SupportedRates   Rates;  //only in Open and Confirm
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
   101
  uint16_t   QoS;  //only in Open and Confirm
adcb26652e1d Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents: 4811
diff changeset
   102
  Ssid    MeshId;  //only in Open and Confirm
4835
eca7ff6b2b47 Class names restructured
Kirill Andreev <andreev@iitp.ru>
parents: 4833
diff changeset
   103
  IeDot11sConfiguration MeshConfig; //only in Open and Confirm
4838
ce31277d72ad Finished restructuring information elements
Kirill Andreev <andreev@iitp.ru>
parents: 4835
diff changeset
   104
  IeDot11sPeerManagement PeerLinkMan; //in all types of frames
4793
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
   105
};
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
   106
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
   107
}//namespace NS3
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
   108
#endif
4f6a6772628e Merge 802.11s code.
Andrey Mazo <mazo@iitp.ru>
parents:
diff changeset
   109