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