20#include "ns3/mesh-point-device.h"
21#include "ns3/mesh-wifi-interface-mac.h"
22#include "ns3/packet.h"
23#include "ns3/pointer.h"
24#include "ns3/random-variable-stream.h"
25#include "ns3/simulator.h"
26#include "ns3/string.h"
27#include "ns3/trace-source-accessor.h"
28#include "ns3/wifi-net-device.h"
44 TypeId(
"ns3::dot11s::HwmpProtocol")
48 .AddAttribute(
"RandomStart",
49 "Random delay at first proactive PREQ",
53 .AddAttribute(
"MaxQueueSize",
54 "Maximum number of packets we can store when resolving route",
59 "Dot11MeshHWMPmaxPREQretries",
60 "Maximum number of retries before we suppose the destination to be unreachable",
65 "Dot11MeshHWMPnetDiameterTraversalTime",
66 "Time we suppose the packet to go from one edge of the network to another",
70 .AddAttribute(
"Dot11MeshHWMPpreqMinInterval",
71 "Minimal interval between to successive PREQs",
75 .AddAttribute(
"Dot11MeshHWMPperrMinInterval",
76 "Minimal interval between to successive PREQs",
80 .AddAttribute(
"Dot11MeshHWMPactiveRootTimeout",
81 "Lifetime of proactive routing information",
85 .AddAttribute(
"Dot11MeshHWMPactivePathTimeout",
86 "Lifetime of reactive routing information",
90 .AddAttribute(
"Dot11MeshHWMPpathToRootInterval",
91 "Interval between two successive proactive PREQs",
95 .AddAttribute(
"Dot11MeshHWMPrannInterval",
96 "Lifetime of proactive routing information",
100 .AddAttribute(
"MaxTtl",
101 "Initial value of Time To Live field",
106 "UnicastPerrThreshold",
107 "Maximum number of PERR receivers, when we send a PERR as a chain of unicasts",
112 "UnicastPreqThreshold",
113 "Maximum number of PREQ receivers, when we send a PREQ as a chain of unicasts",
117 .AddAttribute(
"UnicastDataThreshold",
118 "Maximum number of broadcast receivers, when we send a broadcast as a "
123 .AddAttribute(
"DoFlag",
124 "Destination only HWMP flag",
128 .AddAttribute(
"RfFlag",
129 "Reply and forward flag",
133 .AddTraceSource(
"RouteDiscoveryTime",
134 "The time of route discovery procedure",
136 "ns3::Time::TracedCallback")
137 .AddTraceSource(
"RouteChange",
138 "Routing table changed",
140 "ns3::HwmpProtocol::RouteChangeTracedCallback");
151 m_dot11MeshHWMPmaxPREQretries(3),
152 m_dot11MeshHWMPnetDiameterTraversalTime(
MicroSeconds(1024 * 100)),
153 m_dot11MeshHWMPpreqMinInterval(
MicroSeconds(1024 * 100)),
154 m_dot11MeshHWMPperrMinInterval(
MicroSeconds(1024 * 100)),
155 m_dot11MeshHWMPactiveRootTimeout(
MicroSeconds(1024 * 5000)),
156 m_dot11MeshHWMPactivePathTimeout(
MicroSeconds(1024 * 5000)),
157 m_dot11MeshHWMPpathToRootInterval(
MicroSeconds(1024 * 2000)),
161 m_unicastPerrThreshold(32),
162 m_unicastPreqThreshold(1),
163 m_unicastDataThreshold(1),
195 i->second.preqTimeout.Cancel();
212 uint16_t protocolType,
215 NS_LOG_FUNCTION(
this << sourceIface << source << destination << constPacket << protocolType);
221 if (packet->PeekPacketTag(tag))
224 "HWMP tag has come with a packet from upper layer. This must not occur...");
235 if (!packet->RemovePacketTag(tag))
252 std::vector<uint16_t> channels;
255 bool shouldSend =
true;
256 for (
auto chan = channels.begin(); chan != channels.end(); chan++)
258 if ((*chan) == plugin->second->GetChannelId())
267 channels.push_back(plugin->second->GetChannelId());
269 for (
auto i = receivers.begin(); i != receivers.end(); i++)
278 packetCopy->AddPacketTag(tag);
279 NS_LOG_DEBUG(
"Sending route reply for broadcast; address " << address);
280 routeReply(
true, packetCopy, source, destination, protocolType, plugin->first);
302 uint16_t& protocolType)
305 if (!packet->RemovePacketTag(tag))
307 NS_FATAL_ERROR(
"HWMP tag must exist when packet received from the network");
317 uint16_t protocolType,
321 NS_LOG_FUNCTION(
this << sourceIface << source << destination << packet << protocolType << ttl);
324 NS_LOG_DEBUG(
"Requested src = " << source <<
", dst = " << destination <<
", I am "
328 result =
m_rtable->LookupProactive();
334 packet->AddPacketTag(tag);
338 routeReply(
true, packet, source, destination, protocolType, result.
ifIndex);
347 result =
m_rtable->LookupReactiveExpired(destination);
356 NS_LOG_DEBUG(
"Path error, lookup expired proactive path");
357 result =
m_rtable->LookupProactiveExpired();
361 NS_LOG_DEBUG(
"Path error, initiate reactive path error");
362 std::vector<FailedDestination> destinations =
370 result =
m_rtable->LookupReactiveExpired(destination);
377 dst_seqno = result.
seqnum;
382 i->second->RequestDestination(destination, originator_seqno, dst_seqno);
387 pkt.
dst = destination;
390 pkt.
reply = routeReply;
400 NS_LOG_DEBUG(
"Dropping packet from " << source <<
" to " << destination
401 <<
" due to queue overflow");
417 bool freshInfo(
true);
427 if (i->second.second <= preq.
GetMetric())
436 <<
", preq:" << preq);
452 rChange.
type =
"Add Reactive";
463 (
m_rtable->LookupReactive(fromMp).metric > metric))
473 rChange.
type =
"Add Reactive";
483 for (
auto i = destinations.begin(); i != destinations.end(); i++)
492 NS_ASSERT(((*i)->IsDo()) && ((*i)->IsRf()));
506 rChange.
type =
"Add Proactive";
529 if ((*i)->GetDestinationAddress() ==
GetAddress())
550 if ((lifetime > 0) && ((
int32_t)(result.
seqnum - (*i)->GetDestSeqNumber()) >= 0))
552 SendPrep((*i)->GetDestinationAddress(),
560 m_rtable->AddPrecursor((*i)->GetDestinationAddress(),
566 (*i)->SetFlags(
true,
false, (*i)->IsUsn());
586 NS_LOG_DEBUG(
"Forwarding PREQ from " << from <<
" with delay "
603 bool freshInfo(
true);
607 if ((
int32_t)(i->second.first - sequence) > 0)
611 if (i->second.first == sequence)
617 std::make_pair(sequence, prep.
GetMetric());
621 <<
", receiver was:" << from);
638 rChange.
type =
"Add Reactive";
644 rChange.
seqnum = sequence;
660 ((
m_rtable->LookupReactive(fromMp)).metric > metric))
670 rChange.
type =
"Add Reactive";
676 rChange.
seqnum = sequence;
710 std::vector<FailedDestination> retval;
712 for (
unsigned int i = 0; i < destinations.size(); i++)
714 result =
m_rtable->LookupReactiveExpired(destinations[i].destination);
718 retval.push_back(destinations[i]);
749 prep_sender->second->SendPrep(prep, retransmitter);
758 std::vector<Ptr<NetDevice>> interfaces = mp->GetInterfaces();
759 for (
auto i = interfaces.begin(); i != interfaces.end(); i++)
775 mac->InstallPlugin(hwmpMac);
778 mac->SetLinkMetricCallback(
781 mp->SetRoutingProtocol(
this);
783 mp->AggregateObject(
this);
794 NS_LOG_FUNCTION(
this << meshPointAddress << peerAddress << interface << status);
799 std::vector<FailedDestination> destinations =
m_rtable->GetUnreachableDestinations(peerAddress);
800 NS_LOG_DEBUG(destinations.size() <<
" failed destinations for peer address " << peerAddress);
816 NS_LOG_DEBUG(
"Dropping seqno " << seqno <<
"; from self");
826 if ((
int32_t)(i->second - seqno) >= 0)
828 NS_LOG_DEBUG(
"Dropping seqno " << seqno <<
"; stale frame");
848 for (
unsigned int i = 0; i < destinations.size(); i++)
851 m_rtable->DeleteReactivePath(destinations[i].destination);
854 rChange.
type =
"Delete Reactive";
856 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);
886 std::vector<Mac48Address> receivers_for_interface;
887 for (
unsigned int j = 0; j < perr.
receivers.size(); j++)
891 receivers_for_interface.push_back(perr.
receivers[j].second);
900 receivers_for_interface);
901 i->second->ForwardPerr(perr.
destinations, receivers_for_interface);
905std::vector<std::pair<uint32_t, Mac48Address>>
910 for (
unsigned int i = 0; i < failedDest.size(); i++)
913 m_rtable->DeleteReactivePath(failedDest[i].destination);
916 rChange.
type =
"Delete Reactive";
918 rChange.
seqnum = failedDest[i].seqnum;
920 m_rtable->DeleteProactivePath(failedDest[i].destination);
923 rChangePro.
type =
"Delete Proactive";
924 rChangePro.
destination = failedDest[i].destination;
925 rChangePro.
seqnum = failedDest[i].seqnum;
927 for (
unsigned int j = 0; j < precursors.size(); j++)
929 retval.push_back(precursors[j]);
933 for (
unsigned int i = 0; i < retval.size(); i++)
935 for (
unsigned int j = i + 1; j < retval.size(); j++)
939 retval.erase(retval.begin() + j);
946std::vector<Mac48Address>
950 std::vector<Mac48Address> retval;
963std::vector<Mac48Address>
967 std::vector<Mac48Address> retval;
997 retval.
pkt =
nullptr;
1000 if ((*i).dst == dst)
1015 retval.
pkt =
nullptr;
1105 result =
m_rtable->LookupProactive();
1140 i->second->RequestDestination(dst, originator_seqno, dst_seqno);
1183 i->second->SendPreq(preq);
1269 os <<
"<Statistics "
1295 << initiatedPerr <<
"\"/>" << std::endl;
1307 <<
"Dot11MeshHWMPnetDiameterTraversalTime=\""
1314 <<
"\"" << std::endl
1316 <<
"\"" << std::endl
1318 <<
"\"" << std::endl
1321 <<
"isRoot=\"" <<
m_isRoot <<
"\"" << std::endl
1322 <<
"maxTtl=\"" << (uint16_t)
m_maxTtl <<
"\"" << std::endl
1326 <<
"doFlag=\"" <<
m_doFlag <<
"\"" << std::endl
1327 <<
"rfFlag=\"" <<
m_rfFlag <<
"\">" << std::endl;
1331 plugin->second->Report(os);
1333 os <<
"</Hwmp>" << std::endl;
1343 plugin->second->ResetStats();
AttributeValue implementation for Boolean.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
void Cancel()
This method is syntactic sugar for the ns3::Simulator::Cancel method.
static Mac48Address ConvertFrom(const Address &address)
static Mac48Address GetBroadcast()
Interface for L2 mesh routing protocol and mesh point communication.
Ptr< MeshPointDevice > GetMeshPoint() const
Each mesh protocol must be installed on the mesh point to work.
Ptr< MeshPointDevice > m_mp
Host mesh point.
Basic MAC of mesh point Wi-Fi interface.
bool RemovePacketTag(Tag &tag)
Remove a packet tag.
uint32_t GetSize() const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
void AddPacketTag(const Tag &tag) const
Add a packet tag.
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static Time Now()
Return the current simulation virtual time.
Simulation virtual time values and global simulation resolution.
TimeWithUnit As(const Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
int64_t GetMicroSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
AttributeValue implementation for Time.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
Hold together all Wifi-related objects.
uint32_t CalculateMetric(Mac48Address peerAddress, Ptr< MeshWifiInterfaceMac > mac)
Airtime link metric is defined in Section 13.9 of IEEE 802.11-2012 as:
Hybrid wireless mesh protocol – a mesh routing protocol defined in IEEE 802.11-2012 standard.
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.
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.
Mac48Address GetAddress()
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.
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
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
void SendPreq(IePreq preq)
Send PREQ function.
void SendPrep(IePrep prep, Mac48Address receiver)
Send PREP function.
void ForwardPerr(std::vector< HwmpProtocol::FailedDestination > destinations, std::vector< Mac48Address > receivers)
Forward a path error.
Routing table for HWMP – 802.11s routing protocol.
static const uint32_t MAX_METRIC
Maximum (the best?) path metric.
std::vector< std::pair< uint32_t, Mac48Address > > PrecursorList
Path precursor = {MAC, interface ID}.
Hwmp tag implements interaction between HWMP protocol and MeshWifiMac.
void SetTtl(uint8_t ttl)
Set the TTL value.
void SetSeqno(uint32_t seqno)
Set sequence number.
uint8_t GetTtl() const
Get the TTL value.
void SetAddress(Mac48Address retransmitter)
Set address.
void DecrementTtl()
Decrement TTL.
See 7.3.2.97 of 802.11s draft 2.07.
uint32_t GetMetric() const
Get metric function.
void SetTtl(uint8_t ttl)
Set TTL function.
void SetDestinationSeqNumber(uint32_t dest_seq_number)
Set destination sequence number function.
Mac48Address GetDestinationAddress() const
Get destination address function.
void SetHopcount(uint8_t hopcount)
Set hop count function.
void IncrementMetric(uint32_t metric)
Increment metric function.
uint32_t GetLifetime() const
Get lifetime function.
void SetOriginatorAddress(Mac48Address originator_address)
Set originator address function.
void SetMetric(uint32_t metric)
Set metric function.
void SetDestinationAddress(Mac48Address dest_address)
Set destination address function.
void SetLifetime(uint32_t lifetime)
Set lifetime function.
Mac48Address GetOriginatorAddress() const
Get originator address function.
void SetOriginatorSeqNumber(uint32_t originator_seq_number)
Set originator sequence number function.
uint32_t GetDestinationSeqNumber() const
Get destination sequence number function.
See 7.3.2.96 of 802.11s draft 2.07.
uint32_t GetOriginatorSeqNumber() const
Get originator sequence number value.
void DelDestinationAddressElement(Mac48Address dest_address)
Delete a destination address unit by destination.
void SetHopcount(uint8_t hopcount)
Set number of hops from originator to mesh STA transmitting this element.
uint8_t GetDestCount() const
Get destination count.
std::vector< Ptr< DestinationAddressUnit > > GetDestinationList()
Get all destinations, which are stored in PREQ:
void SetOriginatorSeqNumber(uint32_t originator_seq_number)
Set originator sequence number.
uint32_t GetMetric() const
Get metric value.
void SetTTL(uint8_t ttl)
Set remaining number of hops allowed for this element.
void SetOriginatorAddress(Mac48Address originator_address)
Set originator address value.
Mac48Address GetOriginatorAddress() const
Get originator address value.
void SetPreqID(uint32_t id)
Set path discovery id field.
void IncrementMetric(uint32_t metric)
Handle Metric:
uint32_t GetLifetime() const
Get lifetime value.
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 IsNeedNotPrep() const
Check whether Proactive PREP subfield to off.
void SetLifetime(uint32_t lifetime)
Set lifetime in TUs for the forwarding information to be considered valid.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Ptr< const AttributeChecker > MakeBooleanChecker()
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeChecker > MakeTimeChecker()
Helper to make an unbounded Time checker.
Ptr< const AttributeChecker > MakeUintegerChecker()
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time Seconds(double value)
Construct a Time in the indicated unit.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
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.
uint16_t protocol
protocol number
Mac48Address dst
dst address
RouteReplyCallback reply
how to reply
uint32_t inInterface
incoming device interface ID.
Mac48Address src
src address
Ptr< Packet > pkt
the packet
uint16_t totalDropped
total dropped
void Print(std::ostream &os) const
Print function.
uint16_t initiatedPrep
initiated PREP
uint16_t totalQueued
total queued
uint16_t txBroadcast
transmit broadcast
uint32_t txBytes
transmit bytes
uint16_t txUnicast
transmit unicast
uint16_t initiatedPerr
initiated PERR
uint16_t droppedTtl
dropped TTL
uint16_t initiatedPreq
initiated PREQ
Route lookup result, return type of LookupXXX methods.
uint32_t seqnum
sequence number
uint32_t ifIndex
IF index.
Mac48Address retransmitter
retransmitter
Structure to encapsulate route change information.
Time lifetime
lifetime of route
Mac48Address retransmitter
route source
uint32_t seqnum
sequence number of route
uint32_t metric
metric of route
Mac48Address destination
route destination
std::string type
type of change
uint32_t interface
interface index