From 80909769fa2d39d9861d2e7ca87e23ef29d714e3 Mon Sep 17 00:00:00 2001 From: Pavel Boyko Date: Fri, 3 Jul 2009 10:10:25 +0400 Subject: [PATCH] MeshPointDevice::SetAddress () --- src/devices/mesh/mesh-point-device.cc | 7 +++++++ src/devices/mesh/mesh-point-device.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/devices/mesh/mesh-point-device.cc b/src/devices/mesh/mesh-point-device.cc index fdd5e7b7b..97ce491ac 100644 --- a/src/devices/mesh/mesh-point-device.cc +++ b/src/devices/mesh/mesh-point-device.cc @@ -167,6 +167,13 @@ MeshPointDevice::GetAddress () const return m_address; } +void +MeshPointDevice::SetAddress (Address a) +{ + NS_LOG_WARN ("Manual changing mesh point address can cause routing errors."); + m_address = Mac48Address::ConvertFrom(a); +} + bool MeshPointDevice::SetMtu (const uint16_t mtu) { diff --git a/src/devices/mesh/mesh-point-device.h b/src/devices/mesh/mesh-point-device.h index ae6292308..1f67ebfdd 100644 --- a/src/devices/mesh/mesh-point-device.h +++ b/src/devices/mesh/mesh-point-device.h @@ -96,6 +96,7 @@ public: virtual uint32_t GetIfIndex () const; virtual Ptr GetChannel () const; virtual Address GetAddress () const; + virtual void SetAddress (Address a); virtual bool SetMtu (const uint16_t mtu); virtual uint16_t GetMtu () const; virtual bool IsLinkUp () const;