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;
144 void Report (std::ostream & os)
const;
204 void Print (std::ostream & os)
const;
Simulation virtual time values and global simulation resolution.
bool RemoveRoutingStuff(uint32_t fromIface, const Mac48Address source, const Mac48Address destination, Ptr< Packet > packet, uint16_t &protocolType)
Cleanup flame headers!
Statistics m_stats
statistics
uint16_t txBroadcast
transmit broadcast
void ResetStats()
Reset statistics function.
FlameProtocol & operator=(const FlameProtocol &flame)
assignment operator
void Print(std::ostream &os) const
Print function.
uint8_t m_maxCost
Max Cost value (or TTL, because cost is actually hopcount)
void Report(std::ostream &os) const
Statistics.
void Print(std::ostream &os) const
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()
Get the type ID.
uint16_t droppedTtl
dropped TTL
uint32_t GetSerializedSize() const
FlamePluginMap m_interfaces
interfaces
uint32_t txBytes
transmit bytes
uint16_t totalDropped
total dropped
Mac48Address GetAddress()
Get address of this instance.
tag a set of bytes in a packet
Mac48Address m_address
address
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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)
void Serialize(TagBuffer i) const
Interface for L2 mesh routing protocol and mesh point communication.
void DoDispose()
Destructor implementation.
Mac48Address receiver
Receiver of the packet:
static TypeId GetTypeId()
Get the type ID.
uint16_t m_myLastSeqno
Sequence number:
uint16_t txUnicast
transmit unicast
std::map< uint32_t, Ptr< FlameProtocolMac > > FlamePluginMap
interfaces
static const uint16_t FLAME_PROTOCOL
LLC protocol number reserved by flame.
FlameTag(Mac48Address a=Mac48Address())
Constructor.
a unique identifier for an interface.
Transmitter and receiver addresses.
TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
Mac48Address transmitter
transmitter for incoming: