|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
26 #include "ns3/simulator.h"
27 #include "ns3/packet.h"
28 #include "ns3/mesh-point-device.h"
29 #include "ns3/wifi-net-device.h"
30 #include "ns3/mesh-wifi-interface-mac.h"
31 #include "ns3/random-variable-stream.h"
35 #include "ns3/trace-source-accessor.h"
51 .SetGroupName (
"Mesh")
53 .AddAttribute (
"RandomStart",
54 "Random delay at first proactive PREQ",
60 .AddAttribute (
"MaxQueueSize",
61 "Maximum number of packets we can store when resolving route",
65 MakeUintegerChecker<uint16_t> (1)
67 .AddAttribute (
"Dot11MeshHWMPmaxPREQretries",
68 "Maximum number of retries before we suppose the destination to be unreachable",
72 MakeUintegerChecker<uint8_t> (1)
74 .AddAttribute (
"Dot11MeshHWMPnetDiameterTraversalTime",
75 "Time we suppose the packet to go from one edge of the network to another",
81 .AddAttribute (
"Dot11MeshHWMPpreqMinInterval",
82 "Minimal interval between to successive PREQs",
88 .AddAttribute (
"Dot11MeshHWMPperrMinInterval",
89 "Minimal interval between to successive PREQs",
94 .AddAttribute (
"Dot11MeshHWMPactiveRootTimeout",
95 "Lifetime of proactive routing information",
101 .AddAttribute (
"Dot11MeshHWMPactivePathTimeout",
102 "Lifetime of reactive routing information",
108 .AddAttribute (
"Dot11MeshHWMPpathToRootInterval",
109 "Interval between two successive proactive PREQs",
115 .AddAttribute (
"Dot11MeshHWMPrannInterval",
116 "Lifetime of proactive routing information",
122 .AddAttribute (
"MaxTtl",
123 "Initial value of Time To Live field",
127 MakeUintegerChecker<uint8_t> (2)
129 .AddAttribute (
"UnicastPerrThreshold",
130 "Maximum number of PERR receivers, when we send a PERR as a chain of unicasts",
134 MakeUintegerChecker<uint8_t> (1)
136 .AddAttribute (
"UnicastPreqThreshold",
137 "Maximum number of PREQ receivers, when we send a PREQ as a chain of unicasts",
141 MakeUintegerChecker<uint8_t> (1)
143 .AddAttribute (
"UnicastDataThreshold",
144 "Maximum number of broadcast receivers, when we send a broadcast as a chain of unicasts",
148 MakeUintegerChecker<uint8_t> (1)
150 .AddAttribute (
"DoFlag",
151 "Destination only HWMP flag",
157 .AddAttribute (
"RfFlag",
158 "Reply and forward flag",
164 .AddTraceSource (
"RouteDiscoveryTime",
165 "The time of route discovery procedure",
168 "ns3::Time::TracedCallback"
170 .AddTraceSource (
"RouteChange",
171 "Routing table changed",
173 "ns3::HwmpProtocol::RouteChangeTracedCallback"
185 m_maxQueueSize (255),
186 m_dot11MeshHWMPmaxPREQretries (3),
187 m_dot11MeshHWMPnetDiameterTraversalTime (
MicroSeconds (1024*100)),
188 m_dot11MeshHWMPpreqMinInterval (
MicroSeconds (1024*100)),
189 m_dot11MeshHWMPperrMinInterval (
MicroSeconds (1024*100)),
190 m_dot11MeshHWMPactiveRootTimeout (
MicroSeconds (1024*5000)),
191 m_dot11MeshHWMPactivePathTimeout (
MicroSeconds (1024*5000)),
192 m_dot11MeshHWMPpathToRootInterval (
MicroSeconds (1024*2000)),
196 m_unicastPerrThreshold (32),
197 m_unicastPreqThreshold (1),
198 m_unicastDataThreshold (1),
229 i->second.preqTimeout.Cancel ();
243 uint32_t sourceIface,
247 uint16_t protocolType,
251 NS_LOG_FUNCTION (
this << sourceIface << source << destination << constPacket << protocolType);
259 NS_FATAL_ERROR (
"HWMP tag has come with a packet from upper layer. This must not occur...");
272 NS_FATAL_ERROR (
"HWMP tag is supposed to be here at this point.");
286 std::vector<uint16_t> channels;
289 bool shouldSend =
true;
290 for (std::vector<uint16_t>::const_iterator chan = channels.begin (); chan != channels.end (); chan++)
292 if ((*chan) == plugin->second->GetChannelId ())
301 channels.push_back (plugin->second->GetChannelId ());
303 for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != receivers.end (); i++)
313 routeReply (
true, packetCopy, source, destination, protocolType, plugin->first);
319 return ForwardUnicast (sourceIface, source, destination, packet, protocolType, routeReply, tag.
GetTtl ());
330 NS_FATAL_ERROR (
"HWMP tag must exist when packet received from the network");
338 NS_LOG_FUNCTION (
this << sourceIface << source << destination << packet << protocolType << ttl);
354 routeReply (
true, packet, source, destination, protocolType, result.
ifIndex);
372 NS_LOG_DEBUG (
"Path error, lookup expired proactive path");
377 NS_LOG_DEBUG (
"Path error, initiate reactive path error");
389 uint32_t dst_seqno = 0;
392 dst_seqno = result.
seqnum;
397 i->second->RequestDestination (destination, originator_seqno, dst_seqno);
402 pkt.
dst = destination;
405 pkt.
reply = routeReply;
415 NS_LOG_DEBUG (
"Dropping packet from " << source <<
" to " << destination <<
" due to queue overflow");
427 bool freshInfo (
true);
437 if (i->second.second <= preq.
GetMetric ())
466 rChange.
type =
"Add Reactive";
491 rChange.
type =
"Add Reactive";
510 NS_ASSERT (((*i)->IsDo ()) && ((*i)->IsRf ()));
528 rChange.
type =
"Add Proactive";
553 if ((*i)->GetDestinationAddress () ==
GetAddress ())
575 if ((lifetime > 0) && ((int32_t)(result.
seqnum - (*i)->GetDestSeqNumber ()) >= 0))
578 (*i)->GetDestinationAddress (),
591 (*i)->SetFlags (
true,
false, (*i)->IsUsn ());
610 i->second->SendPreq (preq);
621 bool freshInfo (
true);
625 if ((int32_t)(i->second.first - sequence) > 0)
629 if (i->second.first == sequence)
658 rChange.
type =
"Add Reactive";
664 rChange.
seqnum = sequence;
689 rChange.
type =
"Add Reactive";
695 rChange.
seqnum = sequence;
719 std::vector<FailedDestination> retval;
721 for (
unsigned int i = 0; i < destinations.size (); i++)
726 (result.
ifIndex != interface) ||
727 ((int32_t)(result.
seqnum - destinations[i].seqnum) > 0)
730 retval.push_back (destinations[i]);
733 if (retval.size () == 0)
745 uint32_t originatorDsn,
746 uint32_t destinationSN,
759 HwmpProtocolMacMap::const_iterator prep_sender =
m_interfaces.find (interface);
761 prep_sender->second->SendPrep (prep, retransmitter);
769 std::vector<Ptr<NetDevice> >
interfaces = mp->GetInterfaces ();
786 mac->InstallPlugin (hwmpMac);
791 mp->SetRoutingProtocol (
this);
793 mp->AggregateObject (
this);
800 NS_LOG_FUNCTION (
this << meshPointAddress << peerAddress << interface << status);
806 NS_LOG_DEBUG (destinations.size () <<
" failed destinations for peer address " << peerAddress);
822 std::map<Mac48Address, uint32_t,std::less<Mac48Address> >::const_iterator i =
m_lastDataSeqno.find (source);
829 if ((int32_t)(i->second - seqno) >= 0)
849 for (
unsigned int i = 0; i < destinations.size (); i++)
855 rChange.
type =
"Delete Reactive";
857 rChange.
seqnum = destinations[i].seqnum;
868 std::vector<Mac48Address> receivers_for_interface;
869 for (
unsigned int j = 0; j < perr.
receivers.size (); j++)
873 receivers_for_interface.push_back (perr.
receivers[j].second);
876 i->second->InitiatePerr (perr.
destinations, receivers_for_interface);
885 std::vector<Mac48Address> receivers_for_interface;
886 for (
unsigned int j = 0; j < perr.
receivers.size (); j++)
890 receivers_for_interface.push_back (perr.
receivers[j].second);
893 i->second->ForwardPerr (perr.
destinations, receivers_for_interface);
897 std::vector<std::pair<uint32_t, Mac48Address> >
902 for (
unsigned int i = 0; i < failedDest.size (); i++)
908 rChange.
type =
"Delete Reactive";
910 rChange.
seqnum = failedDest[i].seqnum;
915 rChangePro.
type =
"Delete Proactive";
916 rChangePro.
destination = failedDest[i].destination;
917 rChangePro.
seqnum = failedDest[i].seqnum;
919 for (
unsigned int j = 0; j < precursors.size (); j++)
921 retval.push_back (precursors[j]);
925 for (
unsigned int i = 0; i < retval.size (); i++)
927 for (
unsigned int j = i+1; j < retval.size (); j++)
931 retval.erase (retval.begin () + j);
937 std::vector<Mac48Address>
941 std::vector<Mac48Address> retval;
953 std::vector<Mac48Address>
957 std::vector<Mac48Address> retval;
988 for (std::vector<QueuedPacket>::iterator i =
m_rqueue.begin (); i !=
m_rqueue.end (); i++)
1018 std::map<Mac48Address, PreqEvent>::iterator i =
m_preqTimeouts.find (dst);
1028 while (packet.
pkt != 0)
1050 while (packet.
pkt != 0)
1072 std::map<Mac48Address, PreqEvent>::const_iterator i =
m_preqTimeouts.find (dst);
1094 std::map<Mac48Address, PreqEvent>::iterator i =
m_preqTimeouts.find (dst);
1103 while (packet.
pkt != 0)
1109 std::map<Mac48Address, PreqEvent>::iterator i =
m_preqTimeouts.find (dst);
1120 i->second->RequestDestination (dst, originator_seqno, dst_seqno);
1157 i->second->SendPreq (preq);
1228 os <<
"<Statistics "
1229 "txUnicast=\"" << txUnicast <<
"\" "
1230 "txBroadcast=\"" << txBroadcast <<
"\" "
1231 "txBytes=\"" << txBytes <<
"\" "
1232 "droppedTtl=\"" << droppedTtl <<
"\" "
1233 "totalQueued=\"" << totalQueued <<
"\" "
1234 "totalDropped=\"" << totalDropped <<
"\" "
1235 "initiatedPreq=\"" << initiatedPreq <<
"\" "
1236 "initiatedPrep=\"" << initiatedPrep <<
"\" "
1237 "initiatedPerr=\"" << initiatedPerr <<
"\"/>" << std::endl;
1243 "address=\"" <<
m_address <<
"\"" << std::endl <<
1253 "isRoot=\"" <<
m_isRoot <<
"\"" << std::endl <<
1254 "maxTtl=\"" << (uint16_t)
m_maxTtl <<
"\"" << std::endl <<
1258 "doFlag=\"" <<
m_doFlag <<
"\"" << std::endl <<
1259 "rfFlag=\"" <<
m_rfFlag <<
"\">" << std::endl;
1263 plugin->second->Report (os);
1265 os <<
"</Hwmp>" << std::endl;
1274 plugin->second->ResetStats ();
a unique identifier for an interface.
uint32_t GetMetric() const
Get metric function.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void DeleteReactivePath(Mac48Address destination)
Delete the reactive paths toward a destination.
Mac48Address m_address
address
bool m_rfFlag
Reply and forward flag.
Mac48Address dst
dst address
Mac48Address retransmitter
retransmitter
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 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.
QueuedPacket DequeueFirstPacket()
Dequeue the first packet in the queue.
std::vector< Ptr< DestinationAddressUnit > > GetDestinationList()
Get all destinations, which are stored in PREQ:
uint32_t GetOriginatorSeqNumber() const
Get originator sequence numnber value.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
uint32_t GetDestinationSeqNumber() const
Get destination sequence number function.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
bool GetRfFlag()
Get rf flag function.
AttributeValue implementation for Boolean.
Time m_dot11MeshHWMPnetDiameterTraversalTime
Time we suppose the packet to go from one edge of the network to another.
void AddReactivePath(Mac48Address destination, Mac48Address retransmitter, uint32_t interface, uint32_t metric, Time lifetime, uint32_t seqnum)
Add a reactive path.
std::string type
type of change
Structure to encapsulate route change information.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
bool m_doFlag
Destination only HWMP flag.
static Time Now(void)
Return the current simulation virtual time.
void UnsetRoot()
Unset the current node as root.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Mac48Address destination
route destination
void IncrementMetric(uint32_t metric)
Handle Metric:
Ptr< Packet > pkt
the packet
void SetAddress(Mac48Address retransmitter)
Set address.
void ProactivePathResolved()
Signal the protocol that the proactive path is now available.
static TypeId GetTypeId()
Get the type ID.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
bool GetDoFlag()
Get do flag function.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
EventId m_proactivePreqTimer
proactive PREQ timer
uint32_t m_preqId
PREQ ID.
Route lookup result, return type of LookupXXX methods.
uint8_t m_unicastDataThreshold
Maximum number of broadcast receivers, when we send a broadcast as a chain of unicasts.
bool RemoveRoutingStuff(uint32_t fromIface, const Mac48Address source, const Mac48Address destination, Ptr< Packet > packet, uint16_t &protocolType)
Clean HWMP packet tag from packet; only the packet parameter is used.
Time m_randomStart
Random start in Proactive PREQ propagation.
Interface for L2 mesh routing protocol and mesh point communication.
void SetTTL(uint8_t ttl)
Set remaining number of hops allowed for this element.
void ReceivePerr(std::vector< FailedDestination > destinations, Mac48Address from, uint32_t interface, Mac48Address fromMp)
Handler for receiving Path Error.
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
void DecrementTtl()
Decrement TTL.
uint32_t m_dataSeqno
data sequence no
HwmpProtocolMacMap m_interfaces
interfaces
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
void SetSeqno(uint32_t seqno)
Set sequence number.
PathError MakePathError(std::vector< FailedDestination > destinations)
forms a path error information element when list of destination fails on a given interface
void AddProactivePath(uint32_t metric, Mac48Address root, Mac48Address retransmitter, uint32_t interface, Time lifetime, uint32_t seqnum)
Add a proactive path.
void DeleteProactivePath()
Delete all the proactive paths.
bool PeekPacketTag(Tag &tag) const
Search a matching tag and call Tag::Deserialize if it is found.
std::vector< std::pair< uint32_t, Mac48Address > > GetPerrReceivers(std::vector< FailedDestination > failedDest)
Get PERR receivers.
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
std::map< Mac48Address, uint32_t > m_lastDataSeqno
keeps HWMP seqno (first in pair) and HWMP metric (second in pair) for each address
void SetOriginatorAddress(Mac48Address originator_address)
Set originator address function.
bool IsNeedNotPrep() const
Check whether Proactive PREP subfield to off.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
uint32_t metric
metric of route
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Packet waiting its routing information.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Time GetPreqMinInterval()
Get PREQ minimum interval function.
Hold together all Wifi-related objects.
Mac48Address retransmitter
route source
uint8_t GetMaxTtl()
Get maximum TTL function.
void PeerLinkStatus(Mac48Address meshPontAddress, Mac48Address peerAddress, uint32_t interface, bool status)
Peer link status function.
void DoDispose()
Destructor implementation.
void SetTtl(uint8_t ttl)
Set the TTL value.
Ptr< MeshPointDevice > m_mp
Host mesh point.
Mac48Address GetAddress()
uint16_t protocol
protocol number
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
bool DropDataFrame(uint32_t seqno, Mac48Address source)
MAC-plugin asks whether the frame can be dropped.
static Mac48Address GetBroadcast(void)
void SetOriginatorAddress(Mac48Address originator_address)
Set originator address value.
bool Install(Ptr< MeshPointDevice > mp)
Install HWMP on given mesh point.
uint32_t seqnum
sequence number
uint8_t GetDestCount() const
Get destination count.
uint16_t txUnicast
transmit unicast
LookupResult LookupReactiveExpired(Mac48Address destination)
Return all reactive paths, including expired.
See 7.3.2.96 of 802.11s draft 2.07.
Time m_dot11MeshHWMPactiveRootTimeout
Lifetime of proactive routing information.
int64_t GetMicroSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
uint8_t m_unicastPerrThreshold
Maximum number of PERR receivers, when we send a PERR as a chain of unicasts.
static Mac48Address ConvertFrom(const Address &address)
std::vector< HwmpProtocol::FailedDestination > GetUnreachableDestinations(Mac48Address peerAddress)
When peer link with a given MAC-address fails - it returns list of unreachable destination addresses.
std::vector< QueuedPacket > m_rqueue
Packet Queue.
uint8_t GetTtl()
Get the TTL value.
virtual void DoInitialize()
Initialize() implementation.
Ptr< UniformRandomVariable > m_coefficient
Random variable for random start time.
void SetLifetime(uint32_t lifetime)
Set lifetime in TUs for the forwarding information to be considered valid.
uint16_t initiatedPrep
initiated PREP
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
RouteReplyCallback reply
how to reply
uint16_t droppedTtl
dropped TTL
Ptr< const AttributeChecker > MakeBooleanChecker(void)
uint32_t GetActivePathLifetime()
Get active path lifetime function.
QueuedPacket DequeueFirstPacketByDst(Mac48Address dst)
Dequeue the first packet for a given destination.
void SetDestinationAddress(Mac48Address dest_address)
Set destination address function.
Simulation virtual time values and global simulation resolution.
bool m_isRoot
True if the node is a root.
uint16_t totalQueued
total queued
void SetDestinationSeqNumber(uint32_t dest_seq_number)
Set destination sequence number function.
uint16_t initiatedPerr
initiated PERR
PrecursorList GetPrecursors(Mac48Address destination)
Get the precursors list.
Ptr< HwmpRtable > GetRoutingTable(void) const
Get pointer to HWMP routing table.
uint32_t ifIndex
IF index.
void RetryPathDiscovery(Mac48Address dst, uint8_t numOfRetry)
Generates PREQ retry when retry timeout has expired and route is still unresolved.
std::vector< Mac48Address > GetPreqReceivers(uint32_t interface)
Get PREQ receivers.
void ResetStats()
Reset Statistics:
void SetRoot()
Unset the current node as root.
LookupResult LookupReactive(Mac48Address destination)
Lookup path to destination.
void SetOriginatorSeqNumber(uint32_t originator_seq_number)
Set originator sequence number function.
uint32_t GetMetric() const
Get metric value.
Time m_dot11MeshHWMPpreqMinInterval
Minimal interval between to successive PREQs.
uint16_t totalDropped
total dropped
Hybrid wireless mesh protocol – a mesh routing protocol defined in IEEE 802.11-2012 standard.
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
uint32_t GetIfIndex(void) const override
void IncrementMetric(uint32_t metric)
Increment metric function.
uint32_t txBytes
transmit bytes
void AddPrecursor(Mac48Address destination, uint32_t precursorInterface, Mac48Address precursorAddress, Time lifetime)
Add a precursor.
std::vector< FailedDestination > destinations
destination list: Mac48Address and sequence number
uint8_t GetUnicastPerrThreshold()
Get unicast PERR threshold function.
static const uint32_t MAX_METRIC
Maximum (the best?) path metric.
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.
void AddPacketTag(const Tag &tag) const
Add a packet tag.
LookupResult LookupProactiveExpired()
Return all proactive paths, including expired.
void ForwardPathError(PathError perr)
Forwards a received path error.
Callback< std::vector< Mac48Address >, uint32_t > m_neighboursCallback
neighbors callback
std::vector< Mac48Address > GetBroadcastReceivers(uint32_t interface)
Get broadcast receivers.
void DelDestinationAddressElement(Mac48Address dest_address)
Delete a destination address unit by destination.
Time m_dot11MeshHWMPperrMinInterval
Minimal interval between to successive PREQs.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
uint32_t GetLifetime() const
Get lifetime value.
void Report(std::ostream &os) const
Statistics:
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Ptr< HwmpRtable > m_rtable
Routing table.
void SetHopcount(uint8_t hopcount)
Set hop count function.
LookupResult LookupProactive()
Find proactive path to tree root.
void SendProactivePreq()
Proactive Preq routines:
Time Seconds(double value)
Construct a Time in the indicated unit.
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
uint32_t interface
interface index
void SetPreqID(uint32_t id)
Set path discovery id field.
std::vector< std::pair< uint32_t, Mac48Address > > PrecursorList
Path precursor = {MAC, interface ID}.
bool RemovePacketTag(Tag &tag)
Remove a packet tag.
AttributeValue implementation for Time.
Time GetPerrMinInterval()
Get PERR minimum interval function.
bool RequestRoute(uint32_t sourceIface, const Mac48Address source, const Mac48Address destination, Ptr< const Packet > packet, uint16_t protocolType, RouteReplyCallback routeReply)
Route request, inherited from MeshL2RoutingProtocol.
TracedCallback< Time > m_routeDiscoveryTimeCallback
Route discovery time:
uint32_t GetNextHwmpSeqno()
Get next HWMP sequence no function.
void SetLifetime(uint32_t lifetime)
Set lifetime function.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Mac48Address GetOriginatorAddress() const
Get originator address function.
uint32_t GetNextPreqId()
Get next period function.
void SetOriginatorSeqNumber(uint32_t originator_seq_number)
Set originator sequence number.
See 7.3.2.97 of 802.11s draft 2.07.
Time lifetime
lifetime of route
void ReactivePathResolved(Mac48Address dst)
Signal the protocol that the reactive path toward a destination is now available.
uint32_t GetLifetime() const
Get lifetime function.
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
uint8_t m_dot11MeshHWMPmaxPREQretries
Maximum number of retries before we suppose the destination to be unreachable.
void SetHopcount(uint8_t hopcount)
Set number of hops from originator to mesh STA transmitting this element.
void ReceivePreq(IePreq preq, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric)
Handler for receiving Path Request.
void Print(std::ostream &os) const
Print function.
Hold an unsigned integer type.
Hwmp tag implements interaction between HWMP protocol and MeshWifiMac.
Ptr< MeshPointDevice > GetMeshPoint() const
Each mesh protocol must be installed on the mesh point to work.
Time m_dot11MeshHWMPrannInterval
Lifetime of proactive routing information.
std::map< Mac48Address, PreqEvent > m_preqTimeouts
PREQ timeouts.
uint32_t m_hwmpSeqno
HWMP sequence no.
void SetNeighboursCallback(Callback< std::vector< Mac48Address >, uint32_t > cb)
This callback is used to obtain active neighbours on a given interface.
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
void SetMetric(uint32_t metric)
Set metric function.
Statistics m_stats
statistics
Mac48Address GetOriginatorAddress() const
Get originator address value.
void ReceivePrep(IePrep prep, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric)
Handler for receiving Path Reply.
void SetTtl(uint8_t ttl)
Set TTL function.
uint16_t initiatedPreq
initiated PREQ
Time m_dot11MeshHWMPactivePathTimeout
Lifetime of reactive routing information.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
TracedCallback< struct RouteChange > m_routeChangeTraceSource
Route change trace source.
uint32_t inInterface
incoming device interface ID. (if packet has come from upper layers, this is Mesh point ID)
Routing table for HWMP – 802.11s routing protocol.
bool QueuePacket(QueuedPacket packet)
Queue a packet.
Mac48Address GetDestinationAddress() const
Get destination address function.
uint32_t seqnum
sequence number of route
Time m_dot11MeshHWMPpathToRootInterval
Interval between two successive proactive PREQs.
uint32_t CalculateMetric(Mac48Address peerAddress, Ptr< MeshWifiInterfaceMac > mac)
Airtime link metric is defined in Section 13.9 of IEEE 802.11-2012 as:
Mac48Address src
src address
std::vector< std::pair< uint32_t, Mac48Address > > receivers
list of PathError receivers (in case of unicast PERR)
void InitiatePathError(PathError perr)
Passes a self-generated PERR to interface-plugin.
uint16_t m_maxQueueSize
Maximum number of packets we can store when resolving route.
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Structure of path error: IePerr and list of receivers: interfaces and MAC address.
bool ShouldSendPreq(Mac48Address dst)
checks when the last path discovery procedure was started for a given destination.
uint8_t m_unicastPreqThreshold
Maximum number of PREQ receivers, when we send a PREQ as a chain of unicasts.
uint8_t m_maxTtl
Initial value of Time To Live field.
Ptr< WifiMac > GetMac(void) const
Basic MAC of mesh point Wi-Fi interface.
uint16_t txBroadcast
transmit broadcast