Last active
December 22, 2015 14:09
-
-
Save piotrjurkiewicz/6483746 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- ./src/wifi/model/sta-wifi-mac.cc | |
| +++ ./src/wifi/model/sta-wifi-mac.cc | |
| @@ -109,6 +109,16 @@ | |
| StaWifiMac::~StaWifiMac () | |
| { | |
| NS_LOG_FUNCTION (this); | |
| +} | |
| + | |
| +void | |
| +StaWifiMac::SetAddress (Mac48Address address) | |
| +{ | |
| + NS_LOG_FUNCTION (this << address); | |
| + RegularWifiMac::SetAddress (address); | |
| + // We need to deassociate station after address change | |
| + // Station will associate again with the new address | |
| + SetState (BEACON_MISSED); | |
| } | |
| void | |
| --- ./src/wifi/model/sta-wifi-mac.h | |
| +++ ./src/wifi/model/sta-wifi-mac.h | |
| @@ -57,6 +57,11 @@ | |
| * access is granted to this MAC. | |
| */ | |
| virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to); | |
| + | |
| + /** | |
| + * \param address the current address of this MAC layer. | |
| + */ | |
| + virtual void SetAddress (Mac48Address address); | |
| /** | |
| * \param missed the number of beacons which must be missed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment