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;
72 void Print (std::ostream &os)
const;
105 void Report (std::ostream &)
const;
149 void Print (std::ostream & os)
const;
keep track of time values and allow control of global simulation resolution
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:
static TypeId GetTypeId()
void Serialize(TagBuffer i) const
FlamePluginMap m_interfaces
Mac48Address GetAddress()
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)
FlameProtocol & operator=(const FlameProtocol &)
Interface for L2 mesh routing protocol and mesh point communication.
void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
void Report(std::ostream &) const
Statistics.
TypeId GetInstanceTypeId() const
Mac48Address receiver
Receiver of the packet:
static TypeId GetTypeId()
uint16_t m_myLastSeqno
Sequence number:
std::map< uint32_t, Ptr< FlameProtocolMac > > FlamePluginMap
static const uint16_t FLAME_PROTOCOL
LLC protocol number reserved by flame.
FlameTag(Mac48Address a=Mac48Address())
a unique identifier for an interface.
Transmitter and receiver addresses.
Mac48Address transmitter
transmitter for incoming: