22 #ifndef MESH_L2_ROUTING_PROTOCOL_H 
   23 #define MESH_L2_ROUTING_PROTOCOL_H 
   25 #include "ns3/object.h" 
   26 #include "ns3/mac48-address.h" 
   27 #include "ns3/packet.h" 
   32 class MeshPointDevice;
 
   97   virtual bool RequestRoute (uint32_t sourceIface, 
const Mac48Address source, 
const Mac48Address destination, 
Ptr<
 
  113   virtual bool RemoveRoutingStuff (uint32_t fromIface, 
const Mac48Address source, 
const Mac48Address destination, 
Ptr<
 
  114                                      Packet> packet, uint16_t & protocolType) = 0;
 
void SetMeshPoint(Ptr< MeshPointDevice > mp)
Set host mesh point, analog of SetNode (...) methods for upper layer protocols. 
 
Callback< void, bool, Ptr< Packet >, Mac48Address, Mac48Address, uint16_t, uint32_t > RouteReplyCallback
Callback to be invoked when route discovery procedure is completed. 
 
Ptr< MeshPointDevice > GetMeshPoint() const 
Each mesh protocol must be installed on the mesh point to work. 
 
Ptr< MeshPointDevice > m_mp
Host mesh point. 
 
static TypeId GetTypeId()
Never forget to support NS3 object model. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
virtual bool RemoveRoutingStuff(uint32_t fromIface, const Mac48Address source, const Mac48Address destination, Ptr< Packet > packet, uint16_t &protocolType)=0
When packet is ready to go to upper layer, protocol must remove all its information: tags...
 
virtual ~MeshL2RoutingProtocol()
virtual D-tor for subclasses 
 
virtual bool RequestRoute(uint32_t sourceIface, const Mac48Address source, const Mac48Address destination, Ptr< const Packet > packet, uint16_t protocolType, RouteReplyCallback routeReply)=0
Request routing information, all packets must go through this request. 
 
Interface for L2 mesh routing protocol and mesh point communication. 
 
A base class which provides memory management and object aggregation. 
 
a unique identifier for an interface.