A Discrete-Event Network Simulator
API
hwmp-protocol-mac.cc
Go to the documentation of this file.
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
6  * it under the terms of the GNU General Public License version 2 as
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  * Author: Kirill Andreev <andreev@iitp.ru>
19  */
20 
21 #include "ns3/mesh-wifi-interface-mac.h"
22 #include "ns3/packet.h"
23 #include "ns3/simulator.h"
24 #include "ns3/nstime.h"
25 #include "ns3/log.h"
26 #include "ns3/mgt-headers.h"
27 #include "dot11s-mac-header.h"
28 #include "hwmp-protocol-mac.h"
29 #include "hwmp-tag.h"
30 #include "ie-dot11s-preq.h"
31 #include "ie-dot11s-prep.h"
32 #include "ie-dot11s-rann.h"
33 #include "ie-dot11s-perr.h"
34 
35 namespace ns3 {
36 
37 NS_LOG_COMPONENT_DEFINE ("HwmpProtocolMac");
38 
39 namespace dot11s {
40 
42  m_ifIndex (ifIndex), m_protocol (protocol)
43 {
44  NS_LOG_FUNCTION (this << ifIndex << protocol);
45 }
47 {
48 }
49 void
51 {
52  NS_LOG_FUNCTION (this << parent);
53  m_parent = parent;
54 }
55 
56 bool
58 {
59  NS_LOG_FUNCTION (this << packet << header);
60  NS_ASSERT (header.IsData ());
61 
62  MeshHeader meshHdr;
63  HwmpTag tag;
64  if (packet->PeekPacketTag (tag))
65  {
66  NS_FATAL_ERROR ("HWMP tag is not supposed to be received by network");
67  }
68 
69  packet->RemoveHeader (meshHdr);
70  m_stats.rxData++;
71  m_stats.rxDataBytes += packet->GetSize ();
72 
74  Mac48Address destination;
75  Mac48Address source;
76  switch (meshHdr.GetAddressExt ())
77  {
78  case 0:
79  source = header.GetAddr4 ();
80  destination = header.GetAddr3 ();
81  break;
82  default:
84  "6-address scheme is not yet supported and 4-address extension is not supposed to be used for data frames.");
85  }
86  tag.SetSeqno (meshHdr.GetMeshSeqno ());
87  tag.SetTtl (meshHdr.GetMeshTtl ());
88  packet->AddPacketTag (tag);
89 
90  if ((destination == Mac48Address::GetBroadcast ()) && (m_protocol->DropDataFrame (meshHdr.GetMeshSeqno (),
91  source)))
92  {
93  return false;
94  }
95  return true;
96 }
97 
98 bool
100 {
101  NS_LOG_FUNCTION (this << packet << header);
102  m_stats.rxMgt++;
103  m_stats.rxMgtBytes += packet->GetSize ();
104  WifiActionHeader actionHdr;
105  packet->RemoveHeader (actionHdr);
106  if (actionHdr.GetCategory () != WifiActionHeader::MESH)
107  {
108  return true;
109  }
111  // To determine header size here, we can rely on the knowledge that
112  // this is the last header to remove.
113  packet->RemoveHeader (elements, packet->GetSize ());
114  std::vector<HwmpProtocol::FailedDestination> failedDestinations;
115  for (MeshInformationElementVector::Iterator i = elements.Begin (); i != elements.End (); i++)
116  {
117  if ((*i)->ElementId () == IE_RANN)
118  {
119  NS_LOG_WARN ("RANN is not supported!");
120  }
121  if ((*i)->ElementId () == IE_PREQ)
122  {
123  Ptr<IePreq> preq = DynamicCast<IePreq> (*i);
124  NS_ASSERT (preq != 0);
125  m_stats.rxPreq++;
126  if (preq->GetOriginatorAddress () == m_protocol->GetAddress ())
127  {
128  continue;
129  }
130  if (preq->GetTtl () == 0)
131  {
132  continue;
133  }
134  preq->DecrementTtl ();
135  m_protocol->ReceivePreq (*preq, header.GetAddr2 (), m_ifIndex, header.GetAddr3 (),
136  m_parent->GetLinkMetric (header.GetAddr2 ()));
137  }
138  if ((*i)->ElementId () == IE_PREP)
139  {
140  Ptr<IePrep> prep = DynamicCast<IePrep> (*i);
141  NS_ASSERT (prep != 0);
142  m_stats.rxPrep++;
143  if (prep->GetTtl () == 0)
144  {
145  continue;
146  }
147  prep->DecrementTtl ();
148  m_protocol->ReceivePrep (*prep, header.GetAddr2 (), m_ifIndex, header.GetAddr3 (),
149  m_parent->GetLinkMetric (header.GetAddr2 ()));
150  }
151  if ((*i)->ElementId () == IE_PERR)
152  {
153  Ptr<IePerr> perr = DynamicCast<IePerr> (*i);
154  NS_ASSERT (perr != 0);
155  m_stats.rxPerr++;
156  std::vector<HwmpProtocol::FailedDestination> destinations = perr->GetAddressUnitVector ();
157  for (std::vector<HwmpProtocol::FailedDestination>::const_iterator i = destinations.begin (); i
158  != destinations.end (); i++)
159  {
160  failedDestinations.push_back (*i);
161  }
162  }
163  }
164  if (failedDestinations.size () > 0)
165  {
166  m_protocol->ReceivePerr (failedDestinations, header.GetAddr2 (), m_ifIndex, header.GetAddr3 ());
167  }
168  NS_ASSERT (packet->GetSize () == 0);
169  return false;
170 }
171 
172 bool
174 {
175  NS_LOG_FUNCTION (this << packet << header);
176  if (header.IsData ())
177  {
178  return ReceiveData (packet, header);
179  }
180  else
181  {
182  if (header.IsAction ())
183  {
184  return ReceiveAction (packet, header);
185  }
186  else
187  {
188  return true; // don't care
189  }
190  }
191 }
192 bool
194  Mac48Address to)
195 {
196  NS_LOG_FUNCTION (this << packet << header << from << to);
197  if (!header.IsData ())
198  {
199  return true;
200  }
201  HwmpTag tag;
202  bool tagExists = packet->RemovePacketTag (tag);
203  if (!tagExists)
204  {
205  NS_FATAL_ERROR ("HWMP tag must exist at this point");
206  }
207  m_stats.txData++;
208  m_stats.txDataBytes += packet->GetSize ();
209  MeshHeader meshHdr;
210  meshHdr.SetMeshSeqno (tag.GetSeqno ());
211  meshHdr.SetMeshTtl (tag.GetTtl ());
212  packet->AddHeader (meshHdr);
213  header.SetAddr1 (tag.GetAddress ());
214  header.SetQosMeshControlPresent ();
215  return true;
216 }
219 {
220  WifiActionHeader actionHdr;
223  actionHdr.SetAction (WifiActionHeader::MESH, action);
224  return actionHdr;
225 }
226 void
228 {
229  NS_LOG_FUNCTION (this);
230  std::vector<IePreq> preq_vector;
231  preq_vector.push_back (preq);
232  SendPreq (preq_vector);
233 }
234 void
235 HwmpProtocolMac::SendPreq (std::vector<IePreq> preq)
236 {
237  NS_LOG_FUNCTION (this);
238  Ptr<Packet> packet = Create<Packet> ();
240  for (std::vector<IePreq>::iterator i = preq.begin (); i != preq.end (); i++)
241  {
242  elements.AddInformationElement (Ptr<IePreq> (&(*i)));
243  }
244  packet->AddHeader (elements);
245  packet->AddHeader (GetWifiActionHeader ());
246  //create 802.11 header:
247  WifiMacHeader hdr;
249  hdr.SetDsNotFrom ();
250  hdr.SetDsNotTo ();
251  hdr.SetAddr2 (m_parent->GetAddress ());
252  hdr.SetAddr3 (m_protocol->GetAddress ());
253  //Send Management frame
254  std::vector<Mac48Address> receivers = m_protocol->GetPreqReceivers (m_ifIndex);
255  for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != receivers.end (); i++)
256  {
257  hdr.SetAddr1 (*i);
258  m_stats.txPreq++;
259  m_stats.txMgt++;
260  m_stats.txMgtBytes += packet->GetSize ();
261  m_parent->SendManagementFrame (packet, hdr);
262  }
263 }
264 void
265 HwmpProtocolMac::RequestDestination (Mac48Address dst, uint32_t originator_seqno, uint32_t dst_seqno)
266 {
267  NS_LOG_FUNCTION (this << dst << originator_seqno << dst_seqno);
268  for (std::vector<IePreq>::iterator i = m_myPreq.begin (); i != m_myPreq.end (); i++)
269  {
270  if (i->IsFull ())
271  {
272  continue;
273  }
274  NS_ASSERT (i->GetDestCount () > 0);
275  i->AddDestinationAddressElement (m_protocol->GetDoFlag (), m_protocol->GetRfFlag (), dst, dst_seqno);
276  }
277  IePreq preq;
278  preq.SetHopcount (0);
279  preq.SetTTL (m_protocol->GetMaxTtl ());
280  preq.SetPreqID (m_protocol->GetNextPreqId ());
281  preq.SetOriginatorAddress (m_protocol->GetAddress ());
282  preq.SetOriginatorSeqNumber (originator_seqno);
283  preq.SetLifetime (m_protocol->GetActivePathLifetime ());
284  preq.AddDestinationAddressElement (m_protocol->GetDoFlag (), m_protocol->GetRfFlag (), dst, dst_seqno);
285  m_myPreq.push_back (preq);
286  SendMyPreq ();
287 }
288 void
290 {
291  NS_LOG_FUNCTION (this);
292  if (m_preqTimer.IsRunning ())
293  {
294  return;
295  }
296  if (m_myPreq.size () == 0)
297  {
298  return;
299  }
300  //reschedule sending PREQ
302  m_preqTimer = Simulator::Schedule (m_protocol->GetPreqMinInterval (), &HwmpProtocolMac::SendMyPreq, this);
303  SendPreq (m_myPreq);
304  m_myPreq.clear ();
305 }
306 void
308 {
309  NS_LOG_FUNCTION (this << receiver);
310  //Create packet
311  Ptr<Packet> packet = Create<Packet> ();
313  elements.AddInformationElement (Ptr<IePrep> (&prep));
314  packet->AddHeader (elements);
315  packet->AddHeader (GetWifiActionHeader ());
316  //create 802.11 header:
317  WifiMacHeader hdr;
319  hdr.SetDsNotFrom ();
320  hdr.SetDsNotTo ();
321  hdr.SetAddr1 (receiver);
322  hdr.SetAddr2 (m_parent->GetAddress ());
323  hdr.SetAddr3 (m_protocol->GetAddress ());
324  //Send Management frame
325  m_stats.txPrep++;
326  m_stats.txMgt++;
327  m_stats.txMgtBytes += packet->GetSize ();
328  m_parent->SendManagementFrame (packet, hdr);
329 }
330 void
331 HwmpProtocolMac::ForwardPerr (std::vector<HwmpProtocol::FailedDestination> failedDestinations, std::vector<
332  Mac48Address> receivers)
333 {
334  NS_LOG_FUNCTION (this);
335  Ptr<Packet> packet = Create<Packet> ();
336  Ptr<IePerr> perr = Create <IePerr> ();
338  for (std::vector<HwmpProtocol::FailedDestination>::const_iterator i = failedDestinations.begin (); i
339  != failedDestinations.end (); i++)
340  {
341  if (!perr->IsFull ())
342  {
343  perr->AddAddressUnit (*i);
344  }
345  else
346  {
347  elements.AddInformationElement (perr);
348  perr->ResetPerr ();
349  }
350  }
351  if (perr->GetNumOfDest () > 0)
352  {
353  elements.AddInformationElement (perr);
354  }
355  packet->AddHeader (elements);
356  packet->AddHeader (GetWifiActionHeader ());
357  //create 802.11 header:
358  WifiMacHeader hdr;
360  hdr.SetDsNotFrom ();
361  hdr.SetDsNotTo ();
362  hdr.SetAddr2 (m_parent->GetAddress ());
363  hdr.SetAddr3 (m_protocol->GetAddress ());
364  if (receivers.size () >= m_protocol->GetUnicastPerrThreshold ())
365  {
366  receivers.clear ();
367  receivers.push_back (Mac48Address::GetBroadcast ());
368  }
369  //Send Management frame
370  for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != receivers.end (); i++)
371  {
372  //
373  // 64-bit Intel valgrind complains about hdr.SetAddr1 (*i). It likes this
374  // just fine.
375  //
376  Mac48Address address = *i;
377  hdr.SetAddr1 (address);
378  m_stats.txPerr++;
379  m_stats.txMgt++;
380  m_stats.txMgtBytes += packet->GetSize ();
381  m_parent->SendManagementFrame (packet, hdr);
382  }
383 }
384 void
385 HwmpProtocolMac::InitiatePerr (std::vector<HwmpProtocol::FailedDestination> failedDestinations, std::vector<
386  Mac48Address> receivers)
387 {
388  NS_LOG_FUNCTION (this);
389  //All duplicates in PERR are checked here, and there is no reason to
390  //check it at any other place
391  {
392  std::vector<Mac48Address>::const_iterator end = receivers.end ();
393  for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != end; i++)
394  {
395  bool should_add = true;
396  for (std::vector<Mac48Address>::const_iterator j = m_myPerr.receivers.begin (); j
397  != m_myPerr.receivers.end (); j++)
398  {
399  if ((*i) == (*j))
400  {
401  should_add = false;
402  }
403  }
404  if (should_add)
405  {
406  m_myPerr.receivers.push_back (*i);
407  NS_LOG_DEBUG ("Initiate PERR: Adding receiver: " << (*i));
408  }
409  }
410  }
411  {
412  std::vector<HwmpProtocol::FailedDestination>::const_iterator end = failedDestinations.end ();
413  for (std::vector<HwmpProtocol::FailedDestination>::const_iterator i = failedDestinations.begin (); i != end; i++)
414  {
415  bool should_add = true;
416  for (std::vector<HwmpProtocol::FailedDestination>::const_iterator j = m_myPerr.destinations.begin (); j
417  != m_myPerr.destinations.end (); j++)
418  {
419  if (((*i).destination == (*j).destination) && ((*j).seqnum > (*i).seqnum))
420  {
421  should_add = false;
422  }
423  }
424  if (should_add)
425  {
426  m_myPerr.destinations.push_back (*i);
427  NS_LOG_DEBUG ("Initiate PERR: Adding failed destination: " << (*i).destination);
428  }
429  }
430  }
431  SendMyPerr ();
432 }
433 void
435 {
436  NS_LOG_FUNCTION (this);
437  if (m_perrTimer.IsRunning ())
438  {
439  return;
440  }
441  m_perrTimer = Simulator::Schedule (m_protocol->GetPerrMinInterval (), &HwmpProtocolMac::SendMyPerr, this);
443  m_myPerr.destinations.clear ();
444  m_myPerr.receivers.clear ();
445 }
446 uint32_t
448 {
449  return m_parent->GetLinkMetric (peerAddress);
450 }
451 uint16_t
453 {
454  return m_parent->GetFrequencyChannel ();
455 }
457  txPreq (0), rxPreq (0), txPrep (0), rxPrep (0), txPerr (0), rxPerr (0), txMgt (0), txMgtBytes (0),
458  rxMgt (0), rxMgtBytes (0), txData (0), txDataBytes (0), rxData (0), rxDataBytes (0)
459 {
460 }
461 void
462 HwmpProtocolMac::Statistics::Print (std::ostream & os) const
463 {
464  os << "<Statistics "
465  "txPreq= \"" << txPreq << "\"" << std::endl <<
466  "txPrep=\"" << txPrep << "\"" << std::endl <<
467  "txPerr=\"" << txPerr << "\"" << std::endl <<
468  "rxPreq=\"" << rxPreq << "\"" << std::endl <<
469  "rxPrep=\"" << rxPrep << "\"" << std::endl <<
470  "rxPerr=\"" << rxPerr << "\"" << std::endl <<
471  "txMgt=\"" << txMgt << "\"" << std::endl <<
472  "txMgtBytes=\"" << txMgtBytes << "\"" << std::endl <<
473  "rxMgt=\"" << rxMgt << "\"" << std::endl <<
474  "rxMgtBytes=\"" << rxMgtBytes << "\"" << std::endl <<
475  "txData=\"" << txData << "\"" << std::endl <<
476  "txDataBytes=\"" << txDataBytes << "\"" << std::endl <<
477  "rxData=\"" << rxData << "\"" << std::endl <<
478  "rxDataBytes=\"" << rxDataBytes << "\"/>" << std::endl;
479 }
480 void
481 HwmpProtocolMac::Report (std::ostream & os) const
482 {
483  os << "<HwmpProtocolMac" << std::endl <<
484  "address =\"" << m_parent->GetAddress () << "\">" << std::endl;
485  m_stats.Print (os);
486  os << "</HwmpProtocolMac>" << std::endl;
487 }
488 void
490 {
491  NS_LOG_FUNCTION (this);
492  m_stats = Statistics ();
493 }
494 
495 int64_t
497 {
498  return m_protocol->AssignStreams (stream);
499 }
500 
501 
502 } // namespace dot11s
503 } // namespace ns3
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:280
bool ReceiveAction(Ptr< Packet > packet, const WifiMacHeader &header)
Receive action management frame.
void SetPreqID(uint32_t id)
Set path discovery id field.
uint32_t GetLinkMetric(Mac48Address peerAddress) const
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void SendMyPerr()
Send PERR function.
void SetParent(Ptr< MeshWifiInterfaceMac > parent)
Update beacon is empty, because HWMP does not know anything about beacons.
void SendMyPreq()
Sends one PREQ when PreqMinInterval after last PREQ expires (if any PREQ exists in rhe queue) ...
Hwmp tag implements interaction between HWMP protocol and MeshWifiMac.
Definition: hwmp-tag.h:48
void SetTTL(uint8_t ttl)
Set remaining number of hops allowed for this element.
void SetType(WifiMacType type)
Set Type/Subtype values with the correct values depending on the given type.
void SendPrep(IePrep prep, Mac48Address receiver)
Send PREP function.
See IEEE 802.11 chapter 7.3.1.11 Header format: | category: 1 | action value: 1 |.
Definition: mgt-headers.h:850
bool IsAction() const
Return true if the header is an Action header.
void RequestDestination(Mac48Address dest, uint32_t originator_seqno, uint32_t dst_seqno)
Request a destination.
void AddPacketTag(const Tag &tag) const
Add a packet tag.
Definition: packet.cc:852
Mac48Address GetAddr3(void) const
Return the address in the Address 3 field.
Mac48Address GetAddr4(void) const
Return the address in the Address 4 field.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Definition: assert.h:67
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
See 7.3.2.97 of 802.11s draft 2.07.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:821
std::vector< IePreq > m_myPreq
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:162
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
Definition: event-id.cc:65
void SetMeshSeqno(uint32_t seqno)
Set four-byte mesh sequence number.
CategoryValue GetCategory()
Return the category value.
uint32_t GetSeqno()
Get the sequence number.
Definition: hwmp-tag.cc:81
void SetTtl(uint8_t ttl)
Set the TTL value.
Definition: hwmp-tag.cc:51
bool AddInformationElement(Ptr< WifiInformationElement > element)
add an IE, if maxSize has exceeded, returns false
void SetLifetime(uint32_t lifetime)
Set lifetime in TUs for the forwarding information to be considered valid.
void SendPreq(IePreq preq)
Send PREQ function.
Mac48Address GetAddress()
Get address from tag.
Definition: hwmp-tag.cc:45
void Report(std::ostream &os) const
Report statistics.
void SetMeshTtl(uint8_t TTL)
Set mesh TTL subfield corresponding to the remaining number of hops the MSDU/MMPDU is forwarded...
Iterator End()
Returns End of the vector.
bool PeekPacketTag(Tag &tag) const
Search a matching tag and call Tag::Deserialize if it is found.
Definition: packet.cc:874
static WifiActionHeader GetWifiActionHeader()
void ResetStats()
Reset statistics.
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
Definition: simulator.h:1375
void SetAddr1(Mac48Address address)
Fill the Address 1 field with the given address.
void SetDsNotTo(void)
Un-set the To DS bit in the Frame Control field.
void SetAddr3(Mac48Address address)
Fill the Address 3 field with the given address.
See 7.3.2.96 of 802.11s draft 2.07.
uint32_t txDataBytes
transmit data bytes
std::vector< Ptr< WifiInformationElement > >::iterator Iterator
As soon as this is a vector, we define an Iterator.
#define IE_PREP
uint32_t rxMgtBytes
receive management bytes
MeshActionValue meshAction
mesh action
Definition: mgt-headers.h:923
Ptr< MeshWifiInterfaceMac > m_parent
parent
#define IE_RANN
static Mac48Address GetBroadcast(void)
std::vector< Mac48Address > receivers
receivers
void SetOriginatorAddress(Mac48Address originator_address)
Set originator address value.
uint32_t txMgtBytes
transmit management bytes
Iterator Begin()
Returns Begin of the vector.
void SetOriginatorSeqNumber(uint32_t originator_seq_number)
Set originator sequence number.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void AddDestinationAddressElement(bool doFlag, bool rfFlag, Mac48Address dest_address, uint32_t dest_seq_number)
Add a destination address unit: flags, destination and sequence number.
void SetAddr2(Mac48Address address)
Fill the Address 2 field with the given address.
void Print(std::ostream &os) const
Print function.
an EUI-48 address
Definition: mac48-address.h:43
std::vector< HwmpProtocol::FailedDestination > destinations
destinations
uint32_t rxDataBytes
receive data bytes
Introspection did not find any typical Config paths.
HwmpProtocolMac(uint32_t ifIndex, Ptr< HwmpProtocol > protocol)
Constructor.
bool UpdateOutcomingFrame(Ptr< Packet > packet, WifiMacHeader &header, Mac48Address from, Mac48Address to)
Update beacon is empty, because HWMP does not know anything about beacons.
Ptr< HwmpProtocol > m_protocol
protocol
#define IE_PREQ
uint8_t GetTtl()
Get the TTL value.
Definition: hwmp-tag.cc:57
int64_t AssignStreams(int64_t stream)
Update beacon is empty, because HWMP does not know anything about beacons.
bool ReceiveData(Ptr< Packet > packet, const WifiMacHeader &header)
Receive data frame.
bool IsData(void) const
Return true if the Type is DATA.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:261
bool RemovePacketTag(Tag &tag)
Remove a packet tag.
Definition: packet.cc:859
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:269
void ForwardPerr(std::vector< HwmpProtocol::FailedDestination > destinations, std::vector< Mac48Address > receivers)
Forward a path error.
typedef for union of different ActionValues
Definition: mgt-headers.h:921
bool Receive(Ptr< Packet > packet, const WifiMacHeader &header)
Update beacon is empty, because HWMP does not know anything about beacons.
Mesh Control field, see Section 8.2.4.7.3 IEEE 802.11-2012.
void InitiatePerr(std::vector< HwmpProtocol::FailedDestination > destinations, std::vector< Mac48Address > receivers)
initiate my own path error
Statistics m_stats
statistics
tuple address
Definition: first.py:37
void SetSeqno(uint32_t seqno)
Set sequence number.
Definition: hwmp-tag.cc:75
void SetQosMeshControlPresent()
Set the Mesh Control Present flag for the QoS header.
void SetAction(CategoryValue type, ActionValue action)
Set action for this Action header.
void SetHopcount(uint8_t hopcount)
Set number of hops from originator to mesh STA transmitting this element.
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:256
Implements the IEEE 802.11 MAC header.
Mac48Address GetAddr2(void) const
Return the address in the Address 2 field.
uint16_t GetChannelId() const
Get the channel ID.
#define IE_PERR
void SetDsNotFrom(void)
Un-set the From DS bit in the Frame Control field.