bug 361: make GetBssid public.
--- a/src/devices/wifi/adhoc-wifi-mac.cc Tue Oct 07 12:39:27 2008 +0100
+++ b/src/devices/wifi/adhoc-wifi-mac.cc Fri Oct 10 09:24:35 2008 +0200
@@ -180,14 +180,15 @@
Mac48Address
AdhocWifiMac::GetBssid (void) const
{
- // XXX the bssid should be generated by the procedure
- // described in ieee802.11 section 11.1.3
- return Mac48Address::GetBroadcast ();
+ return m_low->GetBssid ();
}
void
AdhocWifiMac::SetAddress (Mac48Address address)
{
m_low->SetAddress (address);
+ m_low->SetBssid (address);
+ // XXX the bssid should be generated by the procedure
+ // described in ieee802.11 section 11.1.3
}
void
AdhocWifiMac::SetSsid (Ssid ssid)
--- a/src/devices/wifi/adhoc-wifi-mac.h Tue Oct 07 12:39:27 2008 +0100
+++ b/src/devices/wifi/adhoc-wifi-mac.h Fri Oct 10 09:24:35 2008 +0200
@@ -77,7 +77,7 @@
virtual Ssid GetSsid (void) const;
virtual void SetAddress (Mac48Address address);
virtual void SetSsid (Ssid ssid);
-
+ virtual Mac48Address GetBssid (void) const;
private:
// inherited from Object base class.
@@ -86,7 +86,6 @@
void ForwardUp (Ptr<Packet> packet, WifiMacHeader const*hdr);
AdhocWifiMac (const AdhocWifiMac & ctor_arg);
AdhocWifiMac &operator = (const AdhocWifiMac &o);
- Mac48Address GetBssid (void) const;
Ptr<DcaTxop> m_dca;
Callback<void,Ptr<Packet>, Mac48Address, Mac48Address> m_upCallback;
--- a/src/devices/wifi/nqap-wifi-mac.cc Tue Oct 07 12:39:27 2008 +0100
+++ b/src/devices/wifi/nqap-wifi-mac.cc Fri Oct 10 09:24:35 2008 +0200
@@ -251,6 +251,11 @@
NS_LOG_FUNCTION (ssid);
m_ssid = ssid;
}
+Mac48Address
+NqapWifiMac::GetBssid (void) const
+{
+ return m_low->GetBssid ();
+}
void
--- a/src/devices/wifi/nqap-wifi-mac.h Tue Oct 07 12:39:27 2008 +0100
+++ b/src/devices/wifi/nqap-wifi-mac.h Fri Oct 10 09:24:35 2008 +0200
@@ -83,7 +83,7 @@
virtual Ssid GetSsid (void) const;
virtual void SetAddress (Mac48Address address);
virtual void SetSsid (Ssid ssid);
-
+ virtual Mac48Address GetBssid (void) const;
/**
* \param interval the interval between two beacon transmissions.
--- a/src/devices/wifi/nqsta-wifi-mac.cc Tue Oct 07 12:39:27 2008 +0100
+++ b/src/devices/wifi/nqsta-wifi-mac.cc Fri Oct 10 09:24:35 2008 +0200
@@ -248,7 +248,6 @@
NS_LOG_FUNCTION (this << ssid);
m_ssid = ssid;
}
-
void
NqstaWifiMac::SetMaxMissedBeacons (uint32_t missed)
{
--- a/src/devices/wifi/nqsta-wifi-mac.h Tue Oct 07 12:39:27 2008 +0100
+++ b/src/devices/wifi/nqsta-wifi-mac.h Fri Oct 10 09:24:35 2008 +0200
@@ -83,7 +83,7 @@
virtual Ssid GetSsid (void) const;
virtual void SetAddress (Mac48Address address);
virtual void SetSsid (Ssid ssid);
-
+ virtual Mac48Address GetBssid (void) const;
/**
* \param missed the number of beacons which must be missed
@@ -126,7 +126,6 @@
void MissedBeacons (void);
void RestartBeaconWatchdog (Time delay);
SupportedRates GetSupportedRates (void) const;
- Mac48Address GetBssid (void) const;
virtual void DoDispose (void);
NqstaWifiMac (const NqstaWifiMac & ctor_arg);
NqstaWifiMac &operator = (const NqstaWifiMac & ctor_arg);
--- a/src/devices/wifi/wifi-mac.h Tue Oct 07 12:39:27 2008 +0100
+++ b/src/devices/wifi/wifi-mac.h Fri Oct 10 09:24:35 2008 +0200
@@ -129,6 +129,10 @@
* \param ssid the current ssid of this MAC layer.
*/
virtual void SetSsid (Ssid ssid) = 0;
+ /**
+ * \returns the bssid of the network this device belongs to.
+ */
+ virtual Mac48Address GetBssid (void) const = 0;
private:
friend class WifiNetDevice;