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;
137 void Report (std::ostream &)
const;
181 std::vector<std::pair<uint32_t, Mac48Address> >
receivers;
258 uint32_t originatorDsn,
259 uint32_t destinationSN,
286 std::vector<std::pair<uint32_t, Mac48Address> >
GetPerrReceivers (std::vector<FailedDestination> failedDest);
413 void Print (std::ostream & os)
const;
Time m_dot11MeshHWMPrannInterval
Structure of path error: IePerr and list of receivers: interfaces and MAC address.
uint16_t txBroadcast
transmit broadcast
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.
Simulation virtual time values and global simulation resolution.
Mac48Address retransmitter
route source
std::string type
type of change
std::map< uint32_t, Ptr< HwmpProtocolMac > > HwmpProtocolMacMap
HwmpProtocolMacMap typedef.
Time m_dot11MeshHWMPpreqMinInterval
uint16_t initiatedPreq
initiated PREQ
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)
Send Path Reply.
structure of unreachable destination - address and sequence number
uint16_t droppedTtl
dropped TTL
Forward calls to a chain of Callback.
TracedCallback< struct RouteChange > RouteChangeTracedCallback
RouteChangeTracedCallback typedef.
Time m_dot11MeshHWMPactiveRootTimeout
void ForwardPathError(PathError perr)
Forwards a received path error.
See 7.3.2.97 of 802.11s draft 2.07.
bool GetRfFlag()
Get rf flag function.
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.
Time lifetime
lifetime of route
Statistics m_stats
statistics
Ptr< HwmpRtable > GetRoutingTable(void) const
Get pointer to HWMP routing table.
uint8_t GetMaxTtl()
Get maximum TTL function.
void ReactivePathResolved(Mac48Address dst)
Time whenScheduled
scheduled time
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)
Handler for receiving Path Reply.
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
std::vector< Mac48Address > GetPreqReceivers(uint32_t interface)
Get PREQ receivers.
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.
uint16_t totalQueued
total queued
Time GetPerrMinInterval()
Get PERR minimum interval function.
uint8_t m_unicastPerrThreshold
std::vector< QueuedPacket > m_rqueue
Packet Queue.
std::vector< std::pair< uint32_t, Mac48Address > > GetPerrReceivers(std::vector< FailedDestination > failedDest)
Get PERR receivers.
void RetryPathDiscovery(Mac48Address dst, uint8_t numOfRetry)
Generates PREQ retry when retry timeout has expired and route is still unresolved.
void DoDispose()
Destructor implementation.
Mac48Address destination
route destination
Hybrid wireless mesh protocol – a mesh routing protocol defined in IEEE 802.11-2012 standard...
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.
uint32_t seqnum
sequence number of route
Packet waiting its routing information.
void ProactivePathResolved()
HwmpProtocolMacMap m_interfaces
interfaces
uint32_t GetActivePathLifetime()
Get active path lifetime function.
uint16_t totalDropped
total dropped
Ptr< HwmpRtable > m_rtable
Routing table.
static TypeId GetTypeId()
Get the type ID.
void Report(std::ostream &) const
Statistics:
uint16_t initiatedPerr
initiated PERR
uint8_t m_unicastPreqThreshold
void ReceivePreq(IePreq preq, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric)
Handler for receiving Path Request.
uint32_t m_dataSeqno
data sequence no
Time m_randomStart
Random start in Proactive PREQ propagation.
Mac48Address GetAddress()
Interface MAC plugin for HWMP – 802.11s routing protocol.
uint32_t m_hwmpSeqno
HWMP sequence no.
uint16_t protocol
protocol number
Mac48Address m_address
address
uint8_t m_dot11MeshHWMPmaxPREQretries
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t seqnum
sequence number
uint16_t initiatedPrep
initiated PREP
uint32_t GetNextPreqId()
Get next period function.
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()
Get next HWMP sequence no function.
uint32_t txBytes
transmit bytes
RouteReplyCallback reply
how to reply
uint32_t m_preqId
PREQ ID.
Interface for L2 mesh routing protocol and mesh point communication.
Mac48Address destination
destination address
void ReceivePerr(std::vector< FailedDestination > destinations, Mac48Address from, uint32_t interface, Mac48Address fromMp)
Handler for receiving Path Error.
uint32_t metric
metric of route
Mac48Address dst
dst address
Ptr< UniformRandomVariable > m_coefficient
Random variable for random start time.
uint8_t GetUnicastPerrThreshold()
Get unicast PERR threshold function.
EventId m_proactivePreqTimer
proactive PREQ timer
Time m_dot11MeshHWMPactivePathTimeout
An identifier for simulation events.
std::vector< Mac48Address > GetBroadcastReceivers(uint32_t interface)
Get broadcast receivers.
std::vector< FailedDestination > destinations
destination list: Mac48Address and sequence number
void Print(std::ostream &os) const
Print function.
Time m_dot11MeshHWMPpathToRootInterval
uint16_t txUnicast
transmit unicast
Callback< std::vector< Mac48Address >, uint32_t > m_neighboursCallback
neighbors callback
std::map< Mac48Address, uint32_t > m_lastDataSeqno
keeps HWMP seqno (first in pair) and HWMP metric (second in pair) for each address ...
EventId preqTimeout
PREQ timeout.
QueuedPacket DequeueFirstPacketByDst(Mac48Address dst)
Time GetPreqMinInterval()
Get PREQ minimum interval function.
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) ...
bool QueuePacket(QueuedPacket packet)
bool ShouldSendPreq(Mac48Address dst)
checks when the last path discovery procedure was started for a given destination.
HwmpProtocol & operator=(const HwmpProtocol &hwmp)
assignment operator
void PeerLinkStatus(Mac48Address meshPontAddress, Mac48Address peerAddress, uint32_t interface, bool status)
Peer link status function.
void ResetStats()
Reset Statistics:
a unique identifier for an interface.
uint32_t interface
interface index
std::map< Mac48Address, PreqEvent > m_preqTimeouts
PREQ timeouts.
bool GetDoFlag()
Get do flag function.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
Time m_dot11MeshHWMPnetDiameterTraversalTime
Structure to encapsulate route change information.
void SetNeighboursCallback(Callback< std::vector< Mac48Address >, uint32_t > cb)
This callback is used to obtain active neighbours on a given interface.
virtual void DoInitialize()
Initialize() implementation.