21 #ifndef FLAME_PROTOCOL_H
22 #define FLAME_PROTOCOL_H
25 #include "ns3/mesh-l2-routing-protocol.h"
26 #include "ns3/nstime.h"
47 class FlameProtocolMac;
80 void Print (std::ostream &os)
const;
145 void Report (std::ostream & os)
const;
205 void Print (std::ostream & os)
const;
Interface for L2 mesh routing protocol and mesh point communication.
tag a set of bytes in a packet
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
Time m_broadcastInterval
Max Cost value (or TTL, because cost is actually hopcount)
void DoDispose()
Destructor implementation.
static TypeId GetTypeId()
Get the type ID.
static const uint16_t FLAME_PROTOCOL
LLC protocol number reserved by flame.
uint16_t m_myLastSeqno
Sequence number:
std::map< uint32_t, Ptr< FlameProtocolMac > > FlamePluginMap
interfaces
Ptr< FlameRtable > m_rtable
Routing table:
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.
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 &)
type conversion operator
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
FlameProtocol & operator=(const FlameProtocol &flame)
assignment operator
Mac48Address m_address
address
void ResetStats()
Reset statistics function.
void Report(std::ostream &os) const
Statistics.
bool RemoveRoutingStuff(uint32_t fromIface, const Mac48Address source, const Mac48Address destination, Ptr< Packet > packet, uint16_t &protocolType)
Cleanup flame headers!
FlamePluginMap m_interfaces
interfaces
Transmitter and receiver addresses.
void Serialize(TagBuffer i) const
void Deserialize(TagBuffer i)
static TypeId GetTypeId()
Get the type ID.
Mac48Address receiver
Receiver of the packet:
FlameTag(Mac48Address a=Mac48Address())
Constructor.
TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
Mac48Address transmitter
transmitter for incoming:
void Print(std::ostream &os) const
uint32_t GetSerializedSize() const
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.