Wi-Fi AP state machineHandle association, dis-association and authentication, of STAs within an infrastructure BSS. More...
#include <ap-wifi-mac.h>
Inheritance diagram for ns3::ApWifiMac:
Collaboration diagram for ns3::ApWifiMac:Public Member Functions | |
| ApWifiMac () | |
| virtual | ~ApWifiMac () |
| virtual void | Enqueue (Ptr< const Packet > packet, Mac48Address to) |
| virtual void | Enqueue (Ptr< const Packet > packet, Mac48Address to, Mac48Address from) |
| Time | GetBeaconInterval (void) const |
| virtual void | SetAddress (Mac48Address address) |
| void | SetBeaconInterval (Time interval) |
| virtual void | SetLinkUpCallback (Callback< void > linkUp) |
| virtual void | SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > stationManager) |
| void | StartBeaconing (void) |
| virtual bool | SupportsSendFrom (void) const |
Public Member Functions inherited from ns3::RegularWifiMac | |
| RegularWifiMac () | |
| virtual | ~RegularWifiMac () |
| Time | GetAckTimeout (void) const |
| virtual Mac48Address | GetAddress (void) const |
| virtual Time | GetBasicBlockAckTimeout (void) const |
| virtual Mac48Address | GetBssid (void) const |
| virtual Time | GetCompressedBlockAckTimeout (void) const |
| Time | GetCtsTimeout (void) const |
| bool | GetCtsToSelfSupported () const |
| Time | GetEifsNoDifs (void) const |
| Time | GetPifs (void) const |
| Time | GetRifs (void) const |
| Time | GetSifs (void) const |
| Time | GetSlot (void) const |
| virtual Ssid | GetSsid (void) const |
| virtual Ptr< WifiPhy > | GetWifiPhy () const |
| virtual Ptr < WifiRemoteStationManager > | GetWifiRemoteStationManager () const |
| void | SetAckTimeout (Time ackTimeout) |
| virtual void | SetBasicBlockAckTimeout (Time blockAckTimeout) |
| virtual void | SetBssid (Mac48Address bssid) |
| virtual void | SetCompressedBlockAckTimeout (Time blockAckTimeout) |
| void | SetCtsTimeout (Time ctsTimeout) |
| void | SetCtsToSelfSupported (bool enable) |
| void | SetEifsNoDifs (Time eifsNoDifs) |
| virtual void | SetForwardUpCallback (ForwardUpCallback upCallback) |
| virtual void | SetLinkDownCallback (Callback< void > linkDown) |
| void | SetPifs (Time pifs) |
| virtual void | SetPromisc (void) |
| Sets the interface in promiscuous mode. | |
| void | SetRifs (Time rifs) |
| void | SetSifs (Time sifs) |
| void | SetSlot (Time slotTime) |
| virtual void | SetSsid (Ssid ssid) |
| virtual void | SetWifiPhy (Ptr< WifiPhy > phy) |
Public Member Functions inherited from ns3::WifiMac | |
| void | ConfigureStandard (enum WifiPhyStandard standard) |
| Time | GetMaxPropagationDelay (void) const |
| Time | GetMsduLifetime (void) const |
| void | NotifyPromiscRx (Ptr< const Packet > packet) |
| void | NotifyRx (Ptr< const Packet > packet) |
| void | NotifyRxDrop (Ptr< const Packet > packet) |
| void | NotifyTx (Ptr< const Packet > packet) |
| void | NotifyTxDrop (Ptr< const Packet > packet) |
| virtual void | SetForwardUpCallback (Callback< void, Ptr< Packet >, Mac48Address, Mac48Address > upCallback)=0 |
| void | SetMaxPropagationDelay (Time delay) |
Public Member Functions inherited from ns3::Object | |
| Object () | |
| virtual | ~Object () |
| void | AggregateObject (Ptr< Object > other) |
| void | Dispose (void) |
| AggregateIterator | GetAggregateIterator (void) const |
| virtual TypeId | GetInstanceTypeId (void) const |
| template<typename T > | |
| Ptr< T > | GetObject (void) const |
| template<typename T > | |
| Ptr< T > | GetObject (TypeId tid) const |
| void | Initialize (void) |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| SimpleRefCount () | |
| SimpleRefCount (const SimpleRefCount &o) | |
| uint32_t | GetReferenceCount (void) const |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| void | Ref (void) const |
| void | Unref (void) const |
Public Member Functions inherited from ns3::ObjectBase | |
| virtual | ~ObjectBase () |
| void | GetAttribute (std::string name, AttributeValue &value) const |
| bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
| void | SetAttribute (std::string name, const AttributeValue &value) |
| bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
| bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
| bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
| bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
| bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
Private Member Functions | |
| virtual void | DeaggregateAmsduAndForward (Ptr< Packet > aggregatedPacket, const WifiMacHeader *hdr) |
| virtual void | DoDispose (void) |
| virtual void | DoInitialize (void) |
| void | ForwardDown (Ptr< const Packet > packet, Mac48Address from, Mac48Address to) |
| void | ForwardDown (Ptr< const Packet > packet, Mac48Address from, Mac48Address to, uint8_t tid) |
| bool | GetBeaconGeneration (void) const |
| HtCapabilities | GetHtCapabilities (void) const |
| SupportedRates | GetSupportedRates (void) const |
| virtual void | Receive (Ptr< Packet > packet, const WifiMacHeader *hdr) |
| void | SendAssocResp (Mac48Address to, bool success) |
| void | SendOneBeacon (void) |
| void | SendProbeResp (Mac48Address to) |
| void | SetBeaconGeneration (bool enable) |
| virtual void | TxFailed (const WifiMacHeader &hdr) |
| virtual void | TxOk (const WifiMacHeader &hdr) |
Private Attributes | |
| Ptr< DcaTxop > | m_beaconDca |
| EventId | m_beaconEvent |
| Time | m_beaconInterval |
| bool | m_enableBeaconGeneration |
Wi-Fi AP state machine
Handle association, dis-association and authentication, of STAs within an infrastructure BSS.
ns3::ApWifiMac is accessible through the following paths with Config::Set and Config::Connect:
No TraceSources are defined for this type.
Definition at line 39 of file ap-wifi-mac.h.
| ns3::ApWifiMac::ApWifiMac | ( | ) |
Definition at line 67 of file ap-wifi-mac.cc.
References ns3::AP, m_beaconDca, ns3::RegularWifiMac::m_dcfManager, m_enableBeaconGeneration, ns3::RegularWifiMac::m_low, NS_LOG_FUNCTION, ns3::DcaTxop::SetAifsn(), ns3::DcaTxop::SetLow(), ns3::DcaTxop::SetManager(), ns3::DcaTxop::SetMaxCw(), ns3::DcaTxop::SetMinCw(), and ns3::RegularWifiMac::SetTypeOfStation().
Here is the call graph for this function:
|
virtual |
Definition at line 83 of file ap-wifi-mac.cc.
References NS_LOG_FUNCTION.
|
privatevirtual |
This method is called to de-aggregate an A-MSDU and forward the constituent packets up the stack. We override the WifiMac version here because, as an AP, we also need to think about redistributing to other associated STAs.
| aggregatedPacket | the Packet containing the A-MSDU. |
| hdr | a pointer to the MAC header for aggregatedPacket. |
Definition at line 618 of file ap-wifi-mac.cc.
References ns3::MsduAggregator::Deaggregate(), ForwardDown(), ns3::RegularWifiMac::ForwardUp(), ns3::RegularWifiMac::GetAddress(), ns3::WifiMacHeader::GetQosTid(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by Receive().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
Definition at line 89 of file ap-wifi-mac.cc.
References ns3::EventId::Cancel(), m_beaconDca, m_beaconEvent, m_enableBeaconGeneration, and NS_LOG_FUNCTION.
Here is the call graph for this function:
|
privatevirtual |
Definition at line 644 of file ap-wifi-mac.cc.
References ns3::EventId::Cancel(), ns3::Object::Initialize(), m_beaconDca, m_beaconEvent, m_enableBeaconGeneration, NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), and SendOneBeacon().
Here is the call graph for this function:
|
virtual |
| packet | the packet to send. |
| to | the address to which the packet should be sent. |
The packet should be enqueued in a tx queue, and should be dequeued as soon as the channel access function determines that access is granted to this MAC.
Implements ns3::RegularWifiMac.
Definition at line 261 of file ap-wifi-mac.cc.
References ns3::MacLow::GetAddress(), ns3::RegularWifiMac::m_low, and NS_LOG_FUNCTION.
Here is the call graph for this function:
|
virtual |
| packet | the packet to send. |
| to | the address to which the packet should be sent. |
| from | the address from which the packet should be sent. |
The packet should be enqueued in a tx queue, and should be dequeued as soon as the channel access function determines that access is granted to this MAC. The extra parameter "from" allows this device to operate in a bridged mode, forwarding received frames without altering the source address.
Reimplemented from ns3::RegularWifiMac.
Definition at line 251 of file ap-wifi-mac.cc.
References ForwardDown(), ns3::WifiRemoteStationManager::IsAssociated(), ns3::Mac48Address::IsBroadcast(), ns3::RegularWifiMac::m_stationManager, and NS_LOG_FUNCTION.
Here is the call graph for this function:
|
private |
Definition at line 176 of file ap-wifi-mac.cc.
References ns3::RegularWifiMac::m_qosSupported, NS_LOG_FUNCTION, and ns3::QosUtilsGetTidForPacket().
Referenced by DeaggregateAmsduAndForward(), Enqueue(), and Receive().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 202 of file ap-wifi-mac.cc.
References ns3::RegularWifiMac::GetAddress(), ns3::RegularWifiMac::m_dca, ns3::RegularWifiMac::m_edca, ns3::RegularWifiMac::m_htSupported, ns3::RegularWifiMac::m_qosSupported, ns3::WifiMacHeader::NORMAL_ACK, NS_ASSERT, NS_LOG_FUNCTION, ns3::QosUtilsMapTidToAc(), ns3::DcaTxop::Queue(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::WifiMacHeader::SetDsFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetNoOrder(), ns3::WifiMacHeader::SetQosAckPolicy(), ns3::WifiMacHeader::SetQosNoAmsdu(), ns3::WifiMacHeader::SetQosNoEosp(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetQosTxopLimit(), ns3::WifiMacHeader::SetType(), ns3::WifiMacHeader::SetTypeData(), and ns3::WIFI_MAC_QOSDATA.
Here is the call graph for this function:
|
private |
Definition at line 124 of file ap-wifi-mac.cc.
References m_enableBeaconGeneration, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
Here is the caller graph for this function:| Time ns3::ApWifiMac::GetBeaconInterval | ( | void | ) | const |
Definition at line 131 of file ap-wifi-mac.cc.
References m_beaconInterval, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
Here is the caller graph for this function:
|
private |
Definition at line 310 of file ap-wifi-mac.cc.
References ns3::WifiPhy::GetGreenfield(), ns3::WifiPhy::GetGuardInterval(), ns3::WifiPhy::GetLdpc(), ns3::WifiPhy::GetMcs(), ns3::WifiPhy::GetNMcs(), ns3::RegularWifiMac::m_phy, ns3::HtCapabilities::SetGreenfield(), ns3::HtCapabilities::SetHtSupported(), ns3::HtCapabilities::SetLdpc(), ns3::HtCapabilities::SetRxMcsBitmask(), and ns3::HtCapabilities::SetShortGuardInterval20().
Referenced by SendAssocResp(), SendOneBeacon(), and SendProbeResp().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 278 of file ap-wifi-mac.cc.
References ns3::SupportedRates::AddSupportedRate(), ns3::WifiRemoteStationManager::GetBasicMode(), ns3::WifiPhy::GetBssMembershipSelector(), ns3::WifiMode::GetDataRate(), ns3::WifiPhy::GetMode(), ns3::WifiRemoteStationManager::GetNBasicModes(), ns3::WifiPhy::GetNBssMembershipSelectors(), ns3::WifiPhy::GetNModes(), ns3::RegularWifiMac::m_htSupported, ns3::RegularWifiMac::m_phy, ns3::RegularWifiMac::m_stationManager, NS_LOG_FUNCTION, and ns3::SupportedRates::SetBasicRate().
Referenced by SendAssocResp(), SendOneBeacon(), and SendProbeResp().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Get the type ID.
Reimplemented from ns3::RegularWifiMac.
Definition at line 48 of file ap-wifi-mac.cc.
References GetBeaconGeneration(), GetBeaconInterval(), ns3::MakeTimeChecker(), SetBeaconGeneration(), SetBeaconInterval(), and ns3::TypeId::SetParent().
Here is the call graph for this function:
|
privatevirtual |
Definition at line 449 of file ap-wifi-mac.cc.
References ns3::WifiRemoteStationManager::AddStationHtCapabilities(), ns3::WifiRemoteStationManager::AddSupportedMcs(), ns3::WifiRemoteStationManager::AddSupportedMode(), ns3::Packet::Copy(), DeaggregateAmsduAndForward(), ForwardDown(), ns3::RegularWifiMac::ForwardUp(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), ns3::WifiMacHeader::GetAddr3(), ns3::RegularWifiMac::GetAddress(), ns3::WifiRemoteStationManager::GetBasicMcs(), ns3::WifiRemoteStationManager::GetBasicMode(), ns3::WifiMode::GetDataRate(), ns3::MgtAssocRequestHeader::GetHtCapabilities(), ns3::WifiPhy::GetMcs(), ns3::WifiPhy::GetMode(), ns3::WifiRemoteStationManager::GetNBasicMcs(), ns3::WifiRemoteStationManager::GetNBasicModes(), ns3::WifiPhy::GetNMcs(), ns3::WifiPhy::GetNModes(), ns3::WifiMacHeader::GetQosTid(), ns3::Packet::GetSize(), ns3::MgtAssocRequestHeader::GetSupportedRates(), ns3::WifiRemoteStationManager::IsAssociated(), ns3::WifiMacHeader::IsAssocReq(), ns3::Mac48Address::IsBroadcast(), ns3::WifiMacHeader::IsData(), ns3::WifiMacHeader::IsDisassociation(), ns3::WifiMacHeader::IsFromDs(), ns3::Mac48Address::IsGroup(), ns3::WifiMacHeader::IsMgt(), ns3::WifiMacHeader::IsProbeReq(), ns3::WifiMacHeader::IsQosAmsdu(), ns3::WifiMacHeader::IsQosData(), ns3::HtCapabilities::IsSupportedMcs(), ns3::SupportedRates::IsSupportedRate(), ns3::WifiMacHeader::IsToDs(), ns3::RegularWifiMac::m_htSupported, ns3::RegularWifiMac::m_phy, ns3::RegularWifiMac::m_stationManager, ns3::WifiMac::NotifyRxDrop(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::WifiRemoteStationManager::RecordDisassociated(), ns3::WifiRemoteStationManager::RecordWaitAssocTxOk(), ns3::Packet::RemoveHeader(), SendAssocResp(), and SendProbeResp().
Here is the call graph for this function:
|
private |
Definition at line 354 of file ap-wifi-mac.cc.
References ns3::Packet::AddHeader(), ns3::RegularWifiMac::GetAddress(), GetHtCapabilities(), GetSupportedRates(), ns3::RegularWifiMac::m_dca, ns3::RegularWifiMac::m_htSupported, NS_LOG_FUNCTION, ns3::DcaTxop::Queue(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::WifiMacHeader::SetAssocResp(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::StatusCode::SetFailure(), ns3::WifiMacHeader::SetNoOrder(), and ns3::StatusCode::SetSuccess().
Referenced by Receive().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 393 of file ap-wifi-mac.cc.
References ns3::Packet::AddHeader(), ns3::RegularWifiMac::GetAddress(), ns3::Mac48Address::GetBroadcast(), GetHtCapabilities(), ns3::Time::GetMicroSeconds(), ns3::RegularWifiMac::GetSsid(), GetSupportedRates(), m_beaconDca, m_beaconEvent, m_beaconInterval, ns3::RegularWifiMac::m_htSupported, NS_LOG_FUNCTION, ns3::DcaTxop::Queue(), ns3::Simulator::Schedule(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::WifiMacHeader::SetBeacon(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetNoOrder(), and ns3::MgtProbeResponseHeader::SetSsid().
Referenced by DoInitialize(), SetBeaconGeneration(), and StartBeaconing().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 324 of file ap-wifi-mac.cc.
References ns3::Packet::AddHeader(), ns3::RegularWifiMac::GetAddress(), GetHtCapabilities(), ns3::Time::GetMicroSeconds(), ns3::RegularWifiMac::GetSsid(), GetSupportedRates(), m_beaconInterval, ns3::RegularWifiMac::m_dca, ns3::RegularWifiMac::m_htSupported, NS_LOG_FUNCTION, ns3::DcaTxop::Queue(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetNoOrder(), ns3::WifiMacHeader::SetProbeResp(), and ns3::MgtProbeResponseHeader::SetSsid().
Referenced by Receive().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
| address | the current address of this MAC layer. |
Reimplemented from ns3::RegularWifiMac.
Definition at line 99 of file ap-wifi-mac.cc.
References NS_LOG_FUNCTION, and ns3::RegularWifiMac::SetBssid().
Here is the call graph for this function:
|
private |
Definition at line 109 of file ap-wifi-mac.cc.
References ns3::EventId::Cancel(), m_beaconEvent, m_enableBeaconGeneration, NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), and SendOneBeacon().
Referenced by GetTypeId().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::ApWifiMac::SetBeaconInterval | ( | Time | interval | ) |
| interval | the interval between two beacon transmissions. |
Definition at line 158 of file ap-wifi-mac.cc.
References ns3::Time::GetMicroSeconds(), m_beaconInterval, NS_LOG_FUNCTION, and NS_LOG_WARN.
Referenced by GetTypeId().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
| linkUp | the callback to invoke when the link becomes up. |
Reimplemented from ns3::RegularWifiMac.
Definition at line 146 of file ap-wifi-mac.cc.
References NS_LOG_FUNCTION.
|
virtual |
| stationManager | the station manager attached to this MAC. |
Reimplemented from ns3::RegularWifiMac.
Definition at line 138 of file ap-wifi-mac.cc.
References m_beaconDca, NS_LOG_FUNCTION, and ns3::DcaTxop::SetWifiRemoteStationManager().
Here is the call graph for this function:| void ns3::ApWifiMac::StartBeaconing | ( | void | ) |
Start beacon transmission immediately.
Definition at line 169 of file ap-wifi-mac.cc.
References NS_LOG_FUNCTION, and SendOneBeacon().
Here is the call graph for this function:
|
virtual |
Reimplemented from ns3::RegularWifiMac.
Definition at line 271 of file ap-wifi-mac.cc.
References NS_LOG_FUNCTION.
|
privatevirtual |
Definition at line 435 of file ap-wifi-mac.cc.
References ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::IsAssocResp(), ns3::WifiRemoteStationManager::IsWaitAssocTxOk(), ns3::RegularWifiMac::m_stationManager, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::WifiRemoteStationManager::RecordGotAssocTxFailed().
Here is the call graph for this function:
|
privatevirtual |
Definition at line 421 of file ap-wifi-mac.cc.
References ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::IsAssocResp(), ns3::WifiRemoteStationManager::IsWaitAssocTxOk(), ns3::RegularWifiMac::m_stationManager, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::WifiRemoteStationManager::RecordGotAssocTxOk().
Here is the call graph for this function:Definition at line 127 of file ap-wifi-mac.h.
Referenced by ApWifiMac(), DoDispose(), DoInitialize(), SendOneBeacon(), and SetWifiRemoteStationManager().
|
private |
Definition at line 130 of file ap-wifi-mac.h.
Referenced by DoDispose(), DoInitialize(), SendOneBeacon(), and SetBeaconGeneration().
|
private |
Definition at line 128 of file ap-wifi-mac.h.
Referenced by GetBeaconInterval(), SendOneBeacon(), SendProbeResp(), and SetBeaconInterval().
|
private |
Definition at line 129 of file ap-wifi-mac.h.
Referenced by ApWifiMac(), DoDispose(), DoInitialize(), GetBeaconGeneration(), and SetBeaconGeneration().