21 #include "ns3/mesh-wifi-interface-mac.h"
22 #include "ns3/packet.h"
23 #include "ns3/simulator.h"
24 #include "ns3/nstime.h"
26 #include "ns3/mgt-headers.h"
40 m_ifIndex (ifIndex), m_protocol (protocol)
61 NS_FATAL_ERROR (
"HWMP tag is not supposed to be received by network");
71 switch (meshHdr.GetAddressExt ())
79 "6-address scheme is not yet supported and 4-address extension is not supposed to be used for data frames.");
81 tag.
SetSeqno (meshHdr.GetMeshSeqno ());
82 tag.
SetTtl (meshHdr.GetMeshTtl ());
106 std::vector<HwmpProtocol::FailedDestination> failedDestinations;
122 if (preq->GetTtl () == 0)
126 preq->DecrementTtl ();
135 if (prep->GetTtl () == 0)
139 prep->DecrementTtl ();
148 std::vector<HwmpProtocol::FailedDestination> destinations = perr->GetAddressUnitVector ();
149 for (std::vector<HwmpProtocol::FailedDestination>::const_iterator i = destinations.begin (); i
150 != destinations.end (); i++)
152 failedDestinations.push_back (*i);
156 if (failedDestinations.size () > 0)
219 std::vector<IePreq> preq_vector;
220 preq_vector.push_back (preq);
228 for (std::vector<IePreq>::iterator i = preq.begin (); i != preq.end (); i++)
243 for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != receivers.end (); i++)
256 for (std::vector<IePreq>::iterator i =
m_myPreq.begin (); i !=
m_myPreq.end (); i++)
326 for (std::vector<HwmpProtocol::FailedDestination>::const_iterator i = failedDestinations.begin (); i
327 != failedDestinations.end (); i++)
329 if (!perr->IsFull ())
331 perr->AddAddressUnit (*i);
339 if (perr->GetNumOfDest () > 0)
341 elements.AddInformationElement (perr);
358 for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != receivers.end (); i++)
379 std::vector<Mac48Address>::const_iterator end = receivers.end ();
380 for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != end; i++)
382 bool should_add =
true;
383 for (std::vector<Mac48Address>::const_iterator j =
m_myPerr.
receivers.begin (); j
398 std::vector<HwmpProtocol::FailedDestination>::const_iterator end = failedDestinations.end ();
399 for (std::vector<HwmpProtocol::FailedDestination>::const_iterator i = failedDestinations.begin (); i != end; i++)
401 bool should_add =
true;
402 for (std::vector<HwmpProtocol::FailedDestination>::const_iterator j =
m_myPerr.
destinations.begin (); j
405 if (((*i).destination == (*j).destination) && ((*j).seqnum > (*i).seqnum))
442 txPreq (0), rxPreq (0), txPrep (0), rxPrep (0), txPerr (0), rxPerr (0), txMgt (0), txMgtBytes (0),
443 rxMgt (0), rxMgtBytes (0), txData (0), txDataBytes (0), rxData (0), rxDataBytes (0)
450 "txPreq= \"" << txPreq <<
"\"" << std::endl <<
451 "txPrep=\"" << txPrep <<
"\"" << std::endl <<
452 "txPerr=\"" << txPerr <<
"\"" << std::endl <<
453 "rxPreq=\"" << rxPreq <<
"\"" << std::endl <<
454 "rxPrep=\"" << rxPrep <<
"\"" << std::endl <<
455 "rxPerr=\"" << rxPerr <<
"\"" << std::endl <<
456 "txMgt=\"" << txMgt <<
"\"" << std::endl <<
457 "txMgtBytes=\"" << txMgtBytes <<
"\"" << std::endl <<
458 "rxMgt=\"" << rxMgt <<
"\"" << std::endl <<
459 "rxMgtBytes=\"" << rxMgtBytes <<
"\"" << std::endl <<
460 "txData=\"" << txData <<
"\"" << std::endl <<
461 "txDataBytes=\"" << txDataBytes <<
"\"" << std::endl <<
462 "rxData=\"" << rxData <<
"\"" << std::endl <<
463 "rxDataBytes=\"" << rxDataBytes <<
"\"/>" << std::endl;
468 os <<
"<HwmpProtocolMac" << std::endl <<
471 os <<
"</HwmpProtocolMac>" << std::endl;