31 #include "ns3/mesh-point-device.h"
32 #include "ns3/mesh-wifi-interface-mac.h"
33 #include "ns3/packet.h"
34 #include "ns3/pointer.h"
35 #include "ns3/random-variable-stream.h"
36 #include "ns3/simulator.h"
37 #include "ns3/string.h"
38 #include "ns3/trace-source-accessor.h"
39 #include "ns3/wifi-net-device.h"
55 TypeId(
"ns3::dot11s::HwmpProtocol")
59 .AddAttribute(
"RandomStart",
60 "Random delay at first proactive PREQ",
64 .AddAttribute(
"MaxQueueSize",
65 "Maximum number of packets we can store when resolving route",
68 MakeUintegerChecker<uint16_t>(1))
70 "Dot11MeshHWMPmaxPREQretries",
71 "Maximum number of retries before we suppose the destination to be unreachable",
74 MakeUintegerChecker<uint8_t>(1))
76 "Dot11MeshHWMPnetDiameterTraversalTime",
77 "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",
86 .AddAttribute(
"Dot11MeshHWMPperrMinInterval",
87 "Minimal interval between to successive PREQs",
91 .AddAttribute(
"Dot11MeshHWMPactiveRootTimeout",
92 "Lifetime of proactive routing information",
96 .AddAttribute(
"Dot11MeshHWMPactivePathTimeout",
97 "Lifetime of reactive routing information",
101 .AddAttribute(
"Dot11MeshHWMPpathToRootInterval",
102 "Interval between two successive proactive PREQs",
106 .AddAttribute(
"Dot11MeshHWMPrannInterval",
107 "Lifetime of proactive routing information",
111 .AddAttribute(
"MaxTtl",
112 "Initial value of Time To Live field",
115 MakeUintegerChecker<uint8_t>(2))
117 "UnicastPerrThreshold",
118 "Maximum number of PERR receivers, when we send a PERR as a chain of unicasts",
121 MakeUintegerChecker<uint8_t>(1))
123 "UnicastPreqThreshold",
124 "Maximum number of PREQ receivers, when we send a PREQ as a chain of unicasts",
127 MakeUintegerChecker<uint8_t>(1))
128 .AddAttribute(
"UnicastDataThreshold",
129 "Maximum number of broadcast receivers, when we send a broadcast as a "
133 MakeUintegerChecker<uint8_t>(1))
134 .AddAttribute(
"DoFlag",
135 "Destination only HWMP flag",
139 .AddAttribute(
"RfFlag",
140 "Reply and forward flag",
144 .AddTraceSource(
"RouteDiscoveryTime",
145 "The time of route discovery procedure",
147 "ns3::Time::TracedCallback")
148 .AddTraceSource(
"RouteChange",
149 "Routing table changed",
151 "ns3::HwmpProtocol::RouteChangeTracedCallback");
162 m_dot11MeshHWMPmaxPREQretries(3),
163 m_dot11MeshHWMPnetDiameterTraversalTime(
MicroSeconds(1024 * 100)),
164 m_dot11MeshHWMPpreqMinInterval(
MicroSeconds(1024 * 100)),
165 m_dot11MeshHWMPperrMinInterval(
MicroSeconds(1024 * 100)),
166 m_dot11MeshHWMPactiveRootTimeout(
MicroSeconds(1024 * 5000)),
167 m_dot11MeshHWMPactivePathTimeout(
MicroSeconds(1024 * 5000)),
168 m_dot11MeshHWMPpathToRootInterval(
MicroSeconds(1024 * 2000)),
172 m_unicastPerrThreshold(32),
173 m_unicastPreqThreshold(1),
174 m_unicastDataThreshold(1),
206 i->second.preqTimeout.Cancel();
223 uint16_t protocolType,
226 NS_LOG_FUNCTION(
this << sourceIface << source << destination << constPacket << protocolType);
235 "HWMP tag has come with a packet from upper layer. This must not occur...");
263 std::vector<uint16_t> channels;
266 bool shouldSend =
true;
267 for (
auto chan = channels.begin(); chan != channels.end(); chan++)
269 if ((*chan) == plugin->second->GetChannelId())
278 channels.push_back(plugin->second->GetChannelId());
280 for (
auto i = receivers.begin(); i != receivers.end(); i++)
291 routeReply(
true, packetCopy, source, destination, protocolType, plugin->first);
313 uint16_t& protocolType)
318 NS_FATAL_ERROR(
"HWMP tag must exist when packet received from the network");
328 uint16_t protocolType,
332 NS_LOG_FUNCTION(
this << sourceIface << source << destination << packet << protocolType << ttl);
335 NS_LOG_DEBUG(
"Requested src = " << source <<
", dst = " << destination <<
", I am "
349 routeReply(
true, packet, source, destination, protocolType, result.
ifIndex);
367 NS_LOG_DEBUG(
"Path error, lookup expired proactive path");
372 NS_LOG_DEBUG(
"Path error, initiate reactive path error");
373 std::vector<FailedDestination> destinations =
385 uint32_t dst_seqno = 0;
388 dst_seqno = result.
seqnum;
393 i->second->RequestDestination(destination, originator_seqno, dst_seqno);
398 pkt.
dst = destination;
401 pkt.
reply = routeReply;
411 NS_LOG_DEBUG(
"Dropping packet from " << source <<
" to " << destination
412 <<
" due to queue overflow");
428 bool freshInfo(
true);
438 if (i->second.second <= preq.
GetMetric())
447 <<
", preq:" << preq);
463 rChange.
type =
"Add Reactive";
484 rChange.
type =
"Add Reactive";
494 for (
auto i = destinations.begin(); i != destinations.end(); i++)
503 NS_ASSERT(((*i)->IsDo()) && ((*i)->IsRf()));
517 rChange.
type =
"Add Proactive";
540 if ((*i)->GetDestinationAddress() ==
GetAddress())
561 if ((lifetime > 0) && ((int32_t)(result.
seqnum - (*i)->GetDestSeqNumber()) >= 0))
563 SendPrep((*i)->GetDestinationAddress(),
577 (*i)->SetFlags(
true,
false, (*i)->IsUsn());
597 NS_LOG_DEBUG(
"Forwarding PREQ from " << from <<
" with delay "
614 bool freshInfo(
true);
618 if ((int32_t)(i->second.first - sequence) > 0)
622 if (i->second.first == sequence)
628 std::make_pair(sequence, prep.
GetMetric());
632 <<
", receiver was:" << from);
649 rChange.
type =
"Add Reactive";
655 rChange.
seqnum = sequence;
681 rChange.
type =
"Add Reactive";
687 rChange.
seqnum = sequence;
721 std::vector<FailedDestination> retval;
723 for (
unsigned int i = 0; i < destinations.size(); i++)
727 ((int32_t)(result.
seqnum - destinations[i].seqnum) > 0)))
729 retval.push_back(destinations[i]);
744 uint32_t originatorDsn,
745 uint32_t destinationSN,
760 prep_sender->second->SendPrep(prep, retransmitter);
769 std::vector<Ptr<NetDevice>>
interfaces = mp->GetInterfaces();
786 mac->InstallPlugin(hwmpMac);
789 mac->SetLinkMetricCallback(
792 mp->SetRoutingProtocol(
this);
794 mp->AggregateObject(
this);
805 NS_LOG_FUNCTION(
this << meshPointAddress << peerAddress << interface << status);
811 NS_LOG_DEBUG(destinations.size() <<
" failed destinations for peer address " << peerAddress);
827 NS_LOG_DEBUG(
"Dropping seqno " << seqno <<
"; from self");
837 if ((int32_t)(i->second - seqno) >= 0)
839 NS_LOG_DEBUG(
"Dropping seqno " << seqno <<
"; stale frame");
859 for (
unsigned int i = 0; i < destinations.size(); i++)
865 rChange.
type =
"Delete Reactive";
867 rChange.
seqnum = destinations[i].seqnum;
879 std::vector<Mac48Address> receivers_for_interface;
880 for (
unsigned int j = 0; j < perr.
receivers.size(); j++)
884 receivers_for_interface.push_back(perr.
receivers[j].second);
887 i->second->InitiatePerr(perr.
destinations, receivers_for_interface);
897 std::vector<Mac48Address> receivers_for_interface;
898 for (
unsigned int j = 0; j < perr.
receivers.size(); j++)
902 receivers_for_interface.push_back(perr.
receivers[j].second);
911 receivers_for_interface);
912 i->second->ForwardPerr(perr.
destinations, receivers_for_interface);
916 std::vector<std::pair<uint32_t, Mac48Address>>
921 for (
unsigned int i = 0; i < failedDest.size(); i++)
927 rChange.
type =
"Delete Reactive";
929 rChange.
seqnum = failedDest[i].seqnum;
934 rChangePro.
type =
"Delete Proactive";
935 rChangePro.
destination = failedDest[i].destination;
936 rChangePro.
seqnum = failedDest[i].seqnum;
938 for (
unsigned int j = 0; j < precursors.size(); j++)
940 retval.push_back(precursors[j]);
944 for (
unsigned int i = 0; i < retval.size(); i++)
946 for (
unsigned int j = i + 1; j < retval.size(); j++)
950 retval.erase(retval.begin() + j);
957 std::vector<Mac48Address>
961 std::vector<Mac48Address> retval;
974 std::vector<Mac48Address>
978 std::vector<Mac48Address> retval;
1008 retval.
pkt =
nullptr;
1011 if ((*i).dst == dst)
1026 retval.
pkt =
nullptr;
1151 i->second->RequestDestination(dst, originator_seqno, dst_seqno);
1194 i->second->SendPreq(preq);
1280 os <<
"<Statistics "
1306 << initiatedPerr <<
"\"/>" << std::endl;
1318 <<
"Dot11MeshHWMPnetDiameterTraversalTime=\""
1325 <<
"\"" << std::endl
1327 <<
"\"" << std::endl
1329 <<
"\"" << std::endl
1332 <<
"isRoot=\"" <<
m_isRoot <<
"\"" << std::endl
1333 <<
"maxTtl=\"" << (uint16_t)
m_maxTtl <<
"\"" << std::endl
1337 <<
"doFlag=\"" <<
m_doFlag <<
"\"" << std::endl
1338 <<
"rfFlag=\"" <<
m_rfFlag <<
"\">" << std::endl;
1342 plugin->second->Report(os);
1344 os <<
"</Hwmp>" << std::endl;
1354 plugin->second->ResetStats();
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.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
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).
Ptr< Packet > Copy() const
performs a COW copy of the packet.
void AddPacketTag(const Tag &tag) const
Add a packet tag.
bool PeekPacketTag(Tag &tag) const
Search a matching tag and call Tag::Deserialize if it is found.
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
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.
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.
Ptr< WifiMac > GetMac() const
uint32_t GetIfIndex() const override
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.
void SetRoot()
Unset the current node as root.
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
keeps HWMP seqno (first in pair) and HWMP metric (second in pair) for each address
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.
void DeleteReactivePath(Mac48Address destination)
Delete the reactive paths toward a destination.
static const uint32_t MAX_METRIC
Maximum (the best?) path metric.
LookupResult LookupReactive(Mac48Address destination)
Lookup path to destination.
LookupResult LookupReactiveExpired(Mac48Address destination)
Return all reactive paths, including expired.
PrecursorList GetPrecursors(Mac48Address destination)
Get the precursors list.
void DeleteProactivePath()
Delete all the proactive paths.
LookupResult LookupProactiveExpired()
Return all proactive paths, including expired.
std::vector< std::pair< uint32_t, Mac48Address > > PrecursorList
Path precursor = {MAC, interface ID}.
std::vector< HwmpProtocol::FailedDestination > GetUnreachableDestinations(Mac48Address peerAddress)
When peer link with a given MAC-address fails - it returns list of unreachable destination addresses.
LookupResult LookupProactive()
Find proactive path to tree root.
void AddPrecursor(Mac48Address destination, uint32_t precursorInterface, Mac48Address precursorAddress, Time lifetime)
Add a precursor.
void AddProactivePath(uint32_t metric, Mac48Address root, Mac48Address retransmitter, uint32_t interface, Time lifetime, uint32_t seqnum)
Add a proactive path.
void AddReactivePath(Mac48Address destination, Mac48Address retransmitter, uint32_t interface, uint32_t metric, Time lifetime, uint32_t seqnum)
Add a reactive path.
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,...
#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.
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.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeBooleanChecker()
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
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...
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
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