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;
67 static TypeId GetTypeId ();
72 void Print (std::ostream &os)
const;
83 static TypeId GetTypeId ();
105 void Report (std::ostream &)
const;
123 typedef std::map<uint32_t, Ptr<FlameProtocolMac> > FlamePluginMap;
124 FlamePluginMap m_interfaces;
131 Time m_broadcastInterval;
132 Time m_lastBroadcast;
145 uint16_t txBroadcast;
148 uint16_t totalDropped;
149 void Print (std::ostream & os)
const;
uint32_t GetSerializedSize() const
bool RemoveRoutingStuff(uint32_t fromIface, const Mac48Address source, const Mac48Address destination, Ptr< Packet > packet, uint16_t &protocolType)
Cleanup flame headers!
void Print(std::ostream &os) const
uint8_t m_maxCost
Max Cost value (or TTL, because cost is actually hopcount)
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.
Ptr< FlameRtable > m_rtable
Routing table:
void Serialize(TagBuffer i) const
tag a set of bytes in a packet
bool Install(Ptr< MeshPointDevice >)
Install FLAME on given mesh point.
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.
void Deserialize(TagBuffer i)
Interface for L2 mesh routing protocol and mesh point communication.
void Report(std::ostream &) const
Statistics.
TypeId GetInstanceTypeId() const
Mac48Address receiver
Receiver of the packet:
uint16_t m_myLastSeqno
Sequence number:
static const uint16_t FLAME_PROTOCOL
LLC protocol number reserved by flame.
a unique identifier for an interface.
Transmitter and receiver addresses.
Mac48Address transmitter
transmitter for incoming: