diff --git a/src/routing/aodv/aodv-packet.cc b/src/routing/aodv/aodv-packet.cc index 66c67aa09..30b0298af 100644 --- a/src/routing/aodv/aodv-packet.cc +++ b/src/routing/aodv/aodv-packet.cc @@ -39,10 +39,19 @@ TypeHeader::TypeHeader (MessageType t) : { } +TypeId +TypeHeader::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::aodv::TypeHeader") + .SetParent
() + ; + return tid; +} + TypeId TypeHeader::GetInstanceTypeId () const { - return TypeId (); + return GetTypeId (); } uint32_t @@ -134,10 +143,20 @@ RreqHeader::RreqHeader (uint8_t flags, uint8_t reserved, uint8_t hopCount, uint3 { } +TypeId +RreqHeader::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::aodv::RreqHeader") + .SetParent
() + .AddConstructor () + ; + return tid; +} + TypeId RreqHeader::GetInstanceTypeId () const { - return TypeId (); + return GetTypeId (); } uint32_t @@ -261,10 +280,20 @@ RrepHeader::RrepHeader (uint8_t prefixSize, uint8_t hopCount, Ipv4Address dst, m_lifeTime = uint32_t (lifeTime.GetMilliSeconds ()); } +TypeId +RrepHeader::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::aodv::RrepHeader") + .SetParent
() + .AddConstructor () + ; + return tid; +} + TypeId RrepHeader::GetInstanceTypeId () const { - return TypeId (); + return GetTypeId (); } uint32_t @@ -392,10 +421,20 @@ RrepAckHeader::RrepAckHeader () : { } +TypeId +RrepAckHeader::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::aodv::RrepAckHeader") + .SetParent
() + .AddConstructor () + ; + return tid; +} + TypeId RrepAckHeader::GetInstanceTypeId () const { - return TypeId (); + return GetTypeId (); } uint32_t @@ -446,10 +485,20 @@ RerrHeader::RerrHeader () : { } +TypeId +RerrHeader::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::aodv::RerrHeader") + .SetParent
() + .AddConstructor () + ; + return tid; +} + TypeId RerrHeader::GetInstanceTypeId () const { - return TypeId (); + return GetTypeId (); } uint32_t diff --git a/src/routing/aodv/aodv-packet.h b/src/routing/aodv/aodv-packet.h index 374272b06..4024ab318 100644 --- a/src/routing/aodv/aodv-packet.h +++ b/src/routing/aodv/aodv-packet.h @@ -58,6 +58,7 @@ public: ///\name Header serialization/deserialization //\{ + static TypeId GetTypeId (); TypeId GetInstanceTypeId () const; uint32_t GetSerializedSize () const; void Serialize (Buffer::Iterator start) const; @@ -109,6 +110,7 @@ public: ///\name Header serialization/deserialization //\{ + static TypeId GetTypeId (); TypeId GetInstanceTypeId () const; uint32_t GetSerializedSize () const; void Serialize (Buffer::Iterator start) const; @@ -184,6 +186,7 @@ public: Ipv4Address (), Time lifetime = MilliSeconds (0)); ///\name Header serialization/deserialization //\{ + static TypeId GetTypeId (); TypeId GetInstanceTypeId () const; uint32_t GetSerializedSize () const; void Serialize (Buffer::Iterator start) const; @@ -248,6 +251,7 @@ public: ///\name Header serialization/deserialization //\{ + static TypeId GetTypeId (); TypeId GetInstanceTypeId () const; uint32_t GetSerializedSize () const; void Serialize (Buffer::Iterator start) const; @@ -289,6 +293,7 @@ public: ///\name Header serialization/deserialization //\{ + static TypeId GetTypeId (); TypeId GetInstanceTypeId () const; uint32_t GetSerializedSize () const; void Serialize (Buffer::Iterator i) const;