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 "dot11s-mac-header.h"
27 #include "hwmp-protocol-mac.h"
28 #include "hwmp-tag.h"
29 #include "ie-dot11s-preq.h"
30 #include "ie-dot11s-prep.h"
31 #include "ie-dot11s-rann.h"
32 #include "ie-dot11s-perr.h"
33 
34 namespace ns3 {
35 
36 NS_LOG_COMPONENT_DEFINE ("HwmpProtocolMac");
37 
38 namespace dot11s {
39 
41  m_ifIndex (ifIndex), m_protocol (protocol)
42 {
43  NS_LOG_FUNCTION (this << ifIndex << protocol);
44 }
46 {
47 }
48 void
50 {
51  NS_LOG_FUNCTION (this << parent);
52  m_parent = parent;
53 }
54 
55 bool
57 {
58  NS_LOG_FUNCTION (this << packet << header);
59  NS_ASSERT (header.IsData ());
60 
61  MeshHeader meshHdr;
62  HwmpTag tag;
63  if (packet->PeekPacketTag (tag))
64  {
65  NS_FATAL_ERROR ("HWMP tag is not supposed to be received by network");
66  }
67 
68  packet->RemoveHeader (meshHdr);
69  m_stats.rxData++;
70  m_stats.rxDataBytes += packet->GetSize ();
71 
73  Mac48Address destination;
74  Mac48Address source;
75  switch (meshHdr.GetAddressExt ())
76  {
77  case 0:
78  source = header.GetAddr4 ();
79  destination = header.GetAddr3 ();
80  break;
81  default:
83  "6-address scheme is not yet supported and 4-address extension is not supposed to be used for data frames.");
84  }
85  tag.SetSeqno (meshHdr.GetMeshSeqno ());
86  tag.SetTtl (meshHdr.GetMeshTtl ());
87  packet->AddPacketTag (tag);
88 
89  if ((destination == Mac48Address::GetBroadcast ()) && (m_protocol->DropDataFrame (meshHdr.GetMeshSeqno (),
90  source)))
91  {
92  return false;
93  }
94  return true;
95 }
96 
97 bool
99 {
100  NS_LOG_FUNCTION (this << packet << header);
101  m_stats.rxMgt++;
102  m_stats.rxMgtBytes += packet->GetSize ();
103  WifiActionHeader actionHdr;
104  packet->RemoveHeader (actionHdr);
105  if (actionHdr.GetCategory () != WifiActionHeader::MESH)
106  {
107  return true;
108  }
110  // To determine header size here, we can rely on the knowledge that
111  // this is the last header to remove.
112  packet->RemoveHeader (elements, packet->GetSize ());
113  std::vector<HwmpProtocol::FailedDestination> failedDestinations;
114  for (MeshInformationElementVector::Iterator i = elements.Begin (); i != elements.End (); i++)
115  {
116  if ((*i)->ElementId () == IE_RANN)
117  {
118  NS_LOG_WARN ("RANN is not supported!");
119  }
120  if ((*i)->ElementId () == IE_PREQ)
121  {
122  Ptr<IePreq> preq = DynamicCast<IePreq> (*i);
123  NS_ASSERT (preq != 0);
124  m_stats.rxPreq++;
125  if (preq->GetOriginatorAddress () == m_protocol->GetAddress ())
126  {
127  continue;
128  }
129  if (preq->GetTtl () == 0)
130  {
131  continue;
132  }
133  preq->DecrementTtl ();
134  m_protocol->ReceivePreq (*preq, header.GetAddr2 (), m_ifIndex, header.GetAddr3 (),
135  m_parent->GetLinkMetric (header.GetAddr2 ()));
136  }
137  if ((*i)->ElementId () == IE_PREP)
138  {
139  Ptr<IePrep> prep = DynamicCast<IePrep> (*i);
140  NS_ASSERT (prep != 0);
141  m_stats.rxPrep++;
142  if (prep->GetTtl () == 0)
143  {
144  continue;
145  }
146  prep->DecrementTtl ();
147  m_protocol->ReceivePrep (*prep, header.GetAddr2 (), m_ifIndex, header.GetAddr3 (),
148  m_parent->GetLinkMetric (header.GetAddr2 ()));
149  }
150  if ((*i)->ElementId () == IE_PERR)
151  {
152  Ptr<IePerr> perr = DynamicCast<IePerr> (*i);
153  NS_ASSERT (perr != 0);
154  m_stats.rxPerr++;
155  std::vector<HwmpProtocol::FailedDestination> destinations = perr->GetAddressUnitVector ();
156  for (std::vector<HwmpProtocol::FailedDestination>::const_iterator i = destinations.begin (); i
157  != destinations.end (); i++)
158  {
159  failedDestinations.push_back (*i);
160  }
161  }
162  }
163  if (failedDestinations.size () > 0)
164  {
165  m_protocol->ReceivePerr (failedDestinations, header.GetAddr2 (), m_ifIndex, header.GetAddr3 ());
166  }
167  NS_ASSERT (packet->GetSize () == 0);
168  return false;
169 }
170 
171 bool
173 {
174  NS_LOG_FUNCTION (this << packet << header);
175  if (header.IsData ())
176  {
177  return ReceiveData (packet, header);
178  }
179  else
180  {
181  if (header.IsAction ())
182  {
183  return ReceiveAction (packet, header);
184  }
185  else
186  {
187  return true; // don't care
188  }
189  }
190 }
191 bool
193  Mac48Address to)
194 {
195  NS_LOG_FUNCTION (this << packet << header << from << to);
196  if (!header.IsData ())
197  {
198  return true;
199  }
200  HwmpTag tag;
201  bool tagExists = packet->RemovePacketTag (tag);
202  if (!tagExists)
203  {
204  NS_FATAL_ERROR ("HWMP tag must exist at this point");
205  }
206  m_stats.txData++;
207  m_stats.txDataBytes += packet->GetSize ();
208  MeshHeader meshHdr;
209  meshHdr.SetMeshSeqno (tag.GetSeqno ());
210  meshHdr.SetMeshTtl (tag.GetTtl ());
211  packet->AddHeader (meshHdr);
212  header.SetAddr1 (tag.GetAddress ());
213  header.SetQosMeshControlPresent ();
214  return true;
215 }
218 {
219  WifiActionHeader actionHdr;
222  actionHdr.SetAction (WifiActionHeader::MESH, action);
223  return actionHdr;
224 }
225 void
227 {
228  NS_LOG_FUNCTION (this);
229  std::vector<IePreq> preq_vector;
230  preq_vector.push_back (preq);
231  SendPreq (preq_vector);
232 }
233 void
234 HwmpProtocolMac::SendPreq (std::vector<IePreq> preq)
235 {
236  NS_LOG_FUNCTION (this);
237  Ptr<Packet> packet = Create<Packet> ();
239  for (std::vector<IePreq>::iterator i = preq.begin (); i != preq.end (); i++)
240  {
241  elements.AddInformationElement (Ptr<IePreq> (&(*i)));
242  }
243  packet->AddHeader (elements);
244  packet->AddHeader (GetWifiActionHeader ());
245  //create 802.11 header:
246  WifiMacHeader hdr;
248  hdr.SetDsNotFrom ();
249  hdr.SetDsNotTo ();
250  hdr.SetAddr2 (m_parent->GetAddress ());
251  hdr.SetAddr3 (m_protocol->GetAddress ());
252  //Send Management frame
253  std::vector<Mac48Address> receivers = m_protocol->GetPreqReceivers (m_ifIndex);
254  for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != receivers.end (); i++)
255  {
256  hdr.SetAddr1 (*i);
257  m_stats.txPreq++;
258  m_stats.txMgt++;
259  m_stats.txMgtBytes += packet->GetSize ();
260  m_parent->SendManagementFrame (packet, hdr);
261  }
262 }
263 void
264 HwmpProtocolMac::RequestDestination (Mac48Address dst, uint32_t originator_seqno, uint32_t dst_seqno)
265 {
266  NS_LOG_FUNCTION (this << dst << originator_seqno << dst_seqno);
267  for (std::vector<IePreq>::iterator i = m_myPreq.begin (); i != m_myPreq.end (); i++)
268  {
269  if (i->IsFull ())
270  {
271  continue;
272  }
273  NS_ASSERT (i->GetDestCount () > 0);
274  i->AddDestinationAddressElement (m_protocol->GetDoFlag (), m_protocol->GetRfFlag (), dst, dst_seqno);
275  }
276  IePreq preq;
277  preq.SetHopcount (0);
278  preq.SetTTL (m_protocol->GetMaxTtl ());
279  preq.SetPreqID (m_protocol->GetNextPreqId ());
280  preq.SetOriginatorAddress (m_protocol->GetAddress ());
281  preq.SetOriginatorSeqNumber (originator_seqno);
282  preq.SetLifetime (m_protocol->GetActivePathLifetime ());
283  preq.AddDestinationAddressElement (m_protocol->GetDoFlag (), m_protocol->GetRfFlag (), dst, dst_seqno);
284  m_myPreq.push_back (preq);
285  SendMyPreq ();
286 }
287 void
289 {
290  NS_LOG_FUNCTION (this);
291  if (m_preqTimer.IsRunning ())
292  {
293  return;
294  }
295  if (m_myPreq.size () == 0)
296  {
297  return;
298  }
299  //reschedule sending PREQ
301  m_preqTimer = Simulator::Schedule (m_protocol->GetPreqMinInterval (), &HwmpProtocolMac::SendMyPreq, this);
302  SendPreq (m_myPreq);
303  m_myPreq.clear ();
304 }
305 void
307 {
308  NS_LOG_FUNCTION (this << receiver);
309  //Create packet
310  Ptr<Packet> packet = Create<Packet> ();
312  elements.AddInformationElement (Ptr<IePrep> (&prep));
313  packet->AddHeader (elements);
314  packet->AddHeader (GetWifiActionHeader ());
315  //create 802.11 header:
316  WifiMacHeader hdr;
318  hdr.SetDsNotFrom ();
319  hdr.SetDsNotTo ();
320  hdr.SetAddr1 (receiver);
321  hdr.SetAddr2 (m_parent->GetAddress ());
322  hdr.SetAddr3 (m_protocol->GetAddress ());
323  //Send Management frame
324  m_stats.txPrep++;
325  m_stats.txMgt++;
326  m_stats.txMgtBytes += packet->GetSize ();
327  m_parent->SendManagementFrame (packet, hdr);
328 }
329 void
330 HwmpProtocolMac::ForwardPerr (std::vector<HwmpProtocol::FailedDestination> failedDestinations, std::vector<
331  Mac48Address> receivers)
332 {
333  NS_LOG_FUNCTION (this);
334  Ptr<Packet> packet = Create<Packet> ();
335  Ptr<IePerr> perr = Create <IePerr> ();
337  for (std::vector<HwmpProtocol::FailedDestination>::const_iterator i = failedDestinations.begin (); i
338  != failedDestinations.end (); i++)
339  {
340  if (!perr->IsFull ())
341  {
342  perr->AddAddressUnit (*i);
343  }
344  else
345  {
346  elements.AddInformationElement (perr);
347  perr->ResetPerr ();
348  }
349  }
350  if (perr->GetNumOfDest () > 0)
351  {
352  elements.AddInformationElement (perr);
353  }
354  packet->AddHeader (elements);
355  packet->AddHeader (GetWifiActionHeader ());
356  //create 802.11 header:
357  WifiMacHeader hdr;
359  hdr.SetDsNotFrom ();
360  hdr.SetDsNotTo ();
361  hdr.SetAddr2 (m_parent->GetAddress ());
362  hdr.SetAddr3 (m_protocol->GetAddress ());
363  if (receivers.size () >= m_protocol->GetUnicastPerrThreshold ())
364  {
365  receivers.clear ();
366  receivers.push_back (Mac48Address::GetBroadcast ());
367  }
368  //Send Management frame
369  for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != receivers.end (); i++)
370  {
371  //
372  // 64-bit Intel valgrind complains about hdr.SetAddr1 (*i). It likes this
373  // just fine.
374  //
375  Mac48Address address = *i;
376  hdr.SetAddr1 (address);
377  m_stats.txPerr++;
378  m_stats.txMgt++;
379  m_stats.txMgtBytes += packet->GetSize ();
380  m_parent->SendManagementFrame (packet, hdr);
381  }
382 }
383 void
384 HwmpProtocolMac::InitiatePerr (std::vector<HwmpProtocol::FailedDestination> failedDestinations, std::vector<
385  Mac48Address> receivers)
386 {
387  NS_LOG_FUNCTION (this);
388  //All duplicates in PERR are checked here, and there is no reason to
389  //check it at any other place
390  {
391  std::vector<Mac48Address>::const_iterator end = receivers.end ();
392  for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != end; i++)
393  {
394  bool should_add = true;
395  for (std::vector<Mac48Address>::const_iterator j = m_myPerr.receivers.begin (); j
396  != m_myPerr.receivers.end (); j++)
397  {
398  if ((*i) == (*j))
399  {
400  should_add = false;
401  }
402  }
403  if (should_add)
404  {
405  m_myPerr.receivers.push_back (*i);
406  NS_LOG_DEBUG ("Initiate PERR: Adding receiver: " << (*i));
407  }
408  }
409  }
410  {
411  std::vector<HwmpProtocol::FailedDestination>::const_iterator end = failedDestinations.end ();
412  for (std::vector<HwmpProtocol::FailedDestination>::const_iterator i = failedDestinations.begin (); i != end; i++)
413  {
414  bool should_add = true;
415  for (std::vector<HwmpProtocol::FailedDestination>::const_iterator j = m_myPerr.destinations.begin (); j
416  != m_myPerr.destinations.end (); j++)
417  {
418  if (((*i).destination == (*j).destination) && ((*j).seqnum > (*i).seqnum))
419  {
420  should_add = false;
421  }
422  }
423  if (should_add)
424  {
425  m_myPerr.destinations.push_back (*i);
426  NS_LOG_DEBUG ("Initiate PERR: Adding failed destination: " << (*i).destination);
427  }
428  }
429  }
430  SendMyPerr ();
431 }
432 void
434 {
435  NS_LOG_FUNCTION (this);
436  if (m_perrTimer.IsRunning ())
437  {
438  return;
439  }
440  m_perrTimer = Simulator::Schedule (m_protocol->GetPerrMinInterval (), &HwmpProtocolMac::SendMyPerr, this);
442  m_myPerr.destinations.clear ();
443  m_myPerr.receivers.clear ();
444 }
445 uint32_t
447 {
448  return m_parent->GetLinkMetric (peerAddress);
449 }
450 uint16_t
452 {
453  return m_parent->GetFrequencyChannel ();
454 }
456  txPreq (0), rxPreq (0), txPrep (0), rxPrep (0), txPerr (0), rxPerr (0), txMgt (0), txMgtBytes (0),
457  rxMgt (0), rxMgtBytes (0), txData (0), txDataBytes (0), rxData (0), rxDataBytes (0)
458 {
459 }
460 void
461 HwmpProtocolMac::Statistics::Print (std::ostream & os) const
462 {
463  os << "<Statistics "
464  "txPreq= \"" << txPreq << "\"" << std::endl <<
465  "txPrep=\"" << txPrep << "\"" << std::endl <<
466  "txPerr=\"" << txPerr << "\"" << std::endl <<
467  "rxPreq=\"" << rxPreq << "\"" << std::endl <<
468  "rxPrep=\"" << rxPrep << "\"" << std::endl <<
469  "rxPerr=\"" << rxPerr << "\"" << std::endl <<
470  "txMgt=\"" << txMgt << "\"" << std::endl <<
471  "txMgtBytes=\"" << txMgtBytes << "\"" << std::endl <<
472  "rxMgt=\"" << rxMgt << "\"" << std::endl <<
473  "rxMgtBytes=\"" << rxMgtBytes << "\"" << std::endl <<
474  "txData=\"" << txData << "\"" << std::endl <<
475  "txDataBytes=\"" << txDataBytes << "\"" << std::endl <<
476  "rxData=\"" << rxData << "\"" << std::endl <<
477  "rxDataBytes=\"" << rxDataBytes << "\"/>" << std::endl;
478 }
479 void
480 HwmpProtocolMac::Report (std::ostream & os) const
481 {
482  os << "<HwmpProtocolMac" << std::endl <<
483  "address =\"" << m_parent->GetAddress () << "\">" << std::endl;
484  m_stats.Print (os);
485  os << "</HwmpProtocolMac>" << std::endl;
486 }
487 void
489 {
490  NS_LOG_FUNCTION (this);
491  m_stats = Statistics ();
492 }
493 
494 int64_t
496 {
497  return m_protocol->AssignStreams (stream);
498 }
499 
500 
501 } // namespace dot11s
502 } // 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.
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.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:852
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:864
void RequestDestination(Mac48Address dest, uint32_t originator_seqno, uint32_t dst_seqno)
Request a destination.
#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:204
See 7.3.2.97 of 802.11s draft 2.07.
std::vector< IePreq > m_myPreq
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:162
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
uint32_t GetLinkMetric(Mac48Address peerAddress) const
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 SetMeshTtl(uint8_t TTL)
Set mesh TTL subfield corresponding to the remaining number of hops the MSDU/MMPDU is forwarded...
void Print(std::ostream &os) const
Print function.
Iterator End()
Returns End of the vector.
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:1389
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:937
Mac48Address GetAddr3(void) const
Return the address in the Address 3 field.
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
Mac48Address GetAddr2(void) const
Return the address in the Address 2 field.
Iterator Begin()
Returns Begin of the vector.
Mac48Address GetAddr4(void) const
Return the address in the Address 4 field.
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.
bool IsData(void) const
Return true if the Type is DATA.
address
Definition: first.py:37
void SetAddr2(Mac48Address address)
Fill the Address 2 field with the given address.
void Report(std::ostream &os) const
Report statistics.
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.
void SetType(WifiMacType type, bool resetToDsFromDs=true)
Set Type/Subtype values with the correct values depending on the given type.
bool ReceiveData(Ptr< Packet > packet, const WifiMacHeader &header)
Receive data frame.
void AddPacketTag(const Tag &tag) const
Add a packet tag.
Definition: packet.cc:863
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:264
bool RemovePacketTag(Tag &tag)
Remove a packet tag.
Definition: packet.cc:870
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:272
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:935
uint16_t GetChannelId() const
Get the channel ID.
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
Definition: event-id.cc:65
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.
bool IsAction() const
Return true if the header is an Action header.
void InitiatePerr(std::vector< HwmpProtocol::FailedDestination > destinations, std::vector< Mac48Address > receivers)
initiate my own path error
Statistics m_stats
statistics
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.
bool PeekPacketTag(Tag &tag) const
Search a matching tag and call Tag::Deserialize if it is found.
Definition: packet.cc:885
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.
#define IE_PERR
void SetDsNotFrom(void)
Un-set the From DS bit in the Frame Control field.