Adding MonitorWifiMac, removing MonitorMacHigh
authorAshwin Narayan
Sat, 16 Jul 2011 10:44:13 -0400
changeset 73319da649b6670f
parent 7330 5d5418812534
child 7332 07a8e2881ec2
Adding MonitorWifiMac, removing MonitorMacHigh
src/wifi/model/monitor-mac-high.cc
src/wifi/model/monitor-mac-high.h
src/wifi/model/monitor-wifi-mac.cc
src/wifi/model/monitor-wifi-mac.h
     1.1 --- a/src/wifi/model/monitor-mac-high.cc	Sat Jul 16 09:43:24 2011 -0400
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,419 +0,0 @@
     1.4 -/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
     1.5 -/*
     1.6 - * Copyright (c) 2008 INRIA
     1.7 - *
     1.8 - * This program is free software; you can redistribute it and/or modify
     1.9 - * it under the terms of the GNU General Public License version 2 as
    1.10 - * published by the Free Software Foundation;
    1.11 - *
    1.12 - * This program is distributed in the hope that it will be useful,
    1.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.15 - * GNU General Public License for more details.
    1.16 - *
    1.17 - * You should have received a copy of the GNU General Public License
    1.18 - * along with this program; if not, write to the Free Software
    1.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.20 - *
    1.21 - * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>, Ashwin Narayan <ashwin.narayan89@gmail.com>
    1.22 - */
    1.23 -#include "monitor-mac-high.h"
    1.24 -
    1.25 -#include "ns3/log.h"
    1.26 -#include "ns3/boolean.h"
    1.27 -#include "ns3/pointer.h"
    1.28 -#include "ns3/uinteger.h"
    1.29 -#include "ns3/trace-source-accessor.h"
    1.30 -
    1.31 -#include "mac-rx-middle.h"
    1.32 -#include "mac-tx-middle.h"
    1.33 -#include "mac-low.h"
    1.34 -#include "dcf.h"
    1.35 -#include "dcf-manager.h"
    1.36 -#include "wifi-phy.h"
    1.37 -
    1.38 -#include "msdu-aggregator.h"
    1.39 -
    1.40 -NS_LOG_COMPONENT_DEFINE ("MonitorMacHigh");
    1.41 -
    1.42 -namespace ns3 {
    1.43 -
    1.44 -NS_OBJECT_ENSURE_REGISTERED (MonitorMacHigh);
    1.45 -
    1.46 -TypeId
    1.47 -MonitorMacHigh::GetTypeId (void)
    1.48 -{
    1.49 -  static TypeId tid = TypeId ("ns3::MonitorMacHigh")
    1.50 -    .SetParent<WifiMac> ()
    1.51 -    .AddConstructor<MonitorMacHigh> ()
    1.52 -  ;
    1.53 -  return tid;
    1.54 -}
    1.55 -
    1.56 -MonitorMacHigh::MonitorMacHigh ()
    1.57 -{
    1.58 -  NS_LOG_FUNCTION (this);
    1.59 -  m_rxMiddle = new MacRxMiddle ();
    1.60 -  m_rxMiddle->SetForwardCallback (MakeCallback (&MonitorMacHigh::Receive, this));
    1.61 -
    1.62 -  m_txMiddle = new MacTxMiddle ();
    1.63 -
    1.64 -  m_low = CreateObject<MacLow> ();
    1.65 -  m_low->SetRxCallback (MakeCallback (&MacRxMiddle::Receive, m_rxMiddle));
    1.66 -  m_low->SetMonitorMode ();
    1.67 -
    1.68 -  m_dcfManager = new DcfManager ();
    1.69 -  m_dcfManager->SetupLowListener (m_low);
    1.70 -
    1.71 -  m_dca = CreateObject<DcaTxop> ();
    1.72 -  m_dca->SetLow (m_low);
    1.73 -  m_dca->SetManager (m_dcfManager);
    1.74 -  m_dca->SetTxOkCallback (MakeCallback (&MonitorMacHigh::TxOk, this));
    1.75 -  m_dca->SetTxFailedCallback (MakeCallback (&MonitorMacHigh::TxFailed, this));
    1.76 -}
    1.77 -
    1.78 -MonitorMacHigh::~MonitorMacHigh ()
    1.79 -{
    1.80 -  NS_LOG_FUNCTION (this);
    1.81 -}
    1.82 -
    1.83 -void
    1.84 -MonitorMacHigh::DoStart ()
    1.85 -{
    1.86 -  NS_LOG_FUNCTION (this);
    1.87 -
    1.88 -  m_dca->Start ();
    1.89 -}
    1.90 -
    1.91 -void
    1.92 -MonitorMacHigh::DoDispose ()
    1.93 -{
    1.94 -  NS_LOG_FUNCTION (this);
    1.95 -  delete m_rxMiddle;
    1.96 -  m_rxMiddle = NULL;
    1.97 -
    1.98 -  delete m_txMiddle;
    1.99 -  m_txMiddle = NULL;
   1.100 -
   1.101 -  delete m_dcfManager;
   1.102 -  m_dcfManager = NULL;
   1.103 -
   1.104 -  m_low->Dispose ();
   1.105 -  m_low = NULL;
   1.106 -
   1.107 -  m_phy = NULL;
   1.108 -  m_stationManager = NULL;
   1.109 -
   1.110 -  m_dca->Dispose ();
   1.111 -  m_dca = NULL;
   1.112 -}
   1.113 -
   1.114 -Ptr<DcaTxop>
   1.115 -MonitorMacHigh::GetDcaTxop () const
   1.116 -{
   1.117 -  return m_dca;
   1.118 -}
   1.119 -
   1.120 -void
   1.121 -MonitorMacHigh::SetForwardUpCallback (ForwardUpCallback upCallback)
   1.122 -{
   1.123 -  NS_LOG_FUNCTION (this);
   1.124 -  m_forwardUp = upCallback;
   1.125 -}
   1.126 -
   1.127 -void
   1.128 -MonitorMacHigh::SetLinkUpCallback (Callback<void> linkUp)
   1.129 -{
   1.130 -  NS_LOG_FUNCTION (this);
   1.131 -  m_linkUp = linkUp;
   1.132 -}
   1.133 -
   1.134 -void
   1.135 -MonitorMacHigh::SetLinkDownCallback (Callback<void> linkDown)
   1.136 -{
   1.137 -  NS_LOG_FUNCTION (this);
   1.138 -  m_linkDown = linkDown;
   1.139 -}
   1.140 -
   1.141 -void
   1.142 -MonitorMacHigh::SetQosSupported (bool enable)
   1.143 -{
   1.144 -  NS_FATAL_ERROR ("QoS Functionality not supported in MonitorMacHigh");
   1.145 -}
   1.146 -
   1.147 -bool
   1.148 -MonitorMacHigh::GetQosSupported () const
   1.149 -{
   1.150 -  return false;
   1.151 -}
   1.152 -
   1.153 -void
   1.154 -MonitorMacHigh::SetSlot (Time slotTime)
   1.155 -{
   1.156 -  NS_LOG_FUNCTION (this << slotTime);
   1.157 -  m_dcfManager->SetSlot (slotTime);
   1.158 -  m_low->SetSlotTime (slotTime);
   1.159 -}
   1.160 -
   1.161 -Time
   1.162 -MonitorMacHigh::GetSlot (void) const
   1.163 -{
   1.164 -  return m_low->GetSlotTime ();
   1.165 -}
   1.166 -
   1.167 -void
   1.168 -MonitorMacHigh::SetSifs (Time sifs)
   1.169 -{
   1.170 -  NS_LOG_FUNCTION (this << sifs);
   1.171 -  m_dcfManager->SetSifs (sifs);
   1.172 -  m_low->SetSifs (sifs);
   1.173 -}
   1.174 -
   1.175 -Time
   1.176 -MonitorMacHigh::GetSifs (void) const
   1.177 -{
   1.178 -  return m_low->GetSifs ();
   1.179 -}
   1.180 -
   1.181 -void
   1.182 -MonitorMacHigh::SetEifsNoDifs (Time eifsNoDifs)
   1.183 -{
   1.184 -  NS_LOG_FUNCTION (this << eifsNoDifs);
   1.185 -  m_dcfManager->SetEifsNoDifs (eifsNoDifs);
   1.186 -}
   1.187 -
   1.188 -Time
   1.189 -MonitorMacHigh::GetEifsNoDifs (void) const
   1.190 -{
   1.191 -  return m_dcfManager->GetEifsNoDifs ();
   1.192 -}
   1.193 -
   1.194 -void
   1.195 -MonitorMacHigh::SetPifs (Time pifs)
   1.196 -{
   1.197 -  NS_LOG_FUNCTION (this << pifs);
   1.198 -  m_low->SetPifs (pifs);
   1.199 -}
   1.200 -
   1.201 -Time
   1.202 -MonitorMacHigh::GetPifs (void) const
   1.203 -{
   1.204 -  return m_low->GetPifs ();
   1.205 -}
   1.206 -
   1.207 -void
   1.208 -MonitorMacHigh::SetAckTimeout (Time ackTimeout)
   1.209 -{
   1.210 -  NS_LOG_FUNCTION (this << ackTimeout);
   1.211 -  m_low->SetAckTimeout (ackTimeout);
   1.212 -}
   1.213 -
   1.214 -Time
   1.215 -MonitorMacHigh::GetAckTimeout (void) const
   1.216 -{
   1.217 -  return m_low->GetAckTimeout ();
   1.218 -}
   1.219 -
   1.220 -void
   1.221 -MonitorMacHigh::SetCtsTimeout (Time ctsTimeout)
   1.222 -{
   1.223 -  NS_LOG_FUNCTION (this << ctsTimeout);
   1.224 -  m_low->SetCtsTimeout (ctsTimeout);
   1.225 -}
   1.226 -
   1.227 -Time
   1.228 -MonitorMacHigh::GetCtsTimeout (void) const
   1.229 -{
   1.230 -  return m_low->GetCtsTimeout ();
   1.231 -}
   1.232 -
   1.233 -void
   1.234 -MonitorMacHigh::SetBasicBlockAckTimeout (Time blockAckTimeout)
   1.235 -{
   1.236 -  NS_LOG_FUNCTION (this << blockAckTimeout);
   1.237 -  m_low->SetBasicBlockAckTimeout (blockAckTimeout);
   1.238 -}
   1.239 -
   1.240 -Time
   1.241 -MonitorMacHigh::GetBasicBlockAckTimeout (void) const
   1.242 -{
   1.243 -  return m_low->GetBasicBlockAckTimeout ();
   1.244 -}
   1.245 -
   1.246 -void
   1.247 -MonitorMacHigh::SetCompressedBlockAckTimeout (Time blockAckTimeout)
   1.248 -{
   1.249 -  NS_LOG_FUNCTION (this << blockAckTimeout);
   1.250 -  m_low->SetCompressedBlockAckTimeout (blockAckTimeout);
   1.251 -}
   1.252 -
   1.253 -Time
   1.254 -MonitorMacHigh::GetCompressedBlockAckTimeout (void) const
   1.255 -{
   1.256 -  return m_low->GetCompressedBlockAckTimeout ();
   1.257 -}
   1.258 -
   1.259 -void
   1.260 -MonitorMacHigh::SetAddress (Mac48Address address)
   1.261 -{
   1.262 -  NS_LOG_FUNCTION (this << address);
   1.263 -  m_low->SetAddress (address);
   1.264 -}
   1.265 -
   1.266 -Mac48Address
   1.267 -MonitorMacHigh::GetAddress (void) const
   1.268 -{
   1.269 -  return m_low->GetAddress ();
   1.270 -}
   1.271 -
   1.272 -void
   1.273 -MonitorMacHigh::SetSsid (Ssid ssid)
   1.274 -{
   1.275 -  NS_LOG_FUNCTION (this << ssid);
   1.276 -  m_ssid = ssid;
   1.277 -}
   1.278 -
   1.279 -Ssid
   1.280 -MonitorMacHigh::GetSsid (void) const
   1.281 -{
   1.282 -  return m_ssid;
   1.283 -}
   1.284 -
   1.285 -void
   1.286 -MonitorMacHigh::SetBssid (Mac48Address bssid)
   1.287 -{
   1.288 -  NS_LOG_FUNCTION (this << bssid);
   1.289 -  m_low->SetBssid (bssid);
   1.290 -}
   1.291 -
   1.292 -Mac48Address
   1.293 -MonitorMacHigh::GetBssid (void) const
   1.294 -{
   1.295 -  return m_low->GetBssid ();
   1.296 -}
   1.297 -
   1.298 -void
   1.299 -MonitorMacHigh::SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> stationManager)
   1.300 -{
   1.301 -  NS_LOG_FUNCTION (this << stationManager);
   1.302 -  m_stationManager = stationManager;
   1.303 -  m_low->SetWifiRemoteStationManager (stationManager);
   1.304 -
   1.305 -  m_dca->SetWifiRemoteStationManager (stationManager);
   1.306 -}
   1.307 -
   1.308 -void
   1.309 -MonitorMacHigh::SetWifiPhy (Ptr<WifiPhy> phy)
   1.310 -{
   1.311 -  NS_LOG_FUNCTION (this << phy);
   1.312 -  m_phy = phy;
   1.313 -  m_dcfManager->SetupPhyListener (phy);
   1.314 -  m_low->SetPhy (phy);
   1.315 -}
   1.316 -
   1.317 -void
   1.318 -MonitorMacHigh::SetPromisc (void)
   1.319 -{
   1.320 -  m_low->SetPromisc ();
   1.321 -}
   1.322 -
   1.323 -void
   1.324 -MonitorMacHigh::Enqueue (Ptr<const Packet> packet,
   1.325 -                         Mac48Address to, Mac48Address from)
   1.326 -{
   1.327 -}
   1.328 -
   1.329 -void
   1.330 -MonitorMacHigh::Enqueue (Ptr<const Packet> packet,
   1.331 -                         Mac48Address to)
   1.332 -{
   1.333 -}
   1.334 -
   1.335 -bool
   1.336 -MonitorMacHigh::SupportsSendFrom (void) const
   1.337 -{
   1.338 -  return false;
   1.339 -}
   1.340 -
   1.341 -void
   1.342 -MonitorMacHigh::ForwardUp (Ptr<Packet> packet, Mac48Address from, Mac48Address to)
   1.343 -{
   1.344 -  NS_LOG_FUNCTION (this << packet << from);
   1.345 -  m_forwardUp (packet, from, to);
   1.346 -}
   1.347 -
   1.348 -void
   1.349 -MonitorMacHigh::Receive (Ptr<Packet> packet, const WifiMacHeader *hdr, const RadiotapHeader *radiotaphdr)
   1.350 -{
   1.351 -
   1.352 -  Mac48Address to = hdr->GetAddr1 ();
   1.353 -  Mac48Address from = hdr->GetAddr2 ();
   1.354 -  NS_LOG_DEBUG ("Received packet to: " << to << " from: " << from << " at:" << m_low->GetAddress ());
   1.355 -  packet->AddHeader (*radiotaphdr);
   1.356 -  ForwardUp (packet, from, to);
   1.357 -}
   1.358 -
   1.359 -void
   1.360 -MonitorMacHigh::DeaggregateAmsduAndForward (Ptr<Packet> aggregatedPacket,
   1.361 -                                            const WifiMacHeader *hdr)
   1.362 -{
   1.363 -}
   1.364 -
   1.365 -void
   1.366 -MonitorMacHigh::SendAddBaResponse (const MgtAddBaRequestHeader *reqHdr,
   1.367 -                                   Mac48Address originator)
   1.368 -{
   1.369 -}
   1.370 -
   1.371 -void
   1.372 -MonitorMacHigh::FinishConfigureStandard (enum WifiPhyStandard standard)
   1.373 -{
   1.374 -  uint32_t cwmin;
   1.375 -  uint32_t cwmax;
   1.376 -
   1.377 -  switch (standard)
   1.378 -    {
   1.379 -    case WIFI_PHY_STANDARD_80211p_CCH:
   1.380 -    case WIFI_PHY_STANDARD_80211p_SCH:
   1.381 -      cwmin = 15;
   1.382 -      cwmax = 511;
   1.383 -      break;
   1.384 -
   1.385 -    case WIFI_PHY_STANDARD_holland:
   1.386 -    case WIFI_PHY_STANDARD_80211a:
   1.387 -    case WIFI_PHY_STANDARD_80211g:
   1.388 -    case WIFI_PHY_STANDARD_80211_10Mhz:
   1.389 -    case WIFI_PHY_STANDARD_80211_5Mhz:
   1.390 -      cwmin = 15;
   1.391 -      cwmax = 1023;
   1.392 -      break;
   1.393 -
   1.394 -    case WIFI_PHY_STANDARD_80211b:
   1.395 -      cwmin = 31;
   1.396 -      cwmax = 1023;
   1.397 -      break;
   1.398 -
   1.399 -    default:
   1.400 -      NS_FATAL_ERROR ("Unsupported WifiPhyStandard in MonitorMacHigh::FinishConfigureStandard ()");
   1.401 -    }
   1.402 -
   1.403 -  // The special value of AC_BE_NQOS which exists in the Access
   1.404 -  // Category enumeration allows us to configure plain old DCF.
   1.405 -  ConfigureDcf (m_dca, cwmin, cwmax, AC_BE_NQOS);
   1.406 -}
   1.407 -
   1.408 -void
   1.409 -MonitorMacHigh::TxOk (const WifiMacHeader &hdr)
   1.410 -{
   1.411 -  NS_LOG_FUNCTION (this << hdr);
   1.412 -  m_txOkCallback (hdr);
   1.413 -}
   1.414 -
   1.415 -void
   1.416 -MonitorMacHigh::TxFailed (const WifiMacHeader &hdr)
   1.417 -{
   1.418 -  NS_LOG_FUNCTION (this << hdr);
   1.419 -  m_txErrCallback (hdr);
   1.420 -}
   1.421 -
   1.422 -} // namespace ns3
     2.1 --- a/src/wifi/model/monitor-mac-high.h	Sat Jul 16 09:43:24 2011 -0400
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,137 +0,0 @@
     2.4 -/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
     2.5 -/*
     2.6 - * Copyright (c) 2008 INRIA
     2.7 - *
     2.8 - * This program is free software; you can redistribute it and/or modify
     2.9 - * it under the terms of the GNU General Public License version 2 as
    2.10 - * published by the Free Software Foundation;
    2.11 - *
    2.12 - * This program is distributed in the hope that it will be useful,
    2.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    2.15 - * GNU General Public License for more details.
    2.16 - *
    2.17 - * You should have received a copy of the GNU General Public License
    2.18 - * along with this program; if not, write to the Free Software
    2.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    2.20 - *
    2.21 - * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>, Ashwin Narayan <ashwin.narayan89@gmail.com>
    2.22 - */
    2.23 -#ifndef MONITOR_MAC_HIGH_H
    2.24 -#define MONITOR_MAC_HIGH_H
    2.25 -
    2.26 -#include "ns3/wifi-mac.h"
    2.27 -#include "ns3/radiotap-header.h"
    2.28 -
    2.29 -#include "dca-txop.h"
    2.30 -#include "edca-txop-n.h"
    2.31 -#include "wifi-remote-station-manager.h"
    2.32 -#include "ssid.h"
    2.33 -#include "qos-utils.h"
    2.34 -
    2.35 -#include <map>
    2.36 -
    2.37 -namespace ns3 {
    2.38 -
    2.39 -class Dcf;
    2.40 -class MacLow;
    2.41 -class MacRxMiddle;
    2.42 -class MacTxMiddle;
    2.43 -class DcfManager;
    2.44 -
    2.45 -/**
    2.46 - * \brief base class for Monitor Wifi Mac objects.
    2.47 - *
    2.48 - * This class is essentially a copy of the non-QoS
    2.49 - * functionality of RegularWifiMac
    2.50 - *
    2.51 - */
    2.52 -
    2.53 -class MonitorMacHigh : public WifiMac
    2.54 -{
    2.55 -public:
    2.56 -  static TypeId GetTypeId (void);
    2.57 -
    2.58 -  MonitorMacHigh ();
    2.59 -  virtual ~MonitorMacHigh ();
    2.60 -
    2.61 -  void SetSlot (Time slotTime);
    2.62 -  void SetSifs (Time sifs);
    2.63 -  void SetEifsNoDifs (Time eifsNoDifs);
    2.64 -  void SetPifs (Time pifs);
    2.65 -  void SetCtsTimeout (Time ctsTimeout);
    2.66 -  void SetAckTimeout (Time ackTimeout);
    2.67 -  Time GetPifs (void) const;
    2.68 -  Time GetSifs (void) const;
    2.69 -  Time GetSlot (void) const;
    2.70 -  Time GetEifsNoDifs (void) const;
    2.71 -  Time GetCtsTimeout (void) const;
    2.72 -  Time GetAckTimeout (void) const;
    2.73 -  virtual Mac48Address GetAddress (void) const;
    2.74 -  virtual Ssid GetSsid (void) const;
    2.75 -  virtual void SetAddress (Mac48Address address);
    2.76 -  virtual void SetSsid (Ssid ssid);
    2.77 -  virtual void SetBssid (Mac48Address bssid);
    2.78 -  virtual Mac48Address GetBssid (void) const;
    2.79 -  virtual void SetPromisc (void);
    2.80 -  virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address from);
    2.81 -  virtual bool SupportsSendFrom (void) const;
    2.82 -  virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to);
    2.83 -  virtual void SetWifiPhy (Ptr<WifiPhy> phy);
    2.84 -  virtual void SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> stationManager);
    2.85 -  typedef Callback<void, Ptr<Packet>, Mac48Address, Mac48Address> ForwardUpCallback;
    2.86 -  virtual void SetForwardUpCallback (ForwardUpCallback upCallback);
    2.87 -  virtual void SetLinkUpCallback (Callback<void> linkUp);
    2.88 -  virtual void SetLinkDownCallback (Callback<void> linkDown);
    2.89 -  virtual void SetBasicBlockAckTimeout (Time blockAckTimeout);
    2.90 -  virtual Time GetBasicBlockAckTimeout (void) const;
    2.91 -  virtual void SetCompressedBlockAckTimeout (Time blockAckTimeout);
    2.92 -  virtual Time GetCompressedBlockAckTimeout (void) const;
    2.93 -
    2.94 -protected:
    2.95 -  virtual void DoStart ();
    2.96 -  virtual void DoDispose ();
    2.97 -
    2.98 -  MacRxMiddle *m_rxMiddle;
    2.99 -  MacTxMiddle *m_txMiddle;
   2.100 -  Ptr<MacLow> m_low;
   2.101 -  DcfManager *m_dcfManager;
   2.102 -  Ptr<WifiPhy> m_phy;
   2.103 -
   2.104 -  Ptr<WifiRemoteStationManager> m_stationManager;
   2.105 -
   2.106 -  ForwardUpCallback m_forwardUp;
   2.107 -  Callback<void> m_linkUp;
   2.108 -  Callback<void> m_linkDown;
   2.109 -
   2.110 -  Ssid m_ssid;
   2.111 -
   2.112 -  Ptr<DcaTxop> m_dca;
   2.113 -
   2.114 -  virtual void FinishConfigureStandard (enum WifiPhyStandard standard);
   2.115 -
   2.116 -  virtual void Receive (Ptr<Packet> packet, const WifiMacHeader *hdr, const RadiotapHeader *radiotaphdr);
   2.117 -  virtual void TxOk (const WifiMacHeader &hdr);
   2.118 -  virtual void TxFailed (const WifiMacHeader &hdr);
   2.119 -
   2.120 -  void ForwardUp (Ptr<Packet> packet, Mac48Address from, Mac48Address to);
   2.121 -
   2.122 -  virtual void DeaggregateAmsduAndForward (Ptr<Packet> aggregatedPacket,
   2.123 -                                           const WifiMacHeader *hdr);
   2.124 -
   2.125 -  virtual void SendAddBaResponse (const MgtAddBaRequestHeader *reqHdr,
   2.126 -                                  Mac48Address originator);
   2.127 -
   2.128 -  bool m_qosSupported;
   2.129 -  void SetQosSupported (bool enable);
   2.130 -  bool GetQosSupported () const;
   2.131 -private:
   2.132 -  Ptr<DcaTxop> GetDcaTxop (void) const;
   2.133 -
   2.134 -  TracedCallback<const WifiMacHeader &> m_txOkCallback;
   2.135 -  TracedCallback<const WifiMacHeader &> m_txErrCallback;
   2.136 -};
   2.137 -
   2.138 -} // namespace ns3
   2.139 -
   2.140 -#endif /* MONITOR_MAC_HIGH_H */
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/src/wifi/model/monitor-wifi-mac.cc	Sat Jul 16 10:44:13 2011 -0400
     3.3 @@ -0,0 +1,419 @@
     3.4 +/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
     3.5 +/*
     3.6 + * Copyright (c) 2008 INRIA
     3.7 + *
     3.8 + * This program is free software; you can redistribute it and/or modify
     3.9 + * it under the terms of the GNU General Public License version 2 as
    3.10 + * published by the Free Software Foundation;
    3.11 + *
    3.12 + * This program is distributed in the hope that it will be useful,
    3.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    3.15 + * GNU General Public License for more details.
    3.16 + *
    3.17 + * You should have received a copy of the GNU General Public License
    3.18 + * along with this program; if not, write to the Free Software
    3.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    3.20 + *
    3.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>, Ashwin Narayan <ashwin.narayan89@gmail.com>
    3.22 + */
    3.23 +#include "monitor-wifi-mac.h"
    3.24 +
    3.25 +#include "ns3/log.h"
    3.26 +#include "ns3/boolean.h"
    3.27 +#include "ns3/pointer.h"
    3.28 +#include "ns3/uinteger.h"
    3.29 +#include "ns3/trace-source-accessor.h"
    3.30 +
    3.31 +#include "mac-rx-middle.h"
    3.32 +#include "mac-tx-middle.h"
    3.33 +#include "mac-low.h"
    3.34 +#include "dcf.h"
    3.35 +#include "dcf-manager.h"
    3.36 +#include "wifi-phy.h"
    3.37 +
    3.38 +#include "msdu-aggregator.h"
    3.39 +
    3.40 +NS_LOG_COMPONENT_DEFINE ("MonitorWifiMac");
    3.41 +
    3.42 +namespace ns3 {
    3.43 +
    3.44 +NS_OBJECT_ENSURE_REGISTERED (MonitorWifiMac);
    3.45 +
    3.46 +TypeId
    3.47 +MonitorWifiMac::GetTypeId (void)
    3.48 +{
    3.49 +  static TypeId tid = TypeId ("ns3::MonitorWifiMac")
    3.50 +    .SetParent<WifiMac> ()
    3.51 +    .AddConstructor<MonitorWifiMac> ()
    3.52 +  ;
    3.53 +  return tid;
    3.54 +}
    3.55 +
    3.56 +MonitorWifiMac::MonitorWifiMac ()
    3.57 +{
    3.58 +  NS_LOG_FUNCTION (this);
    3.59 +  m_rxMiddle = new MacRxMiddle ();
    3.60 +  m_rxMiddle->SetForwardCallback (MakeCallback (&MonitorWifiMac::Receive, this));
    3.61 +
    3.62 +  m_txMiddle = new MacTxMiddle ();
    3.63 +
    3.64 +  m_low = CreateObject<MacLow> ();
    3.65 +  m_low->SetRxCallback (MakeCallback (&MacRxMiddle::Receive, m_rxMiddle));
    3.66 +  m_low->SetMonitorMode ();
    3.67 +
    3.68 +  m_dcfManager = new DcfManager ();
    3.69 +  m_dcfManager->SetupLowListener (m_low);
    3.70 +
    3.71 +  m_dca = CreateObject<DcaTxop> ();
    3.72 +  m_dca->SetLow (m_low);
    3.73 +  m_dca->SetManager (m_dcfManager);
    3.74 +  m_dca->SetTxOkCallback (MakeCallback (&MonitorWifiMac::TxOk, this));
    3.75 +  m_dca->SetTxFailedCallback (MakeCallback (&MonitorWifiMac::TxFailed, this));
    3.76 +}
    3.77 +
    3.78 +MonitorWifiMac::~MonitorWifiMac ()
    3.79 +{
    3.80 +  NS_LOG_FUNCTION (this);
    3.81 +}
    3.82 +
    3.83 +void
    3.84 +MonitorWifiMac::DoStart ()
    3.85 +{
    3.86 +  NS_LOG_FUNCTION (this);
    3.87 +
    3.88 +  m_dca->Start ();
    3.89 +}
    3.90 +
    3.91 +void
    3.92 +MonitorWifiMac::DoDispose ()
    3.93 +{
    3.94 +  NS_LOG_FUNCTION (this);
    3.95 +  delete m_rxMiddle;
    3.96 +  m_rxMiddle = NULL;
    3.97 +
    3.98 +  delete m_txMiddle;
    3.99 +  m_txMiddle = NULL;
   3.100 +
   3.101 +  delete m_dcfManager;
   3.102 +  m_dcfManager = NULL;
   3.103 +
   3.104 +  m_low->Dispose ();
   3.105 +  m_low = NULL;
   3.106 +
   3.107 +  m_phy = NULL;
   3.108 +  m_stationManager = NULL;
   3.109 +
   3.110 +  m_dca->Dispose ();
   3.111 +  m_dca = NULL;
   3.112 +}
   3.113 +
   3.114 +Ptr<DcaTxop>
   3.115 +MonitorWifiMac::GetDcaTxop () const
   3.116 +{
   3.117 +  return m_dca;
   3.118 +}
   3.119 +
   3.120 +void
   3.121 +MonitorWifiMac::SetForwardUpCallback (ForwardUpCallback upCallback)
   3.122 +{
   3.123 +  NS_LOG_FUNCTION (this);
   3.124 +  m_forwardUp = upCallback;
   3.125 +}
   3.126 +
   3.127 +void
   3.128 +MonitorWifiMac::SetLinkUpCallback (Callback<void> linkUp)
   3.129 +{
   3.130 +  NS_LOG_FUNCTION (this);
   3.131 +  m_linkUp = linkUp;
   3.132 +}
   3.133 +
   3.134 +void
   3.135 +MonitorWifiMac::SetLinkDownCallback (Callback<void> linkDown)
   3.136 +{
   3.137 +  NS_LOG_FUNCTION (this);
   3.138 +  m_linkDown = linkDown;
   3.139 +}
   3.140 +
   3.141 +void
   3.142 +MonitorWifiMac::SetQosSupported (bool enable)
   3.143 +{
   3.144 +  NS_FATAL_ERROR ("QoS Functionality not supported in MonitorWifiMac");
   3.145 +}
   3.146 +
   3.147 +bool
   3.148 +MonitorWifiMac::GetQosSupported () const
   3.149 +{
   3.150 +  return false;
   3.151 +}
   3.152 +
   3.153 +void
   3.154 +MonitorWifiMac::SetSlot (Time slotTime)
   3.155 +{
   3.156 +  NS_LOG_FUNCTION (this << slotTime);
   3.157 +  m_dcfManager->SetSlot (slotTime);
   3.158 +  m_low->SetSlotTime (slotTime);
   3.159 +}
   3.160 +
   3.161 +Time
   3.162 +MonitorWifiMac::GetSlot (void) const
   3.163 +{
   3.164 +  return m_low->GetSlotTime ();
   3.165 +}
   3.166 +
   3.167 +void
   3.168 +MonitorWifiMac::SetSifs (Time sifs)
   3.169 +{
   3.170 +  NS_LOG_FUNCTION (this << sifs);
   3.171 +  m_dcfManager->SetSifs (sifs);
   3.172 +  m_low->SetSifs (sifs);
   3.173 +}
   3.174 +
   3.175 +Time
   3.176 +MonitorWifiMac::GetSifs (void) const
   3.177 +{
   3.178 +  return m_low->GetSifs ();
   3.179 +}
   3.180 +
   3.181 +void
   3.182 +MonitorWifiMac::SetEifsNoDifs (Time eifsNoDifs)
   3.183 +{
   3.184 +  NS_LOG_FUNCTION (this << eifsNoDifs);
   3.185 +  m_dcfManager->SetEifsNoDifs (eifsNoDifs);
   3.186 +}
   3.187 +
   3.188 +Time
   3.189 +MonitorWifiMac::GetEifsNoDifs (void) const
   3.190 +{
   3.191 +  return m_dcfManager->GetEifsNoDifs ();
   3.192 +}
   3.193 +
   3.194 +void
   3.195 +MonitorWifiMac::SetPifs (Time pifs)
   3.196 +{
   3.197 +  NS_LOG_FUNCTION (this << pifs);
   3.198 +  m_low->SetPifs (pifs);
   3.199 +}
   3.200 +
   3.201 +Time
   3.202 +MonitorWifiMac::GetPifs (void) const
   3.203 +{
   3.204 +  return m_low->GetPifs ();
   3.205 +}
   3.206 +
   3.207 +void
   3.208 +MonitorWifiMac::SetAckTimeout (Time ackTimeout)
   3.209 +{
   3.210 +  NS_LOG_FUNCTION (this << ackTimeout);
   3.211 +  m_low->SetAckTimeout (ackTimeout);
   3.212 +}
   3.213 +
   3.214 +Time
   3.215 +MonitorWifiMac::GetAckTimeout (void) const
   3.216 +{
   3.217 +  return m_low->GetAckTimeout ();
   3.218 +}
   3.219 +
   3.220 +void
   3.221 +MonitorWifiMac::SetCtsTimeout (Time ctsTimeout)
   3.222 +{
   3.223 +  NS_LOG_FUNCTION (this << ctsTimeout);
   3.224 +  m_low->SetCtsTimeout (ctsTimeout);
   3.225 +}
   3.226 +
   3.227 +Time
   3.228 +MonitorWifiMac::GetCtsTimeout (void) const
   3.229 +{
   3.230 +  return m_low->GetCtsTimeout ();
   3.231 +}
   3.232 +
   3.233 +void
   3.234 +MonitorWifiMac::SetBasicBlockAckTimeout (Time blockAckTimeout)
   3.235 +{
   3.236 +  NS_LOG_FUNCTION (this << blockAckTimeout);
   3.237 +  m_low->SetBasicBlockAckTimeout (blockAckTimeout);
   3.238 +}
   3.239 +
   3.240 +Time
   3.241 +MonitorWifiMac::GetBasicBlockAckTimeout (void) const
   3.242 +{
   3.243 +  return m_low->GetBasicBlockAckTimeout ();
   3.244 +}
   3.245 +
   3.246 +void
   3.247 +MonitorWifiMac::SetCompressedBlockAckTimeout (Time blockAckTimeout)
   3.248 +{
   3.249 +  NS_LOG_FUNCTION (this << blockAckTimeout);
   3.250 +  m_low->SetCompressedBlockAckTimeout (blockAckTimeout);
   3.251 +}
   3.252 +
   3.253 +Time
   3.254 +MonitorWifiMac::GetCompressedBlockAckTimeout (void) const
   3.255 +{
   3.256 +  return m_low->GetCompressedBlockAckTimeout ();
   3.257 +}
   3.258 +
   3.259 +void
   3.260 +MonitorWifiMac::SetAddress (Mac48Address address)
   3.261 +{
   3.262 +  NS_LOG_FUNCTION (this << address);
   3.263 +  m_low->SetAddress (address);
   3.264 +}
   3.265 +
   3.266 +Mac48Address
   3.267 +MonitorWifiMac::GetAddress (void) const
   3.268 +{
   3.269 +  return m_low->GetAddress ();
   3.270 +}
   3.271 +
   3.272 +void
   3.273 +MonitorWifiMac::SetSsid (Ssid ssid)
   3.274 +{
   3.275 +  NS_LOG_FUNCTION (this << ssid);
   3.276 +  m_ssid = ssid;
   3.277 +}
   3.278 +
   3.279 +Ssid
   3.280 +MonitorWifiMac::GetSsid (void) const
   3.281 +{
   3.282 +  return m_ssid;
   3.283 +}
   3.284 +
   3.285 +void
   3.286 +MonitorWifiMac::SetBssid (Mac48Address bssid)
   3.287 +{
   3.288 +  NS_LOG_FUNCTION (this << bssid);
   3.289 +  m_low->SetBssid (bssid);
   3.290 +}
   3.291 +
   3.292 +Mac48Address
   3.293 +MonitorWifiMac::GetBssid (void) const
   3.294 +{
   3.295 +  return m_low->GetBssid ();
   3.296 +}
   3.297 +
   3.298 +void
   3.299 +MonitorWifiMac::SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> stationManager)
   3.300 +{
   3.301 +  NS_LOG_FUNCTION (this << stationManager);
   3.302 +  m_stationManager = stationManager;
   3.303 +  m_low->SetWifiRemoteStationManager (stationManager);
   3.304 +
   3.305 +  m_dca->SetWifiRemoteStationManager (stationManager);
   3.306 +}
   3.307 +
   3.308 +void
   3.309 +MonitorWifiMac::SetWifiPhy (Ptr<WifiPhy> phy)
   3.310 +{
   3.311 +  NS_LOG_FUNCTION (this << phy);
   3.312 +  m_phy = phy;
   3.313 +  m_dcfManager->SetupPhyListener (phy);
   3.314 +  m_low->SetPhy (phy);
   3.315 +}
   3.316 +
   3.317 +void
   3.318 +MonitorWifiMac::SetPromisc (void)
   3.319 +{
   3.320 +  m_low->SetPromisc ();
   3.321 +}
   3.322 +
   3.323 +void
   3.324 +MonitorWifiMac::Enqueue (Ptr<const Packet> packet,
   3.325 +                         Mac48Address to, Mac48Address from)
   3.326 +{
   3.327 +}
   3.328 +
   3.329 +void
   3.330 +MonitorWifiMac::Enqueue (Ptr<const Packet> packet,
   3.331 +                         Mac48Address to)
   3.332 +{
   3.333 +}
   3.334 +
   3.335 +bool
   3.336 +MonitorWifiMac::SupportsSendFrom (void) const
   3.337 +{
   3.338 +  return false;
   3.339 +}
   3.340 +
   3.341 +void
   3.342 +MonitorWifiMac::ForwardUp (Ptr<Packet> packet, Mac48Address from, Mac48Address to)
   3.343 +{
   3.344 +  NS_LOG_FUNCTION (this << packet << from);
   3.345 +  m_forwardUp (packet, from, to);
   3.346 +}
   3.347 +
   3.348 +void
   3.349 +MonitorWifiMac::Receive (Ptr<Packet> packet, const WifiMacHeader *hdr, const RadiotapHeader *radiotaphdr)
   3.350 +{
   3.351 +
   3.352 +  Mac48Address to = hdr->GetAddr1 ();
   3.353 +  Mac48Address from = hdr->GetAddr2 ();
   3.354 +  NS_LOG_DEBUG ("Received packet to: " << to << " from: " << from << " at:" << m_low->GetAddress ());
   3.355 +  packet->AddHeader (*radiotaphdr);
   3.356 +  ForwardUp (packet, from, to);
   3.357 +}
   3.358 +
   3.359 +void
   3.360 +MonitorWifiMac::DeaggregateAmsduAndForward (Ptr<Packet> aggregatedPacket,
   3.361 +                                            const WifiMacHeader *hdr)
   3.362 +{
   3.363 +}
   3.364 +
   3.365 +void
   3.366 +MonitorWifiMac::SendAddBaResponse (const MgtAddBaRequestHeader *reqHdr,
   3.367 +                                   Mac48Address originator)
   3.368 +{
   3.369 +}
   3.370 +
   3.371 +void
   3.372 +MonitorWifiMac::FinishConfigureStandard (enum WifiPhyStandard standard)
   3.373 +{
   3.374 +  uint32_t cwmin;
   3.375 +  uint32_t cwmax;
   3.376 +
   3.377 +  switch (standard)
   3.378 +    {
   3.379 +    case WIFI_PHY_STANDARD_80211p_CCH:
   3.380 +    case WIFI_PHY_STANDARD_80211p_SCH:
   3.381 +      cwmin = 15;
   3.382 +      cwmax = 511;
   3.383 +      break;
   3.384 +
   3.385 +    case WIFI_PHY_STANDARD_holland:
   3.386 +    case WIFI_PHY_STANDARD_80211a:
   3.387 +    case WIFI_PHY_STANDARD_80211g:
   3.388 +    case WIFI_PHY_STANDARD_80211_10Mhz:
   3.389 +    case WIFI_PHY_STANDARD_80211_5Mhz:
   3.390 +      cwmin = 15;
   3.391 +      cwmax = 1023;
   3.392 +      break;
   3.393 +
   3.394 +    case WIFI_PHY_STANDARD_80211b:
   3.395 +      cwmin = 31;
   3.396 +      cwmax = 1023;
   3.397 +      break;
   3.398 +
   3.399 +    default:
   3.400 +      NS_FATAL_ERROR ("Unsupported WifiPhyStandard in MonitorWifiMac::FinishConfigureStandard ()");
   3.401 +    }
   3.402 +
   3.403 +  // The special value of AC_BE_NQOS which exists in the Access
   3.404 +  // Category enumeration allows us to configure plain old DCF.
   3.405 +  ConfigureDcf (m_dca, cwmin, cwmax, AC_BE_NQOS);
   3.406 +}
   3.407 +
   3.408 +void
   3.409 +MonitorWifiMac::TxOk (const WifiMacHeader &hdr)
   3.410 +{
   3.411 +  NS_LOG_FUNCTION (this << hdr);
   3.412 +  m_txOkCallback (hdr);
   3.413 +}
   3.414 +
   3.415 +void
   3.416 +MonitorWifiMac::TxFailed (const WifiMacHeader &hdr)
   3.417 +{
   3.418 +  NS_LOG_FUNCTION (this << hdr);
   3.419 +  m_txErrCallback (hdr);
   3.420 +}
   3.421 +
   3.422 +} // namespace ns3
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/src/wifi/model/monitor-wifi-mac.h	Sat Jul 16 10:44:13 2011 -0400
     4.3 @@ -0,0 +1,137 @@
     4.4 +/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
     4.5 +/*
     4.6 + * Copyright (c) 2008 INRIA
     4.7 + *
     4.8 + * This program is free software; you can redistribute it and/or modify
     4.9 + * it under the terms of the GNU General Public License version 2 as
    4.10 + * published by the Free Software Foundation;
    4.11 + *
    4.12 + * This program is distributed in the hope that it will be useful,
    4.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    4.15 + * GNU General Public License for more details.
    4.16 + *
    4.17 + * You should have received a copy of the GNU General Public License
    4.18 + * along with this program; if not, write to the Free Software
    4.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    4.20 + *
    4.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>, Ashwin Narayan <ashwin.narayan89@gmail.com>
    4.22 + */
    4.23 +#ifndef MONITOR_WIFI_MAC_H
    4.24 +#define MONITOR_WIFI_MAC_H
    4.25 +
    4.26 +#include "ns3/wifi-mac.h"
    4.27 +#include "ns3/radiotap-header.h"
    4.28 +
    4.29 +#include "dca-txop.h"
    4.30 +#include "edca-txop-n.h"
    4.31 +#include "wifi-remote-station-manager.h"
    4.32 +#include "ssid.h"
    4.33 +#include "qos-utils.h"
    4.34 +
    4.35 +#include <map>
    4.36 +
    4.37 +namespace ns3 {
    4.38 +
    4.39 +class Dcf;
    4.40 +class MacLow;
    4.41 +class MacRxMiddle;
    4.42 +class MacTxMiddle;
    4.43 +class DcfManager;
    4.44 +
    4.45 +/**
    4.46 + * \brief base class for Monitor Wifi Mac objects.
    4.47 + *
    4.48 + * This class is essentially a copy of the non-QoS
    4.49 + * functionality of RegularWifiMac
    4.50 + *
    4.51 + */
    4.52 +
    4.53 +class MonitorWifiMac : public WifiMac
    4.54 +{
    4.55 +public:
    4.56 +  static TypeId GetTypeId (void);
    4.57 +
    4.58 +  MonitorWifiMac ();
    4.59 +  virtual ~MonitorWifiMac ();
    4.60 +
    4.61 +  void SetSlot (Time slotTime);
    4.62 +  void SetSifs (Time sifs);
    4.63 +  void SetEifsNoDifs (Time eifsNoDifs);
    4.64 +  void SetPifs (Time pifs);
    4.65 +  void SetCtsTimeout (Time ctsTimeout);
    4.66 +  void SetAckTimeout (Time ackTimeout);
    4.67 +  Time GetPifs (void) const;
    4.68 +  Time GetSifs (void) const;
    4.69 +  Time GetSlot (void) const;
    4.70 +  Time GetEifsNoDifs (void) const;
    4.71 +  Time GetCtsTimeout (void) const;
    4.72 +  Time GetAckTimeout (void) const;
    4.73 +  virtual Mac48Address GetAddress (void) const;
    4.74 +  virtual Ssid GetSsid (void) const;
    4.75 +  virtual void SetAddress (Mac48Address address);
    4.76 +  virtual void SetSsid (Ssid ssid);
    4.77 +  virtual void SetBssid (Mac48Address bssid);
    4.78 +  virtual Mac48Address GetBssid (void) const;
    4.79 +  virtual void SetPromisc (void);
    4.80 +  virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address from);
    4.81 +  virtual bool SupportsSendFrom (void) const;
    4.82 +  virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to);
    4.83 +  virtual void SetWifiPhy (Ptr<WifiPhy> phy);
    4.84 +  virtual void SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> stationManager);
    4.85 +  typedef Callback<void, Ptr<Packet>, Mac48Address, Mac48Address> ForwardUpCallback;
    4.86 +  virtual void SetForwardUpCallback (ForwardUpCallback upCallback);
    4.87 +  virtual void SetLinkUpCallback (Callback<void> linkUp);
    4.88 +  virtual void SetLinkDownCallback (Callback<void> linkDown);
    4.89 +  virtual void SetBasicBlockAckTimeout (Time blockAckTimeout);
    4.90 +  virtual Time GetBasicBlockAckTimeout (void) const;
    4.91 +  virtual void SetCompressedBlockAckTimeout (Time blockAckTimeout);
    4.92 +  virtual Time GetCompressedBlockAckTimeout (void) const;
    4.93 +
    4.94 +protected:
    4.95 +  virtual void DoStart ();
    4.96 +  virtual void DoDispose ();
    4.97 +
    4.98 +  MacRxMiddle *m_rxMiddle;
    4.99 +  MacTxMiddle *m_txMiddle;
   4.100 +  Ptr<MacLow> m_low;
   4.101 +  DcfManager *m_dcfManager;
   4.102 +  Ptr<WifiPhy> m_phy;
   4.103 +
   4.104 +  Ptr<WifiRemoteStationManager> m_stationManager;
   4.105 +
   4.106 +  ForwardUpCallback m_forwardUp;
   4.107 +  Callback<void> m_linkUp;
   4.108 +  Callback<void> m_linkDown;
   4.109 +
   4.110 +  Ssid m_ssid;
   4.111 +
   4.112 +  Ptr<DcaTxop> m_dca;
   4.113 +
   4.114 +  virtual void FinishConfigureStandard (enum WifiPhyStandard standard);
   4.115 +
   4.116 +  virtual void Receive (Ptr<Packet> packet, const WifiMacHeader *hdr, const RadiotapHeader *radiotaphdr);
   4.117 +  virtual void TxOk (const WifiMacHeader &hdr);
   4.118 +  virtual void TxFailed (const WifiMacHeader &hdr);
   4.119 +
   4.120 +  void ForwardUp (Ptr<Packet> packet, Mac48Address from, Mac48Address to);
   4.121 +
   4.122 +  virtual void DeaggregateAmsduAndForward (Ptr<Packet> aggregatedPacket,
   4.123 +                                           const WifiMacHeader *hdr);
   4.124 +
   4.125 +  virtual void SendAddBaResponse (const MgtAddBaRequestHeader *reqHdr,
   4.126 +                                  Mac48Address originator);
   4.127 +
   4.128 +  bool m_qosSupported;
   4.129 +  void SetQosSupported (bool enable);
   4.130 +  bool GetQosSupported () const;
   4.131 +private:
   4.132 +  Ptr<DcaTxop> GetDcaTxop (void) const;
   4.133 +
   4.134 +  TracedCallback<const WifiMacHeader &> m_txOkCallback;
   4.135 +  TracedCallback<const WifiMacHeader &> m_txErrCallback;
   4.136 +};
   4.137 +
   4.138 +} // namespace ns3
   4.139 +
   4.140 +#endif /* MONITOR_WIFI_MAC_H */