A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
hwmp-protocol.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008,2009 IITP RAS
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Authors: Kirill Andreev <andreev@iitp.ru>
18 */
19
20#ifndef HWMP_PROTOCOL_H
21#define HWMP_PROTOCOL_H
22
23#include "ns3/event-id.h"
24#include "ns3/mesh-l2-routing-protocol.h"
25#include "ns3/nstime.h"
26#include "ns3/traced-value.h"
27
28#include <map>
29#include <vector>
30
31namespace ns3
32{
33class MeshPointDevice;
34class Packet;
35class Mac48Address;
36class UniformRandomVariable;
37class RandomVariableStream;
38
39namespace dot11s
40{
41class HwmpProtocolMac;
42class HwmpRtable;
43class IePerr;
44class IePreq;
45class IePrep;
46
47/**
48 * Structure to encapsulate route change information
49 */
51{
52 std::string type; ///< type of change
53 Mac48Address destination; ///< route destination
54 Mac48Address retransmitter; ///< route source
55 uint32_t interface; ///< interface index
56 uint32_t metric; ///< metric of route
57 Time lifetime; ///< lifetime of route
58 uint32_t seqnum; ///< sequence number of route
59};
60
61/**
62 * \ingroup dot11s
63 *
64 * \brief Hybrid wireless mesh protocol -- a mesh routing protocol defined
65 * in IEEE 802.11-2012 standard.
66 */
68{
69 public:
70 /**
71 * \brief Get the type ID.
72 * \return the object TypeId
73 */
74 static TypeId GetTypeId();
75
77 ~HwmpProtocol() override;
78
79 // Delete copy constructor and assignment operator to avoid misuse
80 HwmpProtocol(const HwmpProtocol&) = delete;
82
83 void DoDispose() override;
84
85 /**
86 * \brief structure of unreachable destination - address and sequence number
87 */
89 {
90 Mac48Address destination; ///< destination address
91 uint32_t seqnum; ///< sequence number
92 };
93
94 /**
95 * Route request, inherited from MeshL2RoutingProtocol
96 *
97 * \param sourceIface the source interface
98 * \param source the source address
99 * \param destination the destination address
100 * \param packet the packet to route
101 * \param protocolType the protocol type
102 * \param routeReply the route reply
103 * \returns true if route exists
104 */
105 bool RequestRoute(uint32_t sourceIface,
106 const Mac48Address source,
107 const Mac48Address destination,
108 Ptr<const Packet> packet,
109 uint16_t protocolType,
110 RouteReplyCallback routeReply) override;
111 /**
112 * Clean HWMP packet tag from packet; only the packet parameter is used
113 *
114 * \param fromIface the from interface
115 * \param source the source address
116 * \param destination the destination address
117 * \param packet the packet to route
118 * \param protocolType the protocol type
119 * \returns true if successful
120 */
121 bool RemoveRoutingStuff(uint32_t fromIface,
122 const Mac48Address source,
123 const Mac48Address destination,
124 Ptr<Packet> packet,
125 uint16_t& protocolType) override;
126 /**
127 * \brief Install HWMP on given mesh point.
128 * \param mp the MeshPointDevice
129 * \returns true if successful
130 *
131 * Installing protocol causes installation of its interface MAC plugins.
132 *
133 * Also MP aggregates all installed protocols, HWMP protocol can be accessed
134 * via MeshPointDevice::GetObject<dot11s::HwmpProtocol>();
135 */
137 /**
138 * Peer link status function
139 * \param meshPointAddress The MAC address of the mesh point
140 * \param peerAddress The MAC address of the peer
141 * \param interface The interface number
142 * \param status The status of the peer link
143 */
144 void PeerLinkStatus(Mac48Address meshPointAddress,
145 Mac48Address peerAddress,
146 uint32_t interface,
147 bool status);
148 /**
149 * \brief This callback is used to obtain active neighbours on a given interface
150 * \param cb is a callback, which returns a list of addresses on given interface (uint32_t)
151 */
152 void SetNeighboursCallback(Callback<std::vector<Mac48Address>, uint32_t> cb);
153 /// \name Proactive PREQ mechanism:
154 ///@{
155 /// Set the current node as root
156 void SetRoot();
157 /// Unset the current node as root
158 void UnsetRoot();
159 ///@}
160
161 /// \brief Statistics:
162 ///@{
163 /**
164 * Print statistics counters
165 * \param os the output stream
166 */
167 void Report(std::ostream& os) const;
168 ///\brief Reset Statistics:
169 void ResetStats();
170 ///@}
171
172 /**
173 * Assign a fixed random variable stream number to the random variables
174 * used by this model. Return the number of streams (possibly zero) that
175 * have been assigned.
176 *
177 * \param stream first stream index to use
178 * \return the number of stream indices assigned by this model
179 */
180 int64_t AssignStreams(int64_t stream);
181
182 /**
183 * \brief Get pointer to HWMP routing table
184 * \return pointer to routing table
185 */
187
188 private:
189 /// allow HwmpProtocolMac class friend access
190 friend class HwmpProtocolMac;
191
192 void DoInitialize() override;
193
194 /**
195 * \brief Structure of path error: IePerr and list of receivers:
196 * interfaces and MAC address
197 */
199 {
200 std::vector<FailedDestination>
201 destinations; ///< destination list: Mac48Address and sequence number
202 std::vector<std::pair<uint32_t, Mac48Address>>
203 receivers; ///< list of PathError receivers (in case of unicast PERR)
204 };
205
206 /// Packet waiting its routing information
208 {
209 Ptr<Packet> pkt; ///< the packet
210 Mac48Address src; ///< src address
211 Mac48Address dst; ///< dst address
212 uint16_t protocol; ///< protocol number
213 uint32_t inInterface; ///< incoming device interface ID. (if packet has come from upper
214 ///< layers, this is Mesh point ID)
215 RouteReplyCallback reply; ///< how to reply
216
217 QueuedPacket();
218 };
219
220 typedef std::map<uint32_t, Ptr<HwmpProtocolMac>>
221 HwmpProtocolMacMap; ///< HwmpProtocolMacMap typedef
222 /**
223 * Like RequestRoute, but for unicast packets
224 *
225 * \param sourceIface the source interface
226 * \param source the source address
227 * \param destination the destination address
228 * \param packet the packet to route
229 * \param protocolType the protocol type
230 * \param routeReply the route reply callback
231 * \param ttl the TTL
232 * \returns true if forwarded
233 */
234 bool ForwardUnicast(uint32_t sourceIface,
235 const Mac48Address source,
236 const Mac48Address destination,
237 Ptr<Packet> packet,
238 uint16_t protocolType,
239 RouteReplyCallback routeReply,
240 uint32_t ttl);
241
242 /// \name Interaction with HWMP MAC plugin
243 ///@{
244 /**
245 * \brief Handler for receiving Path Request
246 *
247 * \param preq the IE preq
248 * \param from the from address
249 * \param interface the interface
250 * \param fromMp the 'from MP' address
251 * \param metric the metric
252 */
253 void ReceivePreq(IePreq preq,
254 Mac48Address from,
255 uint32_t interface,
256 Mac48Address fromMp,
257 uint32_t metric);
258 /**
259 * \brief Handler for receiving Path Reply
260 *
261 * \param prep the IE prep
262 * \param from the from address
263 * \param interface the interface
264 * \param fromMp the 'from MP' address
265 * \param metric the metric
266 */
267 void ReceivePrep(IePrep prep,
268 Mac48Address from,
269 uint32_t interface,
270 Mac48Address fromMp,
271 uint32_t metric);
272 /**
273 * \brief Handler for receiving Path Error
274 *
275 * \param destinations the list of failed destinations
276 * \param from the from address
277 * \param interface the interface
278 * \param fromMp the from MP address
279 */
280 void ReceivePerr(std::vector<FailedDestination> destinations,
281 Mac48Address from,
282 uint32_t interface,
283 Mac48Address fromMp);
284 /**
285 * \brief Send Path Reply
286 * \param src the source address
287 * \param dst the destination address
288 * \param retransmitter the retransmitter address
289 * \param initMetric the initial metric
290 * \param originatorDsn the originator DSN
291 * \param destinationSN the destination DSN
292 * \param lifetime the lifetime
293 * \param interface the interface
294 */
295 void SendPrep(Mac48Address src,
296 Mac48Address dst,
297 Mac48Address retransmitter,
298 uint32_t initMetric,
299 uint32_t originatorDsn,
300 uint32_t destinationSN,
301 uint32_t lifetime,
302 uint32_t interface);
303 /**
304 * \brief forms a path error information element when list of destination fails on a given
305 * interface \attention removes all entries from routing table!
306 *
307 * \param destinations vector of failed destinations
308 * \return PathError
309 */
310 PathError MakePathError(std::vector<FailedDestination> destinations);
311 /**
312 * \brief Forwards a received path error
313 * \param perr the path error
314 */
315 void ForwardPathError(PathError perr);
316 /**
317 * \brief Passes a self-generated PERR to interface-plugin
318 * \param perr the path error
319 */
320 void InitiatePathError(PathError perr);
321 /**
322 * Get PERR receivers
323 *
324 * \param failedDest
325 * \return list of addresses where a PERR should be sent to
326 */
327 std::vector<std::pair<uint32_t, Mac48Address>> GetPerrReceivers(
328 std::vector<FailedDestination> failedDest);
329
330 /**
331 * Get PREQ receivers
332 *
333 * \param interface
334 * \return list of addresses where a PREQ should be sent to
335 */
336 std::vector<Mac48Address> GetPreqReceivers(uint32_t interface);
337 /**
338 * Get broadcast receivers
339 *
340 * \param interface
341 * \return list of addresses where a broadcast should be retransmitted
342 */
343 std::vector<Mac48Address> GetBroadcastReceivers(uint32_t interface);
344 /**
345 * \brief MAC-plugin asks whether the frame can be dropped. Protocol automatically updates
346 * seqno.
347 *
348 * \return true if frame can be dropped
349 * \param seqno is the sequence number of source
350 * \param source is the source address
351 */
352 bool DropDataFrame(uint32_t seqno, Mac48Address source);
353 ///@}
354
355 /// Route discovery time:
357 /// RouteChangeTracedCallback typedef
359 /// Route change trace source
361
362 // /\name Methods related to Queue/Dequeue procedures
363 ///@{
364 /**
365 * Queue a packet
366 * \param packet the packet to be queued
367 * \return true on success
368 */
369 bool QueuePacket(QueuedPacket packet);
370 /**
371 * Dequeue the first packet for a given destination
372 * \param dst the destination
373 * \return the dequeued packet
374 */
376 /**
377 * Dequeue the first packet in the queue
378 * \return the dequeued packet
379 */
381 /**
382 * Signal the protocol that the reactive path toward a destination is now available
383 * \param dst the destination
384 */
386 /**
387 * Signal the protocol that the proactive path is now available
388 */
390 ///@}
391
392 /// \name Methods responsible for path discovery retry procedure:
393 ///@{
394 /**
395 * \brief checks when the last path discovery procedure was started for a given destination.
396 * \return true if should send PREQ
397 * \param dst is the destination address
398 *
399 * If the retry counter has not achieved the maximum level - preq should not be sent
400 */
402
403 /**
404 * \brief Generates PREQ retry when retry timeout has expired and route is still unresolved.
405 * \param dst is the destination address
406 * \param numOfRetry is the number of retries
407 *
408 * When PREQ retry has achieved the maximum level - retry mechanism should be canceled
409 */
410 void RetryPathDiscovery(Mac48Address dst, uint8_t numOfRetry);
411 /// Proactive Preq routines:
412 void SendProactivePreq();
413 ///@}
414
415 ///\return address of MeshPointDevice
417 /// \name Methods needed by HwmpMacLugin to access protocol parameters:
418 ///@{
419 /**
420 * Get do flag function
421 * \returns DO flag
422 */
423 bool GetDoFlag() const;
424 /**
425 * Get rf flag function
426 * \returns the RF flag
427 */
428 bool GetRfFlag() const;
429 /**
430 * Get PREQ minimum interval function
431 * \returns the PREQ
432 */
434 /**
435 * Get PERR minimum interval function
436 * \returns the PERR minimum interval
437 */
439 /**
440 * Get maximum TTL function
441 * \returns the maximum TTL
442 */
443 uint8_t GetMaxTtl() const;
444 /**
445 * Get next period function
446 * \returns the next period
447 */
449 /**
450 * Get next HWMP sequence no function
451 * \returns the next HWMP sequence number
452 */
454 /**
455 * Get active path lifetime function
456 * \returns the active path lifetime
457 */
459 /**
460 * Get unicast PERR threshold function
461 * \returns the unicast PERR threshold
462 */
463 uint8_t GetUnicastPerrThreshold() const;
464 ///@}
465
466 private:
467 /// Statistics structure
469 {
470 uint16_t txUnicast; ///< transmit unicast
471 uint16_t txBroadcast; ///< transmit broadcast
472 uint32_t txBytes; ///< transmit bytes
473 uint16_t droppedTtl; ///< dropped TTL
474 uint16_t totalQueued; ///< total queued
475 uint16_t totalDropped; ///< total dropped
476 uint16_t initiatedPreq; ///< initiated PREQ
477 uint16_t initiatedPrep; ///< initiated PREP
478 uint16_t initiatedPerr; ///< initiated PERR
479
480 /**
481 * Print function
482 * \param os The output stream
483 */
484 void Print(std::ostream& os) const;
485 /// constructor
486 Statistics();
487 };
488
489 Statistics m_stats; ///< statistics
490
493 uint32_t m_dataSeqno; ///< data sequence no
494 uint32_t m_hwmpSeqno; ///< HWMP sequence no
495 uint32_t m_preqId; ///< PREQ ID
496 /// \name Sequence number filters
497 ///@{
498 /// Data sequence number database
499 std::map<Mac48Address, uint32_t> m_lastDataSeqno;
500 /// keeps HWMP seqno (first in pair) and HWMP metric (second in pair) for each address
501 std::map<Mac48Address, std::pair<uint32_t, uint32_t>> m_hwmpSeqnoMetricDatabase;
502 ///@}
503
504 /// Routing table
506
507 /// PreqEvent structure
509 {
510 EventId preqTimeout; ///< PREQ timeout
511 Time whenScheduled; ///< scheduled time
512 };
513
514 std::map<Mac48Address, PreqEvent> m_preqTimeouts; ///< PREQ timeouts
515 EventId m_proactivePreqTimer; ///< proactive PREQ timer
516 /// Random start in Proactive PREQ propagation
518 /// Packet Queue
519 std::vector<QueuedPacket> m_rqueue;
520
521 /// \name HWMP-protocol parameters
522 /// These are all Attributes
523 ///@{
524 uint16_t m_maxQueueSize; //!< Maximum number of packets we can store when resolving route
525 uint8_t m_dot11MeshHWMPmaxPREQretries; //!< Maximum number of retries before we suppose the
526 //!< destination to be unreachable
527 Time m_dot11MeshHWMPnetDiameterTraversalTime; //!< Time we suppose the packet to go from one
528 //!< edge of the network to another
529 Time m_dot11MeshHWMPpreqMinInterval; //!< Minimal interval between to successive PREQs
530 Time m_dot11MeshHWMPperrMinInterval; //!< Minimal interval between to successive PREQs
531 Time m_dot11MeshHWMPactiveRootTimeout; //!< Lifetime of proactive routing information
532 Time m_dot11MeshHWMPactivePathTimeout; //!< Lifetime of reactive routing information
533 Time m_dot11MeshHWMPpathToRootInterval; //!< Interval between two successive proactive PREQs
534 Time m_dot11MeshHWMPrannInterval; //!< Lifetime of proactive routing information
535 bool m_isRoot; //!< True if the node is a root
536 uint8_t m_maxTtl; //!< Initial value of Time To Live field
537 uint8_t m_unicastPerrThreshold; //!< Maximum number of PERR receivers, when we send a PERR as a
538 //!< chain of unicasts
539 uint8_t m_unicastPreqThreshold; //!< Maximum number of PREQ receivers, when we send a PREQ as a
540 //!< chain of unicasts
541 uint8_t m_unicastDataThreshold; //!< Maximum number of broadcast receivers, when we send a
542 //!< broadcast as a chain of unicasts
543 bool m_doFlag; //!< Destination only HWMP flag
544 bool m_rfFlag; //!< Reply and forward flag
545 ///@}
546
547 /// Random variable for random start time
550};
551} // namespace dot11s
552} // namespace ns3
553#endif
Callback template class.
Definition: callback.h:438
An identifier for simulation events.
Definition: event-id.h:55
an EUI-48 address
Definition: mac48-address.h:46
Interface for L2 mesh routing protocol and mesh point communication.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition: type-id.h:59
Hybrid wireless mesh protocol – a mesh routing protocol defined in IEEE 802.11-2012 standard.
Definition: hwmp-protocol.h:68
void SetRoot()
Unset the current node as root.
std::vector< Mac48Address > GetPreqReceivers(uint32_t interface)
Get PREQ receivers.
void PeerLinkStatus(Mac48Address meshPointAddress, Mac48Address peerAddress, uint32_t interface, bool status)
Peer link status function.
QueuedPacket DequeueFirstPacket()
Dequeue the first packet in the queue.
Ptr< HwmpRtable > m_rtable
Routing table.
uint8_t m_unicastDataThreshold
Maximum number of broadcast receivers, when we send a broadcast as a chain of unicasts.
void ReceivePrep(IePrep prep, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric)
Handler for receiving Path Reply.
void Report(std::ostream &os) const
Statistics:
uint32_t GetNextHwmpSeqno()
Get next HWMP sequence no function.
TracedCallback< RouteChange > m_routeChangeTraceSource
Route change trace source.
PathError MakePathError(std::vector< FailedDestination > destinations)
forms a path error information element when list of destination fails on a given interface
Time m_dot11MeshHWMPrannInterval
Lifetime of proactive routing information.
Time GetPerrMinInterval()
Get PERR minimum interval function.
Ptr< HwmpRtable > GetRoutingTable() const
Get pointer to HWMP routing table.
uint8_t m_unicastPreqThreshold
Maximum number of PREQ receivers, when we send a PREQ as a chain of unicasts.
void UnsetRoot()
Unset the current node as root.
uint32_t m_dataSeqno
data sequence no
Time m_dot11MeshHWMPnetDiameterTraversalTime
Time we suppose the packet to go from one edge of the network to another.
Time m_dot11MeshHWMPactivePathTimeout
Lifetime of reactive routing information.
bool QueuePacket(QueuedPacket packet)
Queue a packet.
bool m_isRoot
True if the node is a root.
Statistics m_stats
statistics
uint32_t m_hwmpSeqno
HWMP sequence no.
uint8_t GetMaxTtl() const
Get maximum TTL function.
Time m_randomStart
Random start in Proactive PREQ propagation.
void SendPrep(Mac48Address src, Mac48Address dst, Mac48Address retransmitter, uint32_t initMetric, uint32_t originatorDsn, uint32_t destinationSN, uint32_t lifetime, uint32_t interface)
Send Path Reply.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
bool GetDoFlag() const
Get do flag function.
TracedCallback< Time > m_routeDiscoveryTimeCallback
Route discovery time:
static TypeId GetTypeId()
Get the type ID.
bool ShouldSendPreq(Mac48Address dst)
checks when the last path discovery procedure was started for a given destination.
void ReceivePerr(std::vector< FailedDestination > destinations, Mac48Address from, uint32_t interface, Mac48Address fromMp)
Handler for receiving Path Error.
std::map< Mac48Address, PreqEvent > m_preqTimeouts
PREQ timeouts.
Time m_dot11MeshHWMPperrMinInterval
Minimal interval between to successive PREQs.
bool m_rfFlag
Reply and forward flag.
bool RequestRoute(uint32_t sourceIface, const Mac48Address source, const Mac48Address destination, Ptr< const Packet > packet, uint16_t protocolType, RouteReplyCallback routeReply) override
Route request, inherited from MeshL2RoutingProtocol.
Time GetPreqMinInterval()
Get PREQ minimum interval function.
QueuedPacket DequeueFirstPacketByDst(Mac48Address dst)
Dequeue the first packet for a given destination.
HwmpProtocol(const HwmpProtocol &)=delete
EventId m_proactivePreqTimer
proactive PREQ timer
Ptr< UniformRandomVariable > m_coefficient
Random variable for random start time.
uint32_t GetNextPreqId()
Get next period function.
void InitiatePathError(PathError perr)
Passes a self-generated PERR to interface-plugin.
void SendProactivePreq()
Proactive Preq routines:
void ForwardPathError(PathError perr)
Forwards a received path error.
Time m_dot11MeshHWMPpathToRootInterval
Interval between two successive proactive PREQs.
void RetryPathDiscovery(Mac48Address dst, uint8_t numOfRetry)
Generates PREQ retry when retry timeout has expired and route is still unresolved.
bool RemoveRoutingStuff(uint32_t fromIface, const Mac48Address source, const Mac48Address destination, Ptr< Packet > packet, uint16_t &protocolType) override
Clean HWMP packet tag from packet; only the packet parameter is used.
bool m_doFlag
Destination only HWMP flag.
Mac48Address m_address
address
void DoInitialize() override
Initialize() implementation.
Time m_dot11MeshHWMPactiveRootTimeout
Lifetime of proactive routing information.
void DoDispose() override
Destructor implementation.
void ReceivePreq(IePreq preq, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric)
Handler for receiving Path Request.
Time m_dot11MeshHWMPpreqMinInterval
Minimal interval between to successive PREQs.
uint8_t GetUnicastPerrThreshold() const
Get unicast PERR threshold function.
void ReactivePathResolved(Mac48Address dst)
Signal the protocol that the reactive path toward a destination is now available.
std::vector< Mac48Address > GetBroadcastReceivers(uint32_t interface)
Get broadcast receivers.
bool GetRfFlag() const
Get rf flag function.
bool Install(Ptr< MeshPointDevice > mp)
Install HWMP on given mesh point.
uint32_t GetActivePathLifetime()
Get active path lifetime function.
bool ForwardUnicast(uint32_t sourceIface, const Mac48Address source, const Mac48Address destination, Ptr< Packet > packet, uint16_t protocolType, RouteReplyCallback routeReply, uint32_t ttl)
Like RequestRoute, but for unicast packets.
void ProactivePathResolved()
Signal the protocol that the proactive path is now available.
void SetNeighboursCallback(Callback< std::vector< Mac48Address >, uint32_t > cb)
This callback is used to obtain active neighbours on a given interface.
std::vector< QueuedPacket > m_rqueue
Packet Queue.
Callback< std::vector< Mac48Address >, uint32_t > m_neighboursCallback
neighbors callback
std::vector< std::pair< uint32_t, Mac48Address > > GetPerrReceivers(std::vector< FailedDestination > failedDest)
Get PERR receivers.
HwmpProtocol & operator=(const HwmpProtocol &)=delete
HwmpProtocolMacMap m_interfaces
interfaces
uint16_t m_maxQueueSize
Maximum number of packets we can store when resolving route.
uint8_t m_maxTtl
Initial value of Time To Live field.
std::map< Mac48Address, uint32_t > m_lastDataSeqno
keeps HWMP seqno (first in pair) and HWMP metric (second in pair) for each address
void ResetStats()
Reset Statistics:
bool DropDataFrame(uint32_t seqno, Mac48Address source)
MAC-plugin asks whether the frame can be dropped.
uint8_t m_unicastPerrThreshold
Maximum number of PERR receivers, when we send a PERR as a chain of unicasts.
uint32_t m_preqId
PREQ ID.
uint8_t m_dot11MeshHWMPmaxPREQretries
Maximum number of retries before we suppose the destination to be unreachable.
std::map< Mac48Address, std::pair< uint32_t, uint32_t > > m_hwmpSeqnoMetricDatabase
keeps HWMP seqno (first in pair) and HWMP metric (second in pair) for each address
TracedCallback< RouteChange > RouteChangeTracedCallback
RouteChangeTracedCallback typedef.
std::map< uint32_t, Ptr< HwmpProtocolMac > > HwmpProtocolMacMap
HwmpProtocolMacMap typedef.
Interface MAC plugin for HWMP – 802.11s routing protocol.
See 7.3.2.97 of 802.11s draft 2.07.
See 7.3.2.96 of 802.11s draft 2.07.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
structure of unreachable destination - address and sequence number
Definition: hwmp-protocol.h:89
Mac48Address destination
destination address
Definition: hwmp-protocol.h:90
Structure of path error: IePerr and list of receivers: interfaces and MAC address.
std::vector< FailedDestination > destinations
destination list: Mac48Address and sequence number
std::vector< std::pair< uint32_t, Mac48Address > > receivers
list of PathError receivers (in case of unicast PERR)
Packet waiting its routing information.
RouteReplyCallback reply
how to reply
uint32_t inInterface
incoming device interface ID.
void Print(std::ostream &os) const
Print function.
uint16_t initiatedPrep
initiated PREP
uint16_t txBroadcast
transmit broadcast
uint16_t txUnicast
transmit unicast
uint16_t initiatedPerr
initiated PERR
uint16_t initiatedPreq
initiated PREQ
Structure to encapsulate route change information.
Definition: hwmp-protocol.h:51
Time lifetime
lifetime of route
Definition: hwmp-protocol.h:57
Mac48Address retransmitter
route source
Definition: hwmp-protocol.h:54
uint32_t seqnum
sequence number of route
Definition: hwmp-protocol.h:58
uint32_t metric
metric of route
Definition: hwmp-protocol.h:56
Mac48Address destination
route destination
Definition: hwmp-protocol.h:53
std::string type
type of change
Definition: hwmp-protocol.h:52
uint32_t interface
interface index
Definition: hwmp-protocol.h:55