author | Kirill Andreev <andreev@iitp.ru> |
Wed, 25 Mar 2009 12:23:12 +0300 | |
changeset 4876 | d78f1b978dac |
parent 4872 | ea1bce018a44 |
child 4899 | 50591b95753a |
permissions | -rw-r--r-- |
4793 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2008,2009 IITP RAS |
|
4 |
* |
|
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:
4810
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
4793 | 7 |
* published by the Free Software Foundation; |
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 |
* |
|
18 |
* Authors: Kirill Andreev <andreev@iitp.ru> |
|
19 |
* Aleksey Kovalenko <kovalenko@iitp.ru> |
|
20 |
*/ |
|
21 |
||
22 |
||
23 |
#ifndef MESH_PEER_MAN_ELEMENT |
|
24 |
#define MESH_PEER_MAN_ELEMENT |
|
25 |
||
4813
e4e2c44d27cd
All mesh related filed moved to devices/mesh. Let the refactoring begins!
Pavel Boyko <boyko@iitp.ru>
parents:
4812
diff
changeset
|
26 |
#include "ns3/dot11s-codes.h" |
4838
ce31277d72ad
Finished restructuring information elements
Kirill Andreev <andreev@iitp.ru>
parents:
4813
diff
changeset
|
27 |
#include "ns3/wifi-information-element.h" |
4793 | 28 |
|
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4810
diff
changeset
|
29 |
namespace ns3 { |
4872 | 30 |
namespace dot11s { |
4807
a1f43e372f9f
1. HIDE_UNDOC_CLASSES is temporary set to NO in doxygen.conf
Pavel Boyko <boyko@iitp.ru>
parents:
4793
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 See 7.3.2.85 of draft 2.07 |
4807
a1f43e372f9f
1. HIDE_UNDOC_CLASSES is temporary set to NO in doxygen.conf
Pavel Boyko <boyko@iitp.ru>
parents:
4793
diff
changeset
|
34 |
*/ |
4876
d78f1b978dac
Rstructured file names: IeDot11s* no is Ie, because it is in namespace dot11s
Kirill Andreev <andreev@iitp.ru>
parents:
4872
diff
changeset
|
35 |
class IePeerManagement : public WifiInformationElement |
4793 | 36 |
{ |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4810
diff
changeset
|
37 |
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
|
38 |
IePeerManagement (); |
4866
564372fc5491
First management frame goes through new archotecture
Kirill Andreev <andreev@iitp.ru>
parents:
4852
diff
changeset
|
39 |
enum Subtype { |
564372fc5491
First management frame goes through new archotecture
Kirill Andreev <andreev@iitp.ru>
parents:
4852
diff
changeset
|
40 |
PEER_OPEN = 0, |
564372fc5491
First management frame goes through new archotecture
Kirill Andreev <andreev@iitp.ru>
parents:
4852
diff
changeset
|
41 |
PEER_CLOSE = 1, |
564372fc5491
First management frame goes through new archotecture
Kirill Andreev <andreev@iitp.ru>
parents:
4852
diff
changeset
|
42 |
PEER_CONFIRM = 2, |
564372fc5491
First management frame goes through new archotecture
Kirill Andreev <andreev@iitp.ru>
parents:
4852
diff
changeset
|
43 |
}; |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
44 |
void SetPeerOpen (uint16_t localLinkId); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
45 |
void SetPeerClose (uint16_t localLinkID, uint16_t peerLinkId, dot11sReasonCode reasonCode); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
46 |
void SetPeerConfirm (uint16_t localLinkID, uint16_t peerLinkId); |
4793 | 47 |
|
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
48 |
dot11sReasonCode GetReasonCode () const; |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
49 |
uint16_t GetLocalLinkId () const; |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
50 |
uint16_t GetPeerLinkId () const; |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
51 |
bool SubtypeIsOpen () const; |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
52 |
bool SubtypeIsClose () const; |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
53 |
bool SubtypeIsConfirm () const ; |
4866
564372fc5491
First management frame goes through new archotecture
Kirill Andreev <andreev@iitp.ru>
parents:
4852
diff
changeset
|
54 |
uint8_t GetSubtype() const { return m_subtype;}; |
4850
c3ee1deaa07a
Code refactoring: fixed names, added references to draft
Kirill Andreev <andreev@iitp.ru>
parents:
4847
diff
changeset
|
55 |
private: |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
56 |
WifiElementId ElementId () const{ |
4838
ce31277d72ad
Finished restructuring information elements
Kirill Andreev <andreev@iitp.ru>
parents:
4813
diff
changeset
|
57 |
return IE11S_PEER_LINK_MANAGEMENT; |
ce31277d72ad
Finished restructuring information elements
Kirill Andreev <andreev@iitp.ru>
parents:
4813
diff
changeset
|
58 |
} |
ce31277d72ad
Finished restructuring information elements
Kirill Andreev <andreev@iitp.ru>
parents:
4813
diff
changeset
|
59 |
uint8_t GetInformationSize (void) const; |
ce31277d72ad
Finished restructuring information elements
Kirill Andreev <andreev@iitp.ru>
parents:
4813
diff
changeset
|
60 |
void SerializeInformation (Buffer::Iterator i) const; |
ce31277d72ad
Finished restructuring information elements
Kirill Andreev <andreev@iitp.ru>
parents:
4813
diff
changeset
|
61 |
uint8_t DeserializeInformation (Buffer::Iterator i, uint8_t length); |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4851
diff
changeset
|
62 |
void PrintInformation (std::ostream& os) const; |
4866
564372fc5491
First management frame goes through new archotecture
Kirill Andreev <andreev@iitp.ru>
parents:
4852
diff
changeset
|
63 |
private: |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4810
diff
changeset
|
64 |
uint8_t m_length; |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4810
diff
changeset
|
65 |
uint8_t m_subtype; |
4847 | 66 |
uint16_t m_localLinkId; |
67 |
/** |
|
68 |
* Present within confirm and may be present in close |
|
69 |
*/ |
|
70 |
uint16_t m_peerLinkId; |
|
71 |
/** |
|
72 |
* Present only within close frame |
|
73 |
*/ |
|
74 |
dot11sReasonCode m_reasonCode; |
|
4793 | 75 |
}; |
4872 | 76 |
|
77 |
} // namespace dot11s |
|
78 |
} //namespace ns3 |
|
4793 | 79 |
#endif |