9#ifndef FLAME_PROTOCOL_H
10#define FLAME_PROTOCOL_H
12#include "ns3/mesh-l2-routing-protocol.h"
13#include "ns3/nstime.h"
37class FlameProtocolMac;
73 void Print(std::ostream& os)
const override;
113 uint16_t protocolType,
129 uint16_t& protocolType)
override;
150 void Report(std::ostream& os)
const;
206 void Print(std::ostream& os)
const;
Interface for L2 mesh routing protocol and mesh point communication.
Smart pointer class similar to boost::intrusive_ptr.
tag a set of bytes in a packet
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
FlameProtocol & operator=(const FlameProtocol &)=delete
bool RemoveRoutingStuff(uint32_t fromIface, const Mac48Address source, const Mac48Address destination, Ptr< Packet > packet, uint16_t &protocolType) override
Cleanup flame headers!
Time m_broadcastInterval
Max Cost value (or TTL, because cost is actually hopcount)
void DoDispose() override
Destructor implementation.
static TypeId GetTypeId()
Get the type ID.
static const uint16_t FLAME_PROTOCOL
LLC protocol number reserved by flame.
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.
uint16_t m_myLastSeqno
Sequence number:
std::map< uint32_t, Ptr< FlameProtocolMac > > FlamePluginMap
interfaces
~FlameProtocol() override
Ptr< FlameRtable > m_rtable
Routing table:
bool HandleDataFrame(uint16_t seqno, Mac48Address source, const FlameHeader flameHdr, Mac48Address receiver, uint32_t fromIface)
Handles a packet: adds a routing information and drops packets by TTL or Seqno.
Mac48Address GetAddress()
Get address of this instance.
FlameProtocol(const FlameProtocol &)=delete
uint8_t m_maxCost
Max Cost value (or TTL, because cost is actually hopcount)
bool Install(Ptr< MeshPointDevice > mp)
Install FLAME on given mesh point.
Time m_lastBroadcast
Max Cost value (or TTL, because cost is actually hopcount)
Statistics m_stats
statistics
Mac48Address m_address
address
void ResetStats()
Reset statistics function.
void Report(std::ostream &os) const
Statistics.
FlamePluginMap m_interfaces
interfaces
Transmitter and receiver addresses.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void Serialize(TagBuffer i) const override
void Print(std::ostream &os) const override
uint32_t GetSerializedSize() const override
static TypeId GetTypeId()
Get the type ID.
Mac48Address receiver
Receiver of the packet:
FlameTag(Mac48Address a=Mac48Address())
Constructor.
Mac48Address transmitter
transmitter for incoming:
void Deserialize(TagBuffer i) override
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint16_t txBroadcast
transmit broadcast
uint32_t txBytes
transmit bytes
uint16_t totalDropped
total dropped
uint16_t droppedTtl
dropped TTL
uint16_t txUnicast
transmit unicast
void Print(std::ostream &os) const
Print function.