diff --git a/samples/main-adhoc-wifi.cc b/samples/main-adhoc-wifi.cc index 09f8ff52e..b48ccf429 100644 --- a/samples/main-adhoc-wifi.cc +++ b/samples/main-adhoc-wifi.cc @@ -47,7 +47,7 @@ CreateAdhocNode (Ptr channel, { Ptr node = Create (); Ptr device = Create (node, Mac48Address (address)); - device->ConnectTo (channel); + device->Attach (channel); Ptr mobility = Create (); mobility->SetPosition (position); node->AddInterface (mobility); diff --git a/samples/main-ap-wifi.cc b/samples/main-ap-wifi.cc index 022e116e1..a667013ac 100644 --- a/samples/main-ap-wifi.cc +++ b/samples/main-ap-wifi.cc @@ -75,7 +75,7 @@ CreateApNode (Ptr channel, Ptr device = Create (node, Mac48Address (macAddress)); device->SetSsid (ssid); Simulator::Schedule (at, &NqapWifiNetDevice::StartBeaconing, device); - device->ConnectTo (channel); + device->Attach (channel); Ptr mobility = Create (); mobility->SetPosition (position); node->AddInterface (mobility); @@ -92,7 +92,7 @@ CreateStaNode (Ptr channel, Ptr device = Create (node, Mac48Address (macAddress)); Simulator::ScheduleNow (&NqstaWifiNetDevice::StartActiveAssociation, device, ssid); - device->ConnectTo (channel); + device->Attach (channel); Ptr mobility = Create (); mobility->SetPosition (position); node->AddInterface (mobility); diff --git a/src/devices/wifi/wifi-net-device.cc b/src/devices/wifi/wifi-net-device.cc index 9440a5da2..ce8df3abf 100644 --- a/src/devices/wifi/wifi-net-device.cc +++ b/src/devices/wifi/wifi-net-device.cc @@ -292,11 +292,11 @@ WifiNetDevice::GetTraceResolver (void) const } void -WifiNetDevice::ConnectTo (Ptr channel) +WifiNetDevice::Attach (Ptr channel) { m_channel = channel; m_phy->SetChannel (channel); - NotifyConnected (); + NotifyAttached (); } bool WifiNetDevice::SendTo (Ptr packet, const Address &to, uint16_t protocolNumber) @@ -419,7 +419,7 @@ AdhocWifiNetDevice::DoSendTo (Ptr packet, Mac48Address const &to) return true; } void -AdhocWifiNetDevice::NotifyConnected (void) +AdhocWifiNetDevice::NotifyAttached (void) { NotifyLinkUp (); } @@ -496,7 +496,7 @@ NqstaWifiNetDevice::DoSendTo (Ptr packet, Mac48Address const &to) return true; } void -NqstaWifiNetDevice::NotifyConnected (void) +NqstaWifiNetDevice::NotifyAttached (void) { // do nothing because link status is kept track of in // ::Associated and ::Disassociated @@ -603,7 +603,7 @@ NqapWifiNetDevice::DoSendTo (Ptr packet, Mac48Address const & to) return true; } void -NqapWifiNetDevice::NotifyConnected (void) +NqapWifiNetDevice::NotifyAttached (void) { NotifyLinkUp (); } diff --git a/src/devices/wifi/wifi-net-device.h b/src/devices/wifi/wifi-net-device.h index e682bfdd8..c21981596 100644 --- a/src/devices/wifi/wifi-net-device.h +++ b/src/devices/wifi/wifi-net-device.h @@ -80,7 +80,7 @@ public: * \param channel the channel to connect this 802.11 * interface to. */ - void ConnectTo (Ptr channel); + void Attach (Ptr channel); /** * \returns the Mac48Address of this 802.11 interface. @@ -108,7 +108,7 @@ private: virtual bool SendTo (Ptr packet, const Address &to, uint16_t protocolNumber); virtual Ptr GetTraceResolver (void) const; // defined for children - virtual void NotifyConnected (void) = 0; + virtual void NotifyAttached (void) = 0; virtual bool DoSendTo (Ptr packet, const Mac48Address &to) = 0; // private helper void Construct (void); @@ -156,7 +156,7 @@ private: void DoConstruct (void); void ForwardUp (void); virtual bool DoSendTo (Ptr packet, Mac48Address const & to); - virtual void NotifyConnected (void); + virtual void NotifyAttached (void); Ssid m_ssid; DcaTxop *m_dca; @@ -200,7 +200,7 @@ private: void Associated (void); void DisAssociated (void); virtual bool DoSendTo (Ptr packet, Mac48Address const & to); - virtual void NotifyConnected (void); + virtual void NotifyAttached (void); Ssid m_ssid; DcaTxop *m_dca; MacHighNqsta *m_high; @@ -233,7 +233,7 @@ protected: private: void DoConstruct (void); virtual bool DoSendTo (Ptr packet, Mac48Address const & to); - virtual void NotifyConnected (void); + virtual void NotifyAttached (void); Ssid m_ssid; DcaTxop *m_dca; DcaTxop *m_beaconDca;