author | Kirill Andreev <andreev@iitp.ru> |
Wed, 01 Apr 2009 13:38:09 +0400 | |
changeset 4919 | b8a0476c7e06 |
parent 4918 | 00c83f6ae8b7 |
child 4920 | fbd04c749aaa |
child 4923 | 9ea8561480a2 |
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:
4809
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 |
*/ |
|
20 |
||
21 |
||
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
22 |
#include "hwmp-protocol.h" |
4887
cbf02c77d5c1
HWMP is attached to mesh point device and MAC layer with zero functionality
Kirill Andreev <andreev@iitp.ru>
parents:
4886
diff
changeset
|
23 |
#include "hwmp-mac-plugin.h" |
4889
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
24 |
#include "hwmp-tag.h" |
4891
b8db474bce60
Added HWMP tag to mercurial :)
Kirill Andreev <andreev@iitp.ru>
parents:
4889
diff
changeset
|
25 |
#include "hwmp-rtable.h" |
4793 | 26 |
#include "ns3/log.h" |
27 |
#include "ns3/simulator.h" |
|
4887
cbf02c77d5c1
HWMP is attached to mesh point device and MAC layer with zero functionality
Kirill Andreev <andreev@iitp.ru>
parents:
4886
diff
changeset
|
28 |
#include "ns3/packet.h" |
4817
1257e4b82e17
L2RoutingProtocol refactored to MeshL2RoutingProtocol
Pavel Boyko <boyko@iitp.ru>
parents:
4813
diff
changeset
|
29 |
#include "ns3/mesh-point-device.h" |
4887
cbf02c77d5c1
HWMP is attached to mesh point device and MAC layer with zero functionality
Kirill Andreev <andreev@iitp.ru>
parents:
4886
diff
changeset
|
30 |
#include "ns3/wifi-net-device.h" |
4888
dec245c213ab
Attach interfaces replaced with Install. Helper is simplifyed
Kirill Andreev <andreev@iitp.ru>
parents:
4887
diff
changeset
|
31 |
#include "ns3/mesh-point-device.h" |
4887
cbf02c77d5c1
HWMP is attached to mesh point device and MAC layer with zero functionality
Kirill Andreev <andreev@iitp.ru>
parents:
4886
diff
changeset
|
32 |
#include "ns3/mesh-wifi-interface-mac.h" |
4895 | 33 |
#include "ie-dot11s-preq.h" |
34 |
#include "ie-dot11s-prep.h" |
|
35 |
#include "ie-dot11s-perr.h" |
|
4793 | 36 |
|
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
37 |
NS_LOG_COMPONENT_DEFINE ("HwmpProtocol"); |
4817
1257e4b82e17
L2RoutingProtocol refactored to MeshL2RoutingProtocol
Pavel Boyko <boyko@iitp.ru>
parents:
4813
diff
changeset
|
38 |
|
4793 | 39 |
namespace ns3 { |
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
40 |
namespace dot11s { |
4793 | 41 |
|
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
42 |
NS_OBJECT_ENSURE_REGISTERED (HwmpProtocol); |
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
43 |
TypeId |
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
44 |
HwmpProtocol::GetTypeId () |
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
45 |
{ |
4898
b079cb67fda2
For now mesh point aggregates installed protocols. This is done to allow user directly access protocols via mp->GetObject<...>() (though you must known mesh point and protocol class to do this)
Pavel Boyko <boyko@iitp.ru>
parents:
4896
diff
changeset
|
46 |
static TypeId tid = TypeId ("ns3::dot11s::HwmpProtocol") |
4892
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
47 |
.SetParent<MeshL2RoutingProtocol> () |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
48 |
.AddConstructor<HwmpProtocol> () |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
49 |
.AddAttribute ("dot11MeshHWMPmaxPREQretries", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
50 |
"Maximum number of retries before we suppose the destination to be unreachable", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
51 |
UintegerValue (3), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
52 |
MakeUintegerAccessor (&HwmpProtocol::m_dot11MeshHWMPmaxPREQretries), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
53 |
MakeUintegerChecker<uint8_t> (1) |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
54 |
) |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
55 |
.AddAttribute ("dot11MeshHWMPnetDiameterTraversalTime", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
56 |
"Time we suppose the packet to go from one edge of the network to another", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
57 |
TimeValue (MicroSeconds (1024*10)), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
58 |
MakeTimeAccessor (&HwmpProtocol::m_dot11MeshHWMPnetDiameterTraversalTime), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
59 |
MakeTimeChecker () |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
60 |
) |
4895 | 61 |
.AddAttribute ("dot11MeshHWMPpreqMinInterval", |
4892
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
62 |
"Minimal interval between to successive PREQs", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
63 |
TimeValue (MicroSeconds (1024*100)), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
64 |
MakeTimeAccessor (&HwmpProtocol::m_dot11MeshHWMPpreqMinInterval), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
65 |
MakeTimeChecker () |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
66 |
) |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
67 |
.AddAttribute ("dot11MeshHWMPperrMinInterval", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
68 |
"Minimal interval between to successive PREQs", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
69 |
TimeValue (MicroSeconds (1024*100)), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
70 |
MakeTimeAccessor (&HwmpProtocol::m_dot11MeshHWMPperrMinInterval), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
71 |
MakeTimeChecker () |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
72 |
) |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
73 |
.AddAttribute ("dot11MeshHWMPactiveRootTimeout", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
74 |
"Lifetime of poractive routing information", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
75 |
TimeValue (MicroSeconds (1024*5000)), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
76 |
MakeTimeAccessor (&HwmpProtocol::m_dot11MeshHWMPactiveRootTimeout), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
77 |
MakeTimeChecker () |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
78 |
) |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
79 |
.AddAttribute ("dot11MeshHWMPactivePathTimeout", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
80 |
"Lifetime of reactive routing information", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
81 |
TimeValue (MicroSeconds (1024*5000)), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
82 |
MakeTimeAccessor (&HwmpProtocol::m_dot11MeshHWMPactivePathTimeout), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
83 |
MakeTimeChecker () |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
84 |
) |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
85 |
.AddAttribute ("dot11MeshHWMPpathToRootInterval", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
86 |
"Interval between two successive proactive PREQs", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
87 |
TimeValue (MicroSeconds (1024*5000)), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
88 |
MakeTimeAccessor (&HwmpProtocol::m_dot11MeshHWMPpathToRootInterval), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
89 |
MakeTimeChecker () |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
90 |
) |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
91 |
.AddAttribute ("dot11MeshHWMPrannInterval", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
92 |
"Lifetime of poractive routing information", |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
93 |
TimeValue (MicroSeconds (1024*5000)), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
94 |
MakeTimeAccessor (&HwmpProtocol::m_dot11MeshHWMPrannInterval), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
95 |
MakeTimeChecker () |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
96 |
) |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
97 |
.AddAttribute ("maxQueueSize", |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
98 |
"Maximum number of packets we can store when resolving route", |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
99 |
UintegerValue (255), |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
100 |
MakeUintegerAccessor (&HwmpProtocol::m_maxQueueSize), |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
101 |
MakeUintegerChecker<uint16_t> (1) |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
102 |
) |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
103 |
.AddAttribute ("maxTtl", |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
104 |
"Initial value of Time To Live field", |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
105 |
UintegerValue (32), |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
106 |
MakeUintegerAccessor (&HwmpProtocol::m_maxTtl), |
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
107 |
MakeUintegerChecker<uint8_t> (2) |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
108 |
) |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
109 |
.AddAttribute ("unicastPerrThreshold", |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
110 |
"Maximum number of PERR receivers, when we send a PERR as a chain of unicasts", |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
111 |
UintegerValue (32), |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
112 |
MakeUintegerAccessor (&HwmpProtocol::m_unicastPerrThreshold), |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
113 |
MakeUintegerChecker<uint8_t> (1) |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
114 |
) |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
115 |
.AddAttribute ("unicastPreqThreshold", |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
116 |
"Maximum number of PREQ receivers, when we send a PREQ as a chain of unicasts", |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
117 |
UintegerValue (0), |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
118 |
MakeUintegerAccessor (&HwmpProtocol::m_unicastPreqThreshold), |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
119 |
MakeUintegerChecker<uint8_t> (0) |
4892
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
120 |
); |
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
121 |
return tid; |
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
122 |
} |
4889
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
123 |
HwmpProtocol::HwmpProtocol (): |
4895 | 124 |
m_dataSeqno (1), |
125 |
m_hwmpSeqno (1), |
|
126 |
m_preqId (0), |
|
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
127 |
m_rtable (CreateObject<HwmpRtable> ()), |
4895 | 128 |
m_isRoot (false), |
129 |
m_doFlag (false), |
|
130 |
m_rfFlag (false) |
|
4793 | 131 |
{ |
132 |
} |
|
133 |
||
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
134 |
HwmpProtocol::~HwmpProtocol () |
4793 | 135 |
{ |
136 |
} |
|
137 |
||
138 |
void |
|
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
139 |
HwmpProtocol::DoDispose () |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
140 |
{ |
4892
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
141 |
for (std::map<Mac48Address, EventId>::iterator i = m_preqTimeouts.begin (); i != m_preqTimeouts.end(); i ++) |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
142 |
i->second.Cancel (); |
4892
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
143 |
m_preqTimeouts.clear (); |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
144 |
m_lastDataSeqno.clear (); |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
145 |
m_lastHwmpSeqno.clear (); |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
146 |
m_rqueue.clear (); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
147 |
m_rtable = 0; |
4895 | 148 |
|
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
149 |
//TODO: clear plugins |
4793 | 150 |
} |
151 |
||
152 |
bool |
|
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
153 |
HwmpProtocol::RequestRoute ( |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
154 |
uint32_t sourceIface, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
155 |
const Mac48Address source, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
156 |
const Mac48Address destination, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
157 |
Ptr<Packet> packet, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
158 |
uint16_t protocolType, //ethrnet 'Protocol' field |
4817
1257e4b82e17
L2RoutingProtocol refactored to MeshL2RoutingProtocol
Pavel Boyko <boyko@iitp.ru>
parents:
4813
diff
changeset
|
159 |
MeshL2RoutingProtocol::RouteReplyCallback routeReply |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
160 |
) |
4793 | 161 |
{ |
4889
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
162 |
HwmpTag tag; |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
163 |
if (sourceIface == GetMeshPoint ()->GetIfIndex()) |
4817
1257e4b82e17
L2RoutingProtocol refactored to MeshL2RoutingProtocol
Pavel Boyko <boyko@iitp.ru>
parents:
4813
diff
changeset
|
164 |
// packet from level 3 |
4889
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
165 |
{ |
4918 | 166 |
NS_ASSERT (!packet->PeekPacketTag(tag)); |
4889
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
167 |
//Filling TAG: |
4918 | 168 |
if(destination == Mac48Address::GetBroadcast ()) |
169 |
{ |
|
170 |
tag.SetSeqno (m_dataSeqno++); |
|
171 |
tag.SetAddress (Mac48Address::GetBroadcast()); |
|
172 |
tag.SetTtl (m_maxTtl+1); |
|
173 |
if (m_dataSeqno == 0xffffffff) |
|
174 |
m_dataSeqno = 0; |
|
175 |
NS_LOG_UNCOND("add a tag"<<packet->GetUid()); |
|
176 |
packet->AddPacketTag(tag); |
|
177 |
} |
|
4889
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
178 |
} |
4918 | 179 |
else |
180 |
{ |
|
181 |
NS_ASSERT (packet->PeekPacketTag(tag)); |
|
182 |
if (tag.GetTtl () == 0) |
|
183 |
return false; |
|
184 |
tag.DecrementTtl (); |
|
185 |
} |
|
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
186 |
if (destination == Mac48Address::GetBroadcast ()) |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
187 |
routeReply (true, packet, source, destination, protocolType, HwmpRtable::INTERFACE_ANY); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
188 |
else |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
189 |
return ForwardUnicast(sourceIface, source, destination, packet, protocolType, routeReply); |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
190 |
return true; |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
191 |
} |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
192 |
bool |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
193 |
HwmpProtocol::ForwardUnicast(uint32_t sourceIface, const Mac48Address source, const Mac48Address destination, |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
194 |
Ptr<Packet> packet, uint16_t protocolType, RouteReplyCallback routeReply) |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
195 |
{ |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
196 |
NS_ASSERT(destination != Mac48Address::GetBroadcast ()); |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
197 |
HwmpRtable::LookupResult result = m_rtable->LookupReactive(destination); |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
198 |
if(result.retransmitter == Mac48Address::GetBroadcast ()) |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
199 |
result = m_rtable->LookupProactive (); |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
200 |
if(result.retransmitter != Mac48Address::GetBroadcast ()) |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
201 |
{ |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
202 |
//reply immediately: |
4918 | 203 |
//packet->RemoveAllTags (); |
4906 | 204 |
//Add a proper HWMP-tag: |
205 |
HwmpTag tag; |
|
4918 | 206 |
NS_ASSERT(!packet->RemovePacketTag(tag)); |
4906 | 207 |
tag.SetAddress (result.retransmitter); |
208 |
//seqno and metric is not used; |
|
4918 | 209 |
packet->AddPacketTag(tag); |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
210 |
routeReply (true, packet, source, destination, protocolType, result.ifIndex); |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
211 |
return true; |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
212 |
} |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
213 |
if (sourceIface != GetMeshPoint ()->GetIfIndex()) |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
214 |
{ |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
215 |
//Start path error procedure: |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
216 |
NS_LOG_DEBUG ("Must Send PERR"); |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
217 |
result = m_rtable->LookupReactiveExpired (destination); |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
218 |
//1. Lookup expired reactive path. If exists - start path error |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
219 |
// procedure towards a next hop of this path |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
220 |
//2. If there was no reactive path, we lookup expired proactive |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
221 |
// path. If exist - start path error procedure towards path to |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
222 |
// root |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
223 |
//3. If and only if we are a root station - we queue packet |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
224 |
if((result.retransmitter == Mac48Address::GetBroadcast ()) && (!m_isRoot)) |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
225 |
result = m_rtable->LookupProactiveExpired (); |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
226 |
if((result.retransmitter == Mac48Address::GetBroadcast ()) && (!m_isRoot)) |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
227 |
return false; |
4919
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
228 |
MakePathError (result.retransmitter); |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
229 |
if(!m_isRoot) |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
230 |
return false; |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
231 |
} |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
232 |
//Request a destination: |
4895 | 233 |
if(ShouldSendPreq(destination)) |
4901
626a970811a1
HWMP headers cleanup to create correct doxygen docs
Pavel Boyko <boyko@iitp.ru>
parents:
4900
diff
changeset
|
234 |
for(HwmpPluginMap::iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) |
4895 | 235 |
i->second->RequestDestination(destination); |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
236 |
QueuedPacket pkt; |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
237 |
HwmpTag tag; |
4918 | 238 |
packet->RemovePacketTag (tag); |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
239 |
tag.SetAddress(Mac48Address::GetBroadcast ()); |
4918 | 240 |
packet->AddPacketTag (tag); |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
241 |
pkt.pkt = packet; |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
242 |
pkt.dst = destination; |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
243 |
pkt.src = source; |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
244 |
pkt.protocol = protocolType; |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
245 |
pkt.reply = routeReply; |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
246 |
pkt.inInterface = sourceIface; |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
247 |
QueuePacket (pkt); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
248 |
return true; |
4793 | 249 |
} |
4918 | 250 |
bool |
251 |
HwmpProtocol::HandleIncomingFrame (Ptr<Packet> packet, Mac48Address src, Mac48Address dst, uint16_t protocol) |
|
252 |
{ |
|
253 |
//Handle only incoming frames: |
|
254 |
NS_ASSERT(dst == m_address); |
|
255 |
HwmpTag tag; |
|
256 |
NS_ASSERT(packet->RemovePacketTag(tag)); |
|
257 |
return true; |
|
258 |
} |
|
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
259 |
void |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
260 |
HwmpProtocol::ReceivePreq (IePreq preq, Mac48Address from, uint32_t interface) |
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
261 |
{ |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
262 |
preq.IncrementMetric (1); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
263 |
//acceptance cretirea: |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
264 |
std::map<Mac48Address, uint32_t>::iterator i = m_lastHwmpSeqno.find (preq.GetOriginatorAddress()); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
265 |
if (i == m_lastHwmpSeqno.end ()) |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
266 |
{ |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
267 |
m_lastHwmpSeqno[preq.GetOriginatorAddress ()] = preq.GetOriginatorSeqNumber(); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
268 |
m_lastHwmpMetric[preq.GetOriginatorAddress ()] = preq.GetMetric(); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
269 |
} |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
270 |
else |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
271 |
{ |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
272 |
if (i->second > preq.GetOriginatorSeqNumber ()) |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
273 |
return; |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
274 |
if (i->second == preq.GetOriginatorSeqNumber ()) |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
275 |
{ |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
276 |
//find metric |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
277 |
std::map<Mac48Address, uint32_t>::iterator j = |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
278 |
m_lastHwmpMetric.find (preq.GetOriginatorAddress()); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
279 |
NS_ASSERT (j != m_lastHwmpSeqno.end()); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
280 |
if (j->second <= preq.GetMetric ()) |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
281 |
return; |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
282 |
} |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
283 |
m_lastHwmpSeqno[preq.GetOriginatorAddress ()] = preq.GetOriginatorSeqNumber(); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
284 |
m_lastHwmpMetric[preq.GetOriginatorAddress ()] = preq.GetMetric(); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
285 |
} |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
286 |
//check if can answer: |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
287 |
std::vector<Ptr<DestinationAddressUnit> > destinations = preq.GetDestinationList (); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
288 |
for (std::vector<Ptr<DestinationAddressUnit> >::iterator i = destinations.begin (); i != destinations.end(); i++) |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
289 |
{ |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
290 |
if ((*i)->GetDestinationAddress () == Mac48Address::GetBroadcast()) |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
291 |
{ |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
292 |
//only proactive PREQ contains destination |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
293 |
//address as broadcast! Proactive preq MUST |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
294 |
//have destination count equal to 1 and |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
295 |
//per destination flags DO and RF |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
296 |
NS_ASSERT (preq.GetDestCount() == 1); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
297 |
NS_ASSERT (((*i)->IsDo()) && ((*i)->IsRf())); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
298 |
m_rtable->AddProactivePath ( |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
299 |
preq.GetMetric (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
300 |
preq.GetOriginatorAddress (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
301 |
from, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
302 |
interface, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
303 |
MicroSeconds (preq.GetLifetime () * 1024), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
304 |
preq.GetOriginatorSeqNumber () |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
305 |
); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
306 |
ProactivePathResolved (); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
307 |
if (!preq.IsNeedNotPrep ()) |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
308 |
SendPrep ( |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
309 |
m_address, |
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
310 |
preq.GetOriginatorAddress (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
311 |
from, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
312 |
preq.GetMetric (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
313 |
preq.GetOriginatorSeqNumber (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
314 |
GetNextHwmpSeqno (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
315 |
preq.GetLifetime (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
316 |
interface |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
317 |
); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
318 |
break; |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
319 |
} |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
320 |
if ((*i)->GetDestinationAddress () == m_address) |
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
321 |
{ |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
322 |
NS_LOG_UNCOND("PREQ has reached destination:"<<m_address); |
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
323 |
preq.DelDestinationAddressElement ((*i)->GetDestinationAddress()); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
324 |
SendPrep ( |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
325 |
m_address, |
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
326 |
preq.GetOriginatorAddress (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
327 |
from, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
328 |
(uint32_t)0, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
329 |
preq.GetOriginatorSeqNumber (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
330 |
GetNextHwmpSeqno (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
331 |
preq.GetLifetime (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
332 |
interface |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
333 |
); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
334 |
continue; |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
335 |
} |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
336 |
//check if can answer: |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
337 |
HwmpRtable::LookupResult result = m_rtable->LookupReactive ((*i)->GetDestinationAddress()); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
338 |
if ((! ((*i)->IsDo())) && (result.retransmitter != Mac48Address::GetBroadcast())) |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
339 |
{ |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
340 |
//have a valid information and acn answer |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
341 |
if ((*i)->IsRf ()) |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
342 |
(*i)->SetFlags (true, false); //DO = 1, RF = 0 (as it was) |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
343 |
else |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
344 |
{ |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
345 |
//send a PREP and delete destination |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
346 |
preq.DelDestinationAddressElement ((*i)->GetDestinationAddress()); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
347 |
SendPrep ( |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
348 |
(*i)->GetDestinationAddress (), |
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
349 |
preq.GetOriginatorAddress (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
350 |
from, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
351 |
result.metric, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
352 |
preq.GetOriginatorSeqNumber (), |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
353 |
result.seqnum +1, |
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
354 |
preq.GetLifetime (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
355 |
interface |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
356 |
); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
357 |
continue; |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
358 |
} |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
359 |
} |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
360 |
} |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
361 |
m_rtable->AddReactivePath ( |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
362 |
preq.GetOriginatorAddress (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
363 |
from, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
364 |
interface, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
365 |
preq.GetMetric (), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
366 |
MicroSeconds (preq.GetLifetime () *1024), |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
367 |
preq.GetOriginatorSeqNumber () |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
368 |
); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
369 |
ReactivePathResolved (preq.GetOriginatorAddress ()); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
370 |
//m_routingInfoCallback (newInfo); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
371 |
//chack if must retransmit: |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
372 |
if (preq.GetDestCount () == 0) |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
373 |
return; |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
374 |
//Forward PREQ to all interfaces: |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
375 |
NS_LOG_UNCOND("I am "<<m_address<<"retransmitting PREQ:"<<preq); |
4901
626a970811a1
HWMP headers cleanup to create correct doxygen docs
Pavel Boyko <boyko@iitp.ru>
parents:
4900
diff
changeset
|
376 |
for(HwmpPluginMap::iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
377 |
i->second->SendPreq (preq); |
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
378 |
} |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
379 |
void |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
380 |
HwmpProtocol::ReceivePrep (IePrep prep, Mac48Address from, uint32_t interface) |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
381 |
{ |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
382 |
prep.IncrementMetric (1); |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
383 |
//acceptance cretirea: |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
384 |
NS_LOG_UNCOND("I am "<<m_address<<", received prep"); |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
385 |
std::map<Mac48Address, uint32_t>::iterator i = m_lastHwmpSeqno.find (prep.GetOriginatorAddress()); |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
386 |
if (i == m_lastHwmpSeqno.end ()) |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
387 |
{ |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
388 |
m_lastHwmpSeqno[prep.GetOriginatorAddress ()] = prep.GetOriginatorSeqNumber(); |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
389 |
} |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
390 |
else |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
391 |
if (i->second > prep.GetOriginatorSeqNumber ()) |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
392 |
return; |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
393 |
//update routing info |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
394 |
//Now add a path to destination and add precursor to source |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
395 |
m_rtable->AddPrecursor (prep.GetDestinationAddress (), interface, from); |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
396 |
m_rtable->AddReactivePath ( |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
397 |
prep.GetOriginatorAddress (), |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
398 |
from, |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
399 |
interface, |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
400 |
prep.GetMetric (), |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
401 |
MicroSeconds(prep.GetLifetime () * 1024), |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
402 |
prep.GetOriginatorSeqNumber ()); |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
403 |
if(prep.GetDestinationAddress() == m_address) |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
404 |
NS_LOG_UNCOND("Destination resolved:"<<prep.GetOriginatorAddress ()); |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
405 |
HwmpRtable::LookupResult result = m_rtable->LookupReactive(prep.GetDestinationAddress()); |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
406 |
if (result.retransmitter == Mac48Address::GetBroadcast ()) |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
407 |
//try to look for default route |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
408 |
result = m_rtable->LookupProactive (); |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
409 |
if (result.retransmitter == Mac48Address::GetBroadcast ()) |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
410 |
{ |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
411 |
NS_LOG_UNCOND("I am "<<m_address<<", can not forward prep"); |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
412 |
return; |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
413 |
} |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
414 |
m_rtable->AddPrecursor (prep.GetOriginatorAddress (), interface, result.retransmitter); |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
415 |
//Forward PREP |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
416 |
HwmpPluginMap::iterator prep_sender = m_interfaces.find (result.ifIndex); |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
417 |
NS_ASSERT(prep_sender != m_interfaces.end ()); |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
418 |
prep_sender->second->SendPrep(prep, result.retransmitter); |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
419 |
|
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
420 |
} |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
421 |
void |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
422 |
HwmpProtocol::ReceivePerr (IePerr perr, Mac48Address from, uint32_t interface) |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
423 |
{ |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
424 |
} |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
425 |
void |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
426 |
HwmpProtocol::SendPrep ( |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
427 |
Mac48Address src, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
428 |
Mac48Address dst, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
429 |
Mac48Address retransmitter, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
430 |
uint32_t initMetric, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
431 |
uint32_t originatorDsn, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
432 |
uint32_t destinationSN, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
433 |
uint32_t lifetime, |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
434 |
uint32_t interface) |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
435 |
{ |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
436 |
NS_LOG_UNCOND("sending prep to "<<dst<<" through "<<retransmitter); |
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
437 |
IePrep prep; |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
438 |
prep.SetHopcount (0); |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
439 |
prep.SetTtl (m_maxTtl); |
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
440 |
prep.SetDestinationAddress (dst); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
441 |
prep.SetDestinationSeqNumber (destinationSN); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
442 |
prep.SetLifetime (lifetime); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
443 |
prep.SetMetric (0); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
444 |
prep.SetOriginatorAddress (src); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
445 |
prep.SetOriginatorSeqNumber (originatorDsn); |
4901
626a970811a1
HWMP headers cleanup to create correct doxygen docs
Pavel Boyko <boyko@iitp.ru>
parents:
4900
diff
changeset
|
446 |
HwmpPluginMap::iterator prep_sender = m_interfaces.find (interface); |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
447 |
NS_ASSERT(prep_sender != m_interfaces.end ()); |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
448 |
prep_sender->second->SendPrep(prep, retransmitter); |
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
449 |
//m_prepCallback (prep, retransmitter); |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
450 |
|
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
451 |
} |
4793 | 452 |
bool |
4888
dec245c213ab
Attach interfaces replaced with Install. Helper is simplifyed
Kirill Andreev <andreev@iitp.ru>
parents:
4887
diff
changeset
|
453 |
HwmpProtocol::Install (Ptr<MeshPointDevice> mp) |
4793 | 454 |
{ |
4888
dec245c213ab
Attach interfaces replaced with Install. Helper is simplifyed
Kirill Andreev <andreev@iitp.ru>
parents:
4887
diff
changeset
|
455 |
m_mp = mp; |
dec245c213ab
Attach interfaces replaced with Install. Helper is simplifyed
Kirill Andreev <andreev@iitp.ru>
parents:
4887
diff
changeset
|
456 |
std::vector<Ptr<NetDevice> > interfaces = mp->GetInterfaces (); |
4887
cbf02c77d5c1
HWMP is attached to mesh point device and MAC layer with zero functionality
Kirill Andreev <andreev@iitp.ru>
parents:
4886
diff
changeset
|
457 |
for (std::vector<Ptr<NetDevice> >::iterator i = interfaces.begin (); i != interfaces.end(); i++) |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
458 |
{ |
4898
b079cb67fda2
For now mesh point aggregates installed protocols. This is done to allow user directly access protocols via mp->GetObject<...>() (though you must known mesh point and protocol class to do this)
Pavel Boyko <boyko@iitp.ru>
parents:
4896
diff
changeset
|
459 |
// Checking for compatible net device |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
460 |
const WifiNetDevice * wifiNetDev = dynamic_cast<const WifiNetDevice *> (PeekPointer (*i)); |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
461 |
if (wifiNetDev == NULL) |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
462 |
return false; |
4887
cbf02c77d5c1
HWMP is attached to mesh point device and MAC layer with zero functionality
Kirill Andreev <andreev@iitp.ru>
parents:
4886
diff
changeset
|
463 |
MeshWifiInterfaceMac * mac = dynamic_cast<MeshWifiInterfaceMac *> (PeekPointer (wifiNetDev->GetMac ())); |
cbf02c77d5c1
HWMP is attached to mesh point device and MAC layer with zero functionality
Kirill Andreev <andreev@iitp.ru>
parents:
4886
diff
changeset
|
464 |
if (mac == NULL) |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
465 |
return false; |
4898
b079cb67fda2
For now mesh point aggregates installed protocols. This is done to allow user directly access protocols via mp->GetObject<...>() (though you must known mesh point and protocol class to do this)
Pavel Boyko <boyko@iitp.ru>
parents:
4896
diff
changeset
|
466 |
// Installing plugins: |
4887
cbf02c77d5c1
HWMP is attached to mesh point device and MAC layer with zero functionality
Kirill Andreev <andreev@iitp.ru>
parents:
4886
diff
changeset
|
467 |
Ptr<HwmpMacPlugin> hwmpMac = Create<HwmpMacPlugin> (wifiNetDev->GetIfIndex (), this); |
cbf02c77d5c1
HWMP is attached to mesh point device and MAC layer with zero functionality
Kirill Andreev <andreev@iitp.ru>
parents:
4886
diff
changeset
|
468 |
m_interfaces[wifiNetDev->GetIfIndex ()] = hwmpMac; |
cbf02c77d5c1
HWMP is attached to mesh point device and MAC layer with zero functionality
Kirill Andreev <andreev@iitp.ru>
parents:
4886
diff
changeset
|
469 |
mac->InstallPlugin (hwmpMac); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
470 |
} |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
471 |
mp->SetRoutingProtocol (this); |
4898
b079cb67fda2
For now mesh point aggregates installed protocols. This is done to allow user directly access protocols via mp->GetObject<...>() (though you must known mesh point and protocol class to do this)
Pavel Boyko <boyko@iitp.ru>
parents:
4896
diff
changeset
|
472 |
// Mesh point aggregates all installed protocols |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
473 |
mp->AggregateObject (this); |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
474 |
//Address tmp_addr = mp->GetAddress (); |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
475 |
//Mac48Address * address = dynamic_cast<Mac48Address *> (&tmp_addr); |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
476 |
//if (address == NULL) |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
477 |
// return false; |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
478 |
m_address = Mac48Address::ConvertFrom (mp->GetAddress ());//* address; |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
479 |
return true; |
4793 | 480 |
} |
4919
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
481 |
void |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
482 |
HwmpProtocol::PeerLinkStatus(Mac48Address peerAddress, uint32_t interface, bool status) |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
483 |
{ |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
484 |
if(status) |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
485 |
{ |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
486 |
// m_rtable->AddReactivePath(peerAddress, peerAddress, interface, 1, Seconds (0), 0); |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
487 |
} |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
488 |
else |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
489 |
MakePathError (peerAddress); |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
490 |
} |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
491 |
void |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
492 |
HwmpProtocol::SetNeighboursCallback(Callback<std::vector<Mac48Address>, uint32_t> cb) |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
493 |
{ |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
494 |
m_neighboursCallback = cb; |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
495 |
} |
4889
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
496 |
bool |
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
497 |
HwmpProtocol::DropDataFrame(uint32_t seqno, Mac48Address source) |
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
498 |
{ |
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
499 |
std::map<Mac48Address, uint32_t,std::less<Mac48Address> >::iterator i = m_lastDataSeqno.find (source); |
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
500 |
if (i == m_lastDataSeqno.end ()) |
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
501 |
m_lastDataSeqno[source] = seqno; |
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
502 |
else |
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
503 |
{ |
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
504 |
if (i->second >= seqno) |
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
505 |
return true; |
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
506 |
m_lastDataSeqno[source] = seqno; |
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
507 |
} |
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
508 |
return false; |
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
509 |
} |
279b07de3327
Fixrd bugs with address extensions, broadcast frames can go through L2Routing
Kirill Andreev <andreev@iitp.ru>
parents:
4888
diff
changeset
|
510 |
|
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
511 |
#if 0 |
4793 | 512 |
void |
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
513 |
HwmpProtocol::ObtainRoutingInformation ( |
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
514 |
HwmpProtocolState::INFO info |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
515 |
) |
4793 | 516 |
{ |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
517 |
switch (info.type) |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
518 |
{ |
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
519 |
case HwmpProtocolState::INFO_PREP: |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
520 |
if (info.me != info.source) |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
521 |
{ |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
522 |
m_rtable->AddPrecursor (info.source, info.outPort, info.nextHop); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
523 |
m_rtable->AddPrecursor (info.destination, info.outPort, info.prevHop); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
524 |
NS_LOG_DEBUG ("path to "<<info.source<<" precursor is "<<info.nextHop); |
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
525 |
NS_LOG_DEBUG ("path to "<<info.destination<<" precursor is "<<info.prevHop); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
526 |
} |
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
527 |
case HwmpProtocolState::INFO_PREQ: |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
528 |
m_rtable->AddReactivePath ( |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
529 |
info.destination, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
530 |
info.nextHop, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
531 |
info.outPort, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
532 |
info.metric, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
533 |
info.lifetime, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
534 |
info.dsn); |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
535 |
SendAllPossiblePackets (info.destination); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
536 |
break; |
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
537 |
case HwmpProtocolState::INFO_PERR: |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
538 |
//delete first subentry |
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
539 |
case HwmpProtocolState::INFO_PROACTIVE: |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
540 |
//add information to the root MP. |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
541 |
m_rtable->AddProactivePath ( |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
542 |
info.metric, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
543 |
info.destination, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
544 |
info.nextHop, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
545 |
info.outPort, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
546 |
info.lifetime, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
547 |
info.dsn); |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
548 |
//Set mode as PROACTIVE: |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
549 |
SetProactive (info.outPort); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
550 |
break; |
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
551 |
case HwmpProtocolState::INFO_NEW_PEER: |
4793 | 552 |
#if 0 |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
553 |
m_rtable->AddReactivePath ( |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
554 |
info.destination, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
555 |
info.nextHop, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
556 |
info.outPort, |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
557 |
info.metric, |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
558 |
Seconds (0), |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
559 |
0); |
4793 | 560 |
#endif |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
561 |
break; |
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
562 |
case HwmpProtocolState::INFO_FAILED_PEER: |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
563 |
/** |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
564 |
* Conditions for generating PERR |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
565 |
*/ |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
566 |
{ |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
567 |
NS_LOG_DEBUG ("Failed peer"<<info.destination); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
568 |
std::vector<HwmpRtable::FailedDestination> failedDestinations = |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
569 |
m_rtable->GetUnreachableDestinations (info.destination, info.outPort); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
570 |
/** |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
571 |
* Entry about peer does not contain seqnum |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
572 |
*/ |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
573 |
HwmpRtable::FailedDestination peer; |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
574 |
peer.destination = info.destination; |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
575 |
peer.seqnum = 0; |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
576 |
failedDestinations.push_back (peer); |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
577 |
MakePathError (failedDestinations, info.outPort); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
578 |
} |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
579 |
break; |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
580 |
default: |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
581 |
return; |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
582 |
} |
4793 | 583 |
} |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
584 |
#endif |
4793 | 585 |
void |
4919
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
586 |
HwmpProtocol::MakePathError (Mac48Address retransmitter) |
4793 | 587 |
{ |
4919
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
588 |
NS_LOG_UNCOND ("START PERR, I am "<<m_address); |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
589 |
//TODO: |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
590 |
//make a perr IE and send |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
591 |
std::vector<IePerr::FailedDestination> destinations = m_rtable->GetUnreachableDestinations (retransmitter); |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
592 |
//HwmpRtable increments a sequence number as written in 11B.9.7.2 |
4919
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
593 |
NS_LOG_UNCOND("Number of unreachable destinations:"<<destinations.size ()); |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
594 |
for(std::vector<IePerr::FailedDestination>::iterator i = destinations.begin (); i != destinations.end (); i ++) |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
595 |
{ |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
596 |
HwmpRtable::LookupResult result = m_rtable->LookupReactiveExpired (i->destination); |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
597 |
NS_LOG_UNCOND("Address::"<<i->destination<<", next hop is "<<result.retransmitter); |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
598 |
} |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
599 |
std::vector<std::pair<uint32_t, Mac48Address> > receivers = GetPerrReceivers (destinations); |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
600 |
NS_LOG_UNCOND("Number of perr receivers:"<<receivers.size ()); |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
601 |
if(receivers.size () == 0) |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
602 |
return; |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
603 |
for(std::vector<std::pair<uint32_t, Mac48Address> >::iterator i = receivers.begin (); i != receivers.end (); i ++) |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
604 |
NS_LOG_UNCOND("Address:"<<i->second<<", interface:"<<i->first); |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
605 |
//form a path error and send it to proper ports |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
606 |
IePerr perr; |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
607 |
NS_ASSERT(false); |
4793 | 608 |
} |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
609 |
std::vector<std::pair<uint32_t, Mac48Address> > |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
610 |
HwmpProtocol::GetPerrReceivers (std::vector<IePerr::FailedDestination> failedDest) |
4793 | 611 |
{ |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
612 |
HwmpRtable::PRECURSOR_LIST retval; |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
613 |
for (unsigned int i = 0; i < failedDest.size (); i ++) |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
614 |
{ |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
615 |
HwmpRtable::PRECURSOR_LIST precursors = m_rtable->GetPrecursors(failedDest[i].destination); |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
616 |
m_rtable->DeleteReactivePath (failedDest[i].destination); |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
617 |
m_rtable->DeleteProactivePath(failedDest[i].destination); |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
618 |
for (unsigned int j = 0; j < precursors.size (); j ++) |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
619 |
retval.push_back(precursors[j]); |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
620 |
} |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
621 |
//Check if we have dublicates in retval and precursors: |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
622 |
unsigned int size = retval.size(); |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
623 |
for (unsigned int i = 0; i < size; i ++) |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
624 |
for (unsigned int j = i; j < size; j ++) |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
625 |
if(retval[i].second == retval[j].second) |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
626 |
{ |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
627 |
//erase and check size |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
628 |
NS_LOG_UNCOND("deleting dublicate"); |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
629 |
retval.erase(retval.begin() + j); |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
630 |
size --; |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
631 |
} |
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
632 |
return retval; |
4793 | 633 |
} |
4895 | 634 |
std::vector<Mac48Address> |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
635 |
HwmpProtocol::GetPreqReceivers (uint32_t interface) |
4895 | 636 |
{ |
637 |
std::vector<Mac48Address> retval; |
|
4919
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
638 |
if(!m_neighboursCallback.IsNull ()) retval = m_neighboursCallback (interface); |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
639 |
if (retval.size() >= m_unicastPreqThreshold) |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
640 |
{ |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
641 |
retval.clear (); |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
642 |
retval.push_back (Mac48Address::GetBroadcast ()); |
b8a0476c7e06
Added unicast PREQ, peer link status callback.
Kirill Andreev <andreev@iitp.ru>
parents:
4918
diff
changeset
|
643 |
} |
4895 | 644 |
return retval; |
645 |
} |
|
4793 | 646 |
bool |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
647 |
HwmpProtocol::QueuePacket (QueuedPacket packet) |
4793 | 648 |
{ |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
649 |
if (m_rqueue.size () > m_maxQueueSize) |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
650 |
return false; |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
651 |
m_rqueue.push_back (packet); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
652 |
return true; |
4793 | 653 |
} |
654 |
||
4817
1257e4b82e17
L2RoutingProtocol refactored to MeshL2RoutingProtocol
Pavel Boyko <boyko@iitp.ru>
parents:
4813
diff
changeset
|
655 |
MeshL2RoutingProtocol::QueuedPacket |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
656 |
HwmpProtocol::DequeueFirstPacketByDst (Mac48Address dst) |
4793 | 657 |
{ |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
658 |
QueuedPacket retval; |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
659 |
retval.pkt = NULL; |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
660 |
for(std::vector<QueuedPacket>::iterator i = m_rqueue.begin (); i != m_rqueue.end (); i++) |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
661 |
if((*i).dst == dst) |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
662 |
{ |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
663 |
retval = (*i); |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
664 |
m_rqueue.erase (i); |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
665 |
break; |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
666 |
} |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
667 |
return retval; |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
668 |
} |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
669 |
MeshL2RoutingProtocol::QueuedPacket |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
670 |
HwmpProtocol::DequeueFirstPacket () |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
671 |
{ |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
672 |
QueuedPacket retval; |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
673 |
retval.pkt = NULL; |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
674 |
if(m_rqueue.size () != 0) |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
675 |
retval = m_rqueue[0]; |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
676 |
m_rqueue.erase (m_rqueue.begin ()); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
677 |
return retval; |
4793 | 678 |
} |
679 |
void |
|
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
680 |
HwmpProtocol::ReactivePathResolved (Mac48Address dst) |
4793 | 681 |
{ |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
682 |
HwmpRtable::LookupResult result = m_rtable->LookupReactive (dst); |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
683 |
NS_ASSERT(result.retransmitter != Mac48Address::GetBroadcast ()); |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
684 |
//Send all packets stored for this destination |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
685 |
QueuedPacket packet; |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
686 |
while (1) |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
687 |
{ |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
688 |
packet = DequeueFirstPacketByDst (dst); |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
689 |
if (packet.pkt == NULL) |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
690 |
return; |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
691 |
//set RA tag for retransmitter: |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
692 |
HwmpTag tag; |
4918 | 693 |
NS_ASSERT (packet.pkt->PeekPacketTag(tag)); |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
694 |
tag.SetAddress (result.retransmitter); |
4918 | 695 |
packet.pkt->AddPacketTag (tag); |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
696 |
packet.reply (true, packet.pkt, packet.src, packet.dst, packet.protocol, result.ifIndex); |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
697 |
} |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
698 |
} |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
699 |
void |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
700 |
HwmpProtocol::ProactivePathResolved () |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
701 |
{ |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
702 |
//send all packets to root |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
703 |
HwmpRtable::LookupResult result = m_rtable->LookupProactive (); |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
704 |
NS_ASSERT(result.retransmitter != Mac48Address::GetBroadcast ()); |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
705 |
QueuedPacket packet; |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
706 |
while (1) |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
707 |
{ |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
708 |
packet = DequeueFirstPacket (); |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
709 |
if (packet.pkt == NULL) |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
710 |
return; |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
711 |
//set RA tag for retransmitter: |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
712 |
HwmpTag tag; |
4918 | 713 |
NS_ASSERT (packet.pkt->PeekPacketTag(tag)); |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
714 |
tag.SetAddress (result.retransmitter); |
4918 | 715 |
packet.pkt->AddPacketTag (tag); |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
716 |
packet.reply (true, packet.pkt, packet.src, packet.dst, packet.protocol, result.ifIndex); |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
717 |
} |
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
718 |
|
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
719 |
} |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
720 |
|
4793 | 721 |
bool |
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
722 |
HwmpProtocol::ShouldSendPreq (Mac48Address dst) |
4793 | 723 |
{ |
4892
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
724 |
std::map<Mac48Address, EventId>::iterator i = m_preqTimeouts.find (dst); |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
725 |
if (i == m_preqTimeouts.end ()) |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
726 |
{ |
4895 | 727 |
NS_LOG_UNCOND("Timeout is:" <<2*(m_dot11MeshHWMPnetDiameterTraversalTime.GetMilliSeconds())); |
4892
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
728 |
m_preqTimeouts[dst] = Simulator::Schedule ( |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
729 |
MilliSeconds (2*(m_dot11MeshHWMPnetDiameterTraversalTime.GetMilliSeconds())), |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
730 |
&HwmpProtocol::RetryPathDiscovery, this, dst, 0); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
731 |
return true; |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
732 |
} |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
733 |
return false; |
4793 | 734 |
} |
735 |
void |
|
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
736 |
HwmpProtocol::RetryPathDiscovery (Mac48Address dst, uint8_t numOfRetry) |
4793 | 737 |
{ |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
738 |
HwmpRtable::LookupResult result = m_rtable->LookupReactive (dst); |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
739 |
if(result.retransmitter == Mac48Address::GetBroadcast ()) |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
740 |
result = m_rtable->LookupProactive (); |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
741 |
if (result.retransmitter != Mac48Address::GetBroadcast ()) |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
742 |
{ |
4892
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
743 |
std::map<Mac48Address, EventId>::iterator i = m_preqTimeouts.find (dst); |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
744 |
NS_ASSERT (i != m_preqTimeouts.end()); |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
745 |
m_preqTimeouts.erase (i); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
746 |
return; |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
747 |
} |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
748 |
numOfRetry++; |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
749 |
if (numOfRetry > m_dot11MeshHWMPmaxPREQretries) |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
750 |
{ |
4894
a6cf8696922a
HwmpProtocol: path error procedure reviewed, RequestRoute reviewed
Kirill Andreev <andreev@iitp.ru>
parents:
4893
diff
changeset
|
751 |
QueuedPacket packet; |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
752 |
//purge queue and delete entry from retryDatabase |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
753 |
while (1) |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
754 |
{ |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
755 |
packet = DequeueFirstPacketByDst (dst); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
756 |
if (packet.pkt == NULL) |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
757 |
break; |
4852
123dc54d734e
Coding style changes: indentation (some fixes), spaces in operators, function
Andrey Mazo <mazo@iitp.ru>
parents:
4837
diff
changeset
|
758 |
packet.reply (false, packet.pkt, packet.src, packet.dst, packet.protocol, HwmpRtable::MAX_METRIC); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
759 |
} |
4892
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
760 |
std::map<Mac48Address, EventId>::iterator i = m_preqTimeouts.find (dst); |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
761 |
NS_ASSERT (i != m_preqTimeouts.end()); |
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
762 |
m_preqTimeouts.erase (i); |
4812
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
763 |
return; |
adcb26652e1d
Coding style changes: indentation, spaces.
Andrey Mazo <mazo@iitp.ru>
parents:
4809
diff
changeset
|
764 |
} |
4901
626a970811a1
HWMP headers cleanup to create correct doxygen docs
Pavel Boyko <boyko@iitp.ru>
parents:
4900
diff
changeset
|
765 |
for(HwmpPluginMap::iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
766 |
{ |
4895 | 767 |
i->second->RequestDestination(dst); |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
768 |
i->second->RequestDestination(Mac48Address("00:00:00:00:00:10")); |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
769 |
} |
4892
cdd13648776b
Removed dot11s-parameters and they are made as attributes
Kirill Andreev <andreev@iitp.ru>
parents:
4891
diff
changeset
|
770 |
m_preqTimeouts[dst] = Simulator::Schedule ( |
4893
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
771 |
MilliSeconds (2*(m_dot11MeshHWMPnetDiameterTraversalTime.GetMilliSeconds())), |
d390c2dd2f14
Restructured rtable, queue size moved from protocol setter to attribute
Kirill Andreev <andreev@iitp.ru>
parents:
4892
diff
changeset
|
772 |
&HwmpProtocol::RetryPathDiscovery, this, dst, numOfRetry); |
4793 | 773 |
} |
4895 | 774 |
//Proactive PREQ routines: |
775 |
void |
|
776 |
HwmpProtocol::SetRoot () |
|
777 |
{ |
|
778 |
SendProactivePreq (); |
|
779 |
m_isRoot = true; |
|
780 |
} |
|
781 |
void |
|
782 |
HwmpProtocol::UnsetRoot () |
|
783 |
{ |
|
784 |
m_proactivePreqTimer.Cancel (); |
|
785 |
} |
|
786 |
void |
|
787 |
HwmpProtocol::SendProactivePreq () |
|
788 |
{ |
|
789 |
NS_LOG_DEBUG ("Sending proactive PREQ"); |
|
790 |
IePreq preq; |
|
791 |
//By default: must answer |
|
792 |
preq.SetHopcount (0); |
|
793 |
preq.SetTTL (m_maxTtl); |
|
794 |
if (m_preqId == 0xffffffff) |
|
795 |
m_preqId = 0; |
|
796 |
preq.SetLifetime (m_dot11MeshHWMPpathToRootInterval.GetMicroSeconds () /1024); |
|
797 |
//\attention: do not forget to set originator address, sequence |
|
798 |
//number and preq ID in HWMP-MAC plugin |
|
799 |
preq.AddDestinationAddressElement (true, true, Mac48Address::GetBroadcast (), 0); |
|
4901
626a970811a1
HWMP headers cleanup to create correct doxygen docs
Pavel Boyko <boyko@iitp.ru>
parents:
4900
diff
changeset
|
800 |
for(HwmpPluginMap::iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) |
4900
0c34a34208f2
restructured precursors in rtable
Kirill Andreev <andreev@iitp.ru>
parents:
4898
diff
changeset
|
801 |
i->second->SendPreq(preq); |
4895 | 802 |
m_proactivePreqTimer = Simulator::Schedule (m_dot11MeshHWMPactiveRootTimeout, &HwmpProtocol::SendProactivePreq, this); |
803 |
} |
|
804 |
bool |
|
805 |
HwmpProtocol::GetDoFlag () |
|
806 |
{ |
|
807 |
return m_doFlag; |
|
808 |
} |
|
809 |
bool |
|
810 |
HwmpProtocol::GetRfFlag () |
|
811 |
{ |
|
812 |
return m_rfFlag; |
|
813 |
} |
|
814 |
Time |
|
815 |
HwmpProtocol::GetPreqMinInterval () |
|
816 |
{ |
|
817 |
return m_dot11MeshHWMPpreqMinInterval; |
|
818 |
} |
|
819 |
Time |
|
820 |
HwmpProtocol::GetPerrMinInterval () |
|
821 |
{ |
|
822 |
return m_dot11MeshHWMPperrMinInterval; |
|
823 |
} |
|
824 |
uint8_t |
|
825 |
HwmpProtocol::GetMaxTtl () |
|
826 |
{ |
|
827 |
return m_maxTtl; |
|
828 |
} |
|
829 |
uint32_t |
|
830 |
HwmpProtocol::GetNextPreqId () |
|
831 |
{ |
|
832 |
m_preqId ++; |
|
833 |
if(m_preqId == 0xffffffff) |
|
834 |
m_preqId = 0; |
|
835 |
return m_preqId; |
|
836 |
} |
|
837 |
uint32_t |
|
838 |
HwmpProtocol::GetNextHwmpSeqno () |
|
839 |
{ |
|
840 |
m_hwmpSeqno ++; |
|
841 |
if(m_hwmpSeqno == 0xffffffff) |
|
842 |
m_hwmpSeqno = 0; |
|
843 |
return m_hwmpSeqno; |
|
844 |
} |
|
4896
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
845 |
uint32_t |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
846 |
HwmpProtocol::GetActivePathLifetime () |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
847 |
{ |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
848 |
return m_dot11MeshHWMPactivePathTimeout.GetMicroSeconds () / 1024; |
e579c19f0dee
Preq propagation ported:)
Kirill Andreev <andreev@iitp.ru>
parents:
4895
diff
changeset
|
849 |
} |
4905
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
850 |
Mac48Address |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
851 |
HwmpProtocol::GetAddress () |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
852 |
{ |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
853 |
return m_address; |
cd7eb4fd3829
PREP propagation ported!!!
Kirill Andreev <andreev@iitp.ru>
parents:
4901
diff
changeset
|
854 |
} |
4886
bdbf21835837
HWMP rolled to "initial position"
Kirill Andreev <andreev@iitp.ru>
parents:
4883
diff
changeset
|
855 |
} //namespace dot11s |
4793 | 856 |
} //namespace ns3 |