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;
50 static TypeId GetTypeId ();
87 void Report (std::ostream &)
const;
114 std::vector<std::pair<uint32_t, Mac48Address> >
receivers;
128 typedef std::map<uint32_t, Ptr<HwmpProtocolMac> > HwmpProtocolMacMap;
143 uint32_t originatorDsn,
144 uint32_t destinationSN,
157 std::vector<std::pair<uint32_t, Mac48Address> >
GetPerrReceivers (std::vector<FailedDestination> failedDest);
181 void ProactivePathResolved ();
207 Time GetPreqMinInterval ();
208 Time GetPerrMinInterval ();
209 uint8_t GetMaxTtl ();
210 uint32_t GetNextPreqId ();
211 uint32_t GetNextHwmpSeqno ();
212 uint32_t GetActivePathLifetime ();
213 uint8_t GetUnicastPerrThreshold ();
221 uint16_t txBroadcast;
224 uint16_t totalQueued;
225 uint16_t totalDropped;
226 uint16_t initiatedPreq;
227 uint16_t initiatedPrep;
228 uint16_t initiatedPerr;
230 void Print (std::ostream & os)
const;
235 HwmpProtocolMacMap m_interfaces;
237 uint32_t m_dataSeqno;
238 uint32_t m_hwmpSeqno;
243 std::map<Mac48Address, uint32_t> m_lastDataSeqno;
257 std::map<Mac48Address, PreqEvent> m_preqTimeouts;
266 uint16_t m_maxQueueSize;
267 uint8_t m_dot11MeshHWMPmaxPREQretries;
268 Time m_dot11MeshHWMPnetDiameterTraversalTime;
269 Time m_dot11MeshHWMPpreqMinInterval;
270 Time m_dot11MeshHWMPperrMinInterval;
271 Time m_dot11MeshHWMPactiveRootTimeout;
272 Time m_dot11MeshHWMPactivePathTimeout;
273 Time m_dot11MeshHWMPpathToRootInterval;
274 Time m_dot11MeshHWMPrannInterval;
277 uint8_t m_unicastPerrThreshold;
278 uint8_t m_unicastPreqThreshold;
279 uint8_t m_unicastDataThreshold;
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.
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
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.
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 ...
TracedCallback< Time > m_routeDiscoveryTimeCallback
Route discovery time:
void SendProactivePreq()
Proactive Preq routines:
bool DropDataFrame(uint32_t seqno, Mac48Address source)
MAC-plugin asks whether the frame can be dropped. Protocol automatically updates seqno.
Ptr< Packet > pkt
the packet
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.
std::vector< QueuedPacket > m_rqueue
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.
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.
Ptr< HwmpRtable > m_rtable
Routing table.
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
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)
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
an identifier for simulation events.
std::vector< Mac48Address > GetBroadcastReceivers(uint32_t interface)
std::vector< FailedDestination > destinations
destination list: Mac48Address and sequence number
uint32_t inInterface
incoming device interface ID. (if packet has come from upper layers, this is Mesh point ID) ...
bool ShouldSendPreq(Mac48Address dst)
checks when the last path discovery procedure was started for a given destination.
a unique identifier for an interface.
int64_t AssignStreams(int64_t stream)
void SetNeighboursCallback(Callback< std::vector< Mac48Address >, uint32_t > cb)
This callback is used to obtain active neighbours on a given interface.
virtual void DoInitialize()