sixlowpan: Handle new and deprecated namespace TypeId names fix
This commit is contained in:
@@ -42,6 +42,7 @@ Changes from ns-3.42 to ns-3-dev
|
||||
* (core) Add `AddDeprecatedName` to TypeId. This allows for TypeIds to transition to name TypeIds that use namespaces while still supporting the old name.
|
||||
* (energy) Energy module TypeId now uses the name that includes the namespace `ns3::energy`, the old name is now deprecated.
|
||||
* (energy) Documentation was extended and reformatted.
|
||||
* (lr-wpan) Lr-wpan module TypeId now uses the name that includes the namespace `ns3::lrwpan`, the old name is now deprecated.
|
||||
|
||||
### Changes to build system
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ been tested on Linux. As of this release, the latest known version to work with
|
||||
- (lr-wpan) !2123 - CCA vulnerability window test and doc
|
||||
- (core) !2018 - `AddDeprecatedName` is now supported in TypeId.
|
||||
- (energy) !2018 - Energy module now uses the `ns3::energy` namespace in its TypeId.
|
||||
- (lr-wpan) !2163 - Lr-wpan module now uses the `ns3::lrwpan` namespace in its TypeId.
|
||||
|
||||
### Bugs fixed
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ SixLowPanNetDevice::SetNetDevice(Ptr<NetDevice> device)
|
||||
NS_LOG_DEBUG("RegisterProtocolHandler for " << device->GetInstanceTypeId().GetName());
|
||||
|
||||
uint16_t protocolType = PROT_NUMBER;
|
||||
if (device->GetInstanceTypeId().GetName() == "ns3::LrWpanNetDevice")
|
||||
if (device->GetInstanceTypeId().GetName().find("LrWpanNetDevice") != std::string::npos)
|
||||
{
|
||||
// LrWpanNetDevice does not have a protocol number in the frame.
|
||||
// Hence, we must register for any protocol, and assume that any
|
||||
|
||||
Reference in New Issue
Block a user