21 #ifndef HWMP_PROTOCOL_H
22 #define HWMP_PROTOCOL_H
24 #include "ns3/mesh-l2-routing-protocol.h"
25 #include "ns3/nstime.h"
26 #include "ns3/event-id.h"
27 #include "ns3/traced-value.h"
32 class MeshPointDevice;
35 class UniformRandomVariable;
37 class HwmpProtocolMac;
87 void Report (std::ostream &)
const;
114 std::vector<std::pair<uint32_t, Mac48Address> >
receivers;
143 uint32_t originatorDsn,
144 uint32_t destinationSN,
157 std::vector<std::pair<uint32_t, Mac48Address> >
GetPerrReceivers (std::vector<FailedDestination> failedDest);
230 void Print (std::ostream & os)
const;
Time m_dot11MeshHWMPrannInterval
Structure of path error: IePerr and list of receivers: interfaces and MAC address.
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.
keep track of time values and allow control of global simulation resolution
std::map< uint32_t, Ptr< HwmpProtocolMac > > HwmpProtocolMacMap
Time m_dot11MeshHWMPpreqMinInterval
Time m_dot11MeshHWMPperrMinInterval
void SendPrep(Mac48Address src, Mac48Address dst, Mac48Address retransmitter, uint32_t initMetric, uint32_t originatorDsn, uint32_t destinationSN, uint32_t lifetime, uint32_t interface)
forms a path error information element when list of destination fails on a given interface ...
structure of unreachable destination - address and sequence number
forward calls to a chain of CallbackAn ns3::TracedCallback has almost exactly the same API as a norma...
Callback< void, bool, Ptr< Packet >, Mac48Address, Mac48Address, uint16_t, uint32_t > RouteReplyCallback
Callback to be invoked when route discovery procedure is completed.
Time m_dot11MeshHWMPactiveRootTimeout
void ForwardPathError(PathError perr)
Forwards a received path error.
See 7.3.2.97 of 802.11s draft 2.07.
Mac48Address src
src address
bool Install(Ptr< MeshPointDevice >)
Install HWMP on given mesh point.
void InitiatePathError(PathError perr)
Passes a self-generated PERR to interface-plugin.
void ReactivePathResolved(Mac48Address dst)
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 ...
uint8_t m_unicastDataThreshold
TracedCallback< Time > m_routeDiscoveryTimeCallback
Route discovery time:
void ReceivePrep(IePrep prep, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric)
forms a path error information element when list of destination fails on a given interface ...
void SendProactivePreq()
Proactive Preq routines:
bool DropDataFrame(uint32_t seqno, Mac48Address source)
MAC-plugin asks whether the frame can be dropped.
QueuedPacket DequeueFirstPacket()
Ptr< Packet > pkt
the packet
void Print(std::ostream &os) const
std::vector< Mac48Address > GetPreqReceivers(uint32_t interface)
bool RemoveRoutingStuff(uint32_t fromIface, const Mac48Address source, const Mac48Address destination, Ptr< Packet > packet, uint16_t &protocolType)
Cleanup packet from all tags.
Time GetPerrMinInterval()
uint8_t m_unicastPerrThreshold
std::vector< QueuedPacket > m_rqueue
Packet Queue.
std::vector< std::pair< uint32_t, Mac48Address > > GetPerrReceivers(std::vector< FailedDestination > failedDest)
void RetryPathDiscovery(Mac48Address dst, uint8_t numOfRetry)
Generates PREQ retry when retry timeout has expired and route is still unresolved.
void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Hybrid wireless mesh protocol – a routing protocol of IEEE 802.11s draft.
See 7.3.2.96 of 802.11s draft 2.07.
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.
Packet waiting its routing information.
void ProactivePathResolved()
HwmpProtocolMacMap m_interfaces
uint32_t GetActivePathLifetime()
Ptr< HwmpRtable > m_rtable
Routing table.
static TypeId GetTypeId()
uint8_t m_unicastPreqThreshold
void ReceivePreq(IePreq preq, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric)
forms a path error information element when list of destination fails on a given interface ...
Time m_randomStart
Random start in Proactive PREQ propagation.
Mac48Address GetAddress()
Interface MAC plugin for HWMP – 802.11s routing protocol.
uint16_t protocol
protocol number
uint8_t m_dot11MeshHWMPmaxPREQretries
HwmpProtocol & operator=(const HwmpProtocol &)
PathError MakePathError(std::vector< FailedDestination > destinations)
forms a path error information element when list of destination fails on a given interface ...
std::vector< std::pair< uint32_t, Mac48Address > > receivers
list of PathError receivers (in case of unicast PERR)
uint32_t GetNextHwmpSeqno()
RouteReplyCallback reply
how to reply
Interface for L2 mesh routing protocol and mesh point communication.
void Report(std::ostream &) const
Statistics:
Mac48Address dst
dst address
Ptr< UniformRandomVariable > m_coefficient
Random variable for random start time.
uint8_t GetUnicastPerrThreshold()
EventId m_proactivePreqTimer
Random start in Proactive PREQ propagation.
Time m_dot11MeshHWMPactivePathTimeout
an identifier for simulation events.
std::vector< Mac48Address > GetBroadcastReceivers(uint32_t interface)
std::vector< FailedDestination > destinations
destination list: Mac48Address and sequence number
Time m_dot11MeshHWMPpathToRootInterval
Callback< std::vector< Mac48Address >, uint32_t > m_neighboursCallback
std::map< Mac48Address, uint32_t > m_lastDataSeqno
keeps HWMP seqno (first in pair) and HWMP metric (second in pair) for each address ...
QueuedPacket DequeueFirstPacketByDst(Mac48Address dst)
Time GetPreqMinInterval()
uint32_t inInterface
incoming device interface ID. (if packet has come from upper layers, this is Mesh point ID) ...
bool QueuePacket(QueuedPacket packet)
bool ShouldSendPreq(Mac48Address dst)
checks when the last path discovery procedure was started for a given destination.
void PeerLinkStatus(Mac48Address meshPontAddress, Mac48Address peerAddress, uint32_t interface, bool status)
a unique identifier for an interface.
std::map< Mac48Address, PreqEvent > m_preqTimeouts
Random start in Proactive PREQ propagation.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
Time m_dot11MeshHWMPnetDiameterTraversalTime
void ReceivePerr(std::vector< FailedDestination >, Mac48Address from, uint32_t interface, Mac48Address fromMp)
forms a path error information element when list of destination fails on a given interface ...
void SetNeighboursCallback(Callback< std::vector< Mac48Address >, uint32_t > cb)
This callback is used to obtain active neighbours on a given interface.
virtual void DoInitialize()
This method is called only once by Object::Initialize.