LEFT | RIGHT |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2008 INRIA | 3 * Copyright (c) 2008 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with this program; if not, write to the Free Software | 15 * along with this program; if not, write to the Free Software |
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 17 * |
18 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> | 18 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
19 */ | 19 */ |
20 #ifndef WIFI_MAC_H | 20 #ifndef WIFI_MAC_H |
21 #define WIFI_MAC_H | 21 #define WIFI_MAC_H |
22 | 22 |
23 #include "ns3/packet.h" | 23 #include "ns3/packet.h" |
24 #include "ns3/mac48-address.h" | 24 #include "ns3/mac48-address.h" |
25 | 25 |
26 #include "wifi-phy.h" | 26 #include "wifi-phy.h" |
27 #include "dca-txop.h" | |
28 #include "edca-txop-n.h" | |
29 #include "wifi-remote-station-manager.h" | 27 #include "wifi-remote-station-manager.h" |
30 #include "ssid.h" | 28 #include "ssid.h" |
31 #include "qos-utils.h" | 29 #include "qos-utils.h" |
32 | 30 |
33 #include <map> | |
34 | |
35 namespace ns3 { | 31 namespace ns3 { |
36 | 32 |
37 class Dcf; | 33 class Dcf; |
38 class MacLow; | |
39 class MacRxMiddle; | |
40 class MacTxMiddle; | |
41 class DcfManager; | |
42 | 34 |
43 /** | 35 /** |
44 * \brief base class for all MAC-level wifi objects. | 36 * \brief base class for all MAC-level wifi objects. |
45 * | 37 * |
46 * This class encapsulates all the low-level MAC functionality | 38 * This class encapsulates all the low-level MAC functionality |
47 * DCA, EDCA, etc) and all the high-level MAC functionality | 39 * DCA, EDCA, etc) and all the high-level MAC functionality |
48 * (association/disassociation state machines). | 40 * (association/disassociation state machines). |
49 * | 41 * |
50 */ | 42 */ |
51 class WifiMac : public Object | 43 class WifiMac : public Object |
52 { | 44 { |
53 public: | 45 public: |
54 static TypeId GetTypeId (void); | 46 static TypeId GetTypeId (void); |
55 | 47 ·· |
56 WifiMac (); | |
57 virtual ~WifiMac (); | |
58 | |
59 /** | 48 /** |
60 * \param slotTime the slot duration | 49 * \param slotTime the slot duration |
61 */ | 50 */ |
62 void SetSlot (Time slotTime); | 51 virtual void SetSlot (Time slotTime) = 0; |
63 /** | 52 /** |
64 * \param sifs the sifs duration | 53 * \param sifs the sifs duration |
65 */ | 54 */ |
66 void SetSifs (Time sifs); | 55 virtual void SetSifs (Time sifs) = 0; |
67 /** | 56 /** |
68 * \param eifsNoDifs the duration of an EIFS minus DIFS. | 57 * \param eifsNoDifs the duration of an EIFS minus DIFS. |
69 * | 58 * |
70 * This value is used to calculate the EIFS depending | 59 * This value is used to calculate the EIFS depending |
71 * on AIFSN. | 60 * on AIFSN. |
72 */ | 61 */ |
73 void SetEifsNoDifs (Time eifsNoDifs); | 62 virtual void SetEifsNoDifs (Time eifsNoDifs) = 0; |
74 /** | 63 /** |
75 * \param pifs the pifs duration. | 64 * \param pifs the pifs duration. |
76 */ | 65 */ |
77 void SetPifs (Time pifs); | 66 virtual void SetPifs (Time pifs) = 0; |
78 /** | 67 /** |
79 * \param ctsTimeout the duration of a CTS timeout. | 68 * \param ctsTimeout the duration of a CTS timeout. |
80 */ | 69 */ |
81 void SetCtsTimeout (Time ctsTimeout); | 70 virtual void SetCtsTimeout (Time ctsTimeout) = 0; |
82 /** | 71 /** |
83 * \param ackTimeout the duration of an ACK timeout. | 72 * \param ackTimeout the duration of an ACK timeout. |
84 */ | 73 */ |
85 void SetAckTimeout (Time ackTimeout); | 74 virtual void SetAckTimeout (Time ackTimeout) = 0; |
86 | |
87 /** | 75 /** |
88 * \param delay the max propagation delay. | 76 * \param delay the max propagation delay. |
89 * | 77 * |
90 * Unused for now. | 78 * Unused for now. |
91 */ | 79 */ |
92 void SetMaxPropagationDelay (Time delay); | 80 void SetMaxPropagationDelay (Time delay); |
93 | 81 |
94 /** | 82 /** |
95 * \returns the current PIFS duration. | 83 * \returns the current PIFS duration. |
96 */ | 84 */ |
97 Time GetPifs (void) const; | 85 virtual Time GetPifs (void) const = 0; |
98 /** | 86 /** |
99 * \returns the current SIFS duration. | 87 * \returns the current SIFS duration. |
100 */ | 88 */ |
101 Time GetSifs (void) const; | 89 virtual Time GetSifs (void) const = 0; |
102 /** | 90 /** |
103 * \returns the current slot duration. | 91 * \returns the current slot duration. |
104 */ | 92 */ |
105 Time GetSlot (void) const; | 93 virtual Time GetSlot (void) const = 0; |
106 /** | 94 /** |
107 * \returns the current EIFS minus DIFS duration | 95 * \returns the current EIFS minus DIFS duration |
108 */ | 96 */ |
109 Time GetEifsNoDifs (void) const; | 97 virtual Time GetEifsNoDifs (void) const = 0; |
110 /** | 98 /** |
111 * \returns the current CTS timeout duration. | 99 * \returns the current CTS timeout duration. |
112 */ | 100 */ |
113 Time GetCtsTimeout (void) const; | 101 virtual Time GetCtsTimeout (void) const = 0; |
114 /** | 102 /** |
115 * \returns the current ACK timeout duration. | 103 * \returns the current ACK timeout duration. |
116 */ | 104 */ |
117 Time GetAckTimeout (void) const; | 105 virtual Time GetAckTimeout (void) const = 0; |
118 /** | 106 /** |
119 * Unused for now. | 107 * Unused for now. |
120 */ | 108 */ |
121 Time GetMsduLifetime (void) const; | 109 Time GetMsduLifetime (void) const; |
122 /** | 110 /** |
123 * Unused for now. | 111 * Unused for now. |
124 */ | 112 */ |
125 Time GetMaxPropagationDelay (void) const; | 113 Time GetMaxPropagationDelay (void) const; |
126 | 114 |
127 /** | 115 /** |
128 * \returns the MAC address associated to this MAC layer. | 116 * \returns the MAC address associated to this MAC layer. |
129 */ | 117 */ |
130 virtual Mac48Address GetAddress (void) const; | 118 virtual Mac48Address GetAddress (void) const = 0; |
131 /** | 119 /** |
132 * \returns the ssid which this MAC layer is going to try to stay in. | 120 * \returns the ssid which this MAC layer is going to try to stay in. |
133 */ | 121 */ |
134 virtual Ssid GetSsid (void) const; | 122 virtual Ssid GetSsid (void) const = 0; |
135 /** | 123 /** |
136 * \param address the current address of this MAC layer. | 124 * \param address the current address of this MAC layer. |
137 */ | 125 */ |
138 virtual void SetAddress (Mac48Address address); | 126 virtual void SetAddress (Mac48Address address) = 0; |
139 /** | 127 /** |
140 * \param ssid the current ssid of this MAC layer. | 128 * \param ssid the current ssid of this MAC layer. |
141 */ | 129 */ |
142 virtual void SetSsid (Ssid ssid); | 130 virtual void SetSsid (Ssid ssid) = 0; |
143 /** | |
144 * \param bssid the BSSID of the network that this device belongs to. | |
145 */ | |
146 virtual void SetBssid (Mac48Address bssid); | |
147 /** | 131 /** |
148 * \returns the bssid of the network this device belongs to. | 132 * \returns the bssid of the network this device belongs to. |
149 */ | 133 */ |
150 virtual Mac48Address GetBssid (void) const; | 134 virtual Mac48Address GetBssid (void) const = 0; |
151 | 135 |
152 /** | 136 /** |
153 * \param packet the packet to send. | 137 * \param packet the packet to send. |
154 * \param to the address to which the packet should be sent. | 138 * \param to the address to which the packet should be sent. |
155 * \param from the address from which the packet should be sent. | 139 * \param from the address from which the packet should be sent. |
156 * | 140 * |
157 * The packet should be enqueued in a tx queue, and should be | 141 * The packet should be enqueued in a tx queue, and should be |
158 * dequeued as soon as the channel access function determines that | 142 * dequeued as soon as the DCF function determines that |
159 * access is granted to this MAC. The extra parameter "from" allows | 143 * access it granted to this MAC. The extra parameter "from" allows |
160 * this device to operate in a bridged mode, forwarding received | 144 * this device to operate in a bridged mode, forwarding received |
161 * frames without altering the source address. | 145 * frames without altering the source address. |
162 */ | 146 */ |
163 virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address
from); | 147 virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address
from) = 0; |
164 virtual bool SupportsSendFrom (void) const; | |
165 | |
166 /** | 148 /** |
167 * \param packet the packet to send. | 149 * \param packet the packet to send. |
168 * \param to the address to which the packet should be sent. | 150 * \param to the address to which the packet should be sent. |
169 * | 151 * |
170 * The packet should be enqueued in a tx queue, and should be | 152 * The packet should be enqueued in a tx queue, and should be |
171 * dequeued as soon as the channel access function determines that | 153 * dequeued as soon as the DCF function determines that |
172 * access is granted to this MAC. | 154 * access it granted to this MAC. |
173 */ | 155 */ |
174 virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to) = 0; | 156 virtual void Enqueue (Ptr<const Packet> packet, Mac48Address to) = 0; |
| 157 virtual bool SupportsSendFrom (void) const = 0; |
175 /** | 158 /** |
176 * \param phy the physical layer attached to this MAC. | 159 * \param phy the physical layer attached to this MAC. |
177 */ | 160 */ |
178 virtual void SetWifiPhy (Ptr<WifiPhy> phy); | 161 virtual void SetWifiPhy (Ptr<WifiPhy> phy) = 0; |
179 /** | |
180 * \returns the physical layer attached to this MAC. | |
181 */ | |
182 virtual Ptr<WifiPhy> GetWifiPhy () const; | |
183 /** | 162 /** |
184 * \param stationManager the station manager attached to this MAC. | 163 * \param stationManager the station manager attached to this MAC. |
185 */ | 164 */ |
186 virtual void SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> statio
nManager); | 165 virtual void SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> statio
nManager) = 0; |
187 /** | |
188 * \returns the station manager attached to this MAC. | |
189 */ | |
190 virtual Ptr<WifiRemoteStationManager> GetWifiRemoteStationManager () const; | |
191 | 166 |
192 /** | 167 /** |
193 * This type defines the callback of a higher layer that a | 168 * This type defines the callback of a higher layer that a |
194 * WifiMac(-derived) object invokes to pass a packet up the stack. | 169 * WifiMac(-derived) object invokes to pass a packet up the stack. |
195 * | 170 * |
196 * \param packet the packet that has been received. | 171 * \param packet the packet that has been received. |
197 * \param from the MAC address of the device that sent the packet. | 172 * \param from the MAC address of the device that sent the packet. |
198 * \param to the MAC address ot the device that the packet is | 173 * \param to the MAC address ot the device that the packet is |
199 * destined for. | 174 * destined for. |
200 */ | 175 */ |
201 typedef Callback<void, Ptr<Packet>, Mac48Address, Mac48Address> ForwardUpCallb
ack; | 176 typedef Callback<void, Ptr<Packet>, Mac48Address, Mac48Address> ForwardUpCallb
ack; |
| 177 |
202 /** | 178 /** |
203 * \param upCallback the callback to invoke when a packet must be | 179 * \param upCallback the callback to invoke when a packet must be |
204 * forwarded up the stack. | 180 * forwarded up the stack. |
205 */ | 181 */ |
206 virtual void SetForwardUpCallback (ForwardUpCallback upCallback); | 182 virtual void SetForwardUpCallback (ForwardUpCallback upCallback) = 0; |
207 /** | 183 /** |
208 * \param linkUp the callback to invoke when the link becomes up. | 184 * \param linkUp the callback to invoke when the link becomes up. |
209 */ | 185 */ |
210 virtual void SetLinkUpCallback (Callback<void> linkUp); | 186 virtual void SetLinkUpCallback (Callback<void> linkUp) = 0; |
211 /** | 187 /** |
212 * \param linkDown the callback to invoke when the link becomes down. | 188 * \param linkDown the callback to invoke when the link becomes down. |
213 */ | 189 */ |
214 virtual void SetLinkDownCallback (Callback<void> linkDown); | 190 virtual void SetLinkDownCallback (Callback<void> linkDown) = 0; |
215 /* Next functions are not pure virtual so non Qos WifiMacs are not | 191 |
216 * forced to implement them. | 192 /** |
217 */ | 193 * Public method used to fire a MacTx trace. Implemented for encapsulation· |
218 virtual void SetBasicBlockAckTimeout (Time blockAckTimeout); | |
219 virtual Time GetBasicBlockAckTimeout (void) const; | |
220 virtual void SetCompressedBlockAckTimeout (Time blockAckTimeout); | |
221 virtual Time GetCompressedBlockAckTimeout (void) const; | |
222 | |
223 /** | |
224 * Public method used to fire a MacTx trace. Implemented for encapsulation | |
225 * purposes. | 194 * purposes. |
226 */ | 195 */ |
227 void NotifyTx (Ptr<const Packet> packet); | 196 void NotifyTx (Ptr<const Packet> packet); |
228 | 197 |
229 /** | 198 /** |
230 * Public method used to fire a MacTxDrop trace. Implemented for encapsulatio
n | 199 * Public method used to fire a MacTxDrop trace. Implemented for encapsulatio
n |
231 * purposes. | 200 * purposes. |
232 */ | 201 */ |
233 void NotifyTxDrop (Ptr<const Packet> packet); | 202 void NotifyTxDrop (Ptr<const Packet> packet); |
234 | 203 |
235 /** | 204 /** |
236 * Public method used to fire a MacRx trace. Implemented for encapsulation | 205 * Public method used to fire a MacRx trace. Implemented for encapsulation |
237 * purposes. | 206 * purposes. |
238 */ | 207 */ |
239 void NotifyRx (Ptr<const Packet> packet); | 208 void NotifyRx (Ptr<const Packet> packet); |
240 | 209 |
241 /** | 210 /** |
242 * Public method used to fire a MacPromiscRx trace. Implemented for encapsula
tion | 211 * Public method used to fire a MacPromiscRx trace. Implemented for encapsula
tion |
243 * purposes. | 212 * purposes. |
244 */ | 213 */ |
245 void NotifyPromiscRx (Ptr<const Packet> packet); | 214 void NotifyPromiscRx (Ptr<const Packet> packet); |
246 | 215 |
247 /** | 216 /** |
248 * Public method used to fire a MacRxDrop trace. Implemented for encapsulatio
n | 217 * Public method used to fire a MacRxDrop trace. Implemented for encapsulatio
n |
249 * purposes. | 218 * purposes. |
250 */ | 219 */ |
251 void NotifyRxDrop (Ptr<const Packet> packet); | 220 void NotifyRxDrop (Ptr<const Packet> packet); |
252 /** | 221 /** |
253 * \param standard the wifi standard to be configured | 222 * \param standard the wifi standard to be configured |
254 */ | 223 */ |
255 void ConfigureStandard (enum WifiPhyStandard standard); | 224 void ConfigureStandard (enum WifiPhyStandard standard); |
256 | 225 |
257 protected: | 226 protected: |
258 virtual void DoStart (); | |
259 virtual void DoDispose (); | |
260 | |
261 MacRxMiddle *m_rxMiddle; | |
262 MacTxMiddle *m_txMiddle; | |
263 Ptr<MacLow> m_low; | |
264 DcfManager *m_dcfManager; | |
265 Ptr<WifiPhy> m_phy; | |
266 | |
267 Ptr<WifiRemoteStationManager> m_stationManager; | |
268 | |
269 ForwardUpCallback m_forwardUp; | |
270 Callback<void> m_linkUp; | |
271 Callback<void> m_linkDown; | |
272 | |
273 Ssid m_ssid; | |
274 | |
275 /** This holds a pointer to the DCF instance for this WifiMac - used | |
276 for transmission of frames to non-QoS peers. */ | |
277 Ptr<DcaTxop> m_dca; | |
278 | |
279 /** This type defines a mapping between an Access Category index, | |
280 and a pointer to the corresponding channel access function */ | |
281 typedef std::map<AcIndex, Ptr<EdcaTxopN> > EdcaQueues; | |
282 /** This is a map from Access Category index to the corresponding | |
283 channel access function */ | |
284 EdcaQueues m_edca; | |
285 | |
286 /** | |
287 * \param standard the phy standard to be used | |
288 * | |
289 * This method is called by ns3::WifiMac::ConfigureStandard to | |
290 * complete the configuration process for a requested phy standard. | |
291 */ | |
292 void FinishConfigureStandard (enum WifiPhyStandard standard); | |
293 | |
294 /** | |
295 * This method is invoked by a subclass to specify what type of | |
296 * station it is implementing. This is something that the channel | |
297 * access functions (instantiated within this class as EdcaTxopN's) | |
298 * need to know. | |
299 * | |
300 * \param type the type of station. | |
301 */ | |
302 void SetTypeOfStation (TypeOfStation type); | |
303 | |
304 /** | |
305 * This method acts as the MacRxMiddle receive callback and is | |
306 * invoked to notify us that a frame has been received. The | |
307 * implementation is intended to capture logic that is going to be | |
308 * common to all (or most) derived classes. Specifically, handling | |
309 * of Block Ack managment frames is dealt with here. | |
310 * | |
311 * This method will need, however, to be overriden by derived | |
312 * classes so that they can perform their data handling before | |
313 * invoking the base version. | |
314 * | |
315 * \param packet the packet that has been received. | |
316 * \param hdr a pointer to the MAC header of the received frame. | |
317 */ | |
318 virtual void Receive (Ptr<Packet> packet, const WifiMacHeader *hdr); | |
319 virtual void TxOk (const WifiMacHeader &hdr); | |
320 virtual void TxFailed (const WifiMacHeader &hdr); | |
321 | |
322 void ForwardUp (Ptr<Packet> packet, Mac48Address from, Mac48Address to); | |
323 void ConfigureDcf (Ptr<Dcf> dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex
ac); | 227 void ConfigureDcf (Ptr<Dcf> dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex
ac); |
324 void ConfigureCCHDcf (Ptr<Dcf> dcf, uint32_t cwmin, uint32_t cwmax, enum AcInd
ex ac); | 228 void ConfigureCCHDcf (Ptr<Dcf> dcf, uint32_t cwmin, uint32_t cwmax, enum AcInd
ex ac); |
325 | 229 |
326 /** | |
327 * This method can be called to de-aggregate an A-MSDU and forward | |
328 * the constituent packets up the stack. | |
329 * | |
330 * \param aggregatedPacket the Packet containing the A-MSDU. | |
331 * \param hdr a pointer to the MAC header for \c aggregatedPacket. | |
332 */ | |
333 virtual void DeaggregateAmsduAndForward (Ptr<Packet> aggregatedPacket, | |
334 const WifiMacHeader *hdr); | |
335 | |
336 /** | |
337 * This method can be called to accept a received ADDBA Request. An | |
338 * ADDBA Response will be constructed and queued for transmission. | |
339 * | |
340 * \param reqHdr a pointer to the received ADDBA Request header. | |
341 * \param originator the MAC address of the originator. | |
342 */ | |
343 virtual void SendAddBaResponse (const MgtAddBaRequestHeader *reqHdr, | |
344 Mac48Address originator); | |
345 | |
346 /** | |
347 * This Boolean is set \c true iff this WifiMac is to model | |
348 * 802.11e/WMM style Quality of Service. It is exposed through the | |
349 * attribute system. | |
350 * | |
351 * At the moment, this flag is the sole selection between QoS and | |
352 * non-QoS operation for the STA (whether IBSS, AP, or | |
353 * non-AP). Ultimately, we will want a QoS-enabled STA to be able to | |
354 * fall back to non-QoS operation with a non-QoS peer. This'll | |
355 * require further intelligence - i.e., per-association QoS | |
356 * state. Having a big switch seems like a good intermediate stage, | |
357 * however. | |
358 */ | |
359 bool m_qosSupported; | |
360 /** Set accessor for the \c m_qosSupported member */ | |
361 void SetQosSupported (bool enable); | |
362 /** Get accessor for the \c m_qosSupported member */ | |
363 bool GetQosSupported () const; | |
364 private: | |
365 static Time GetDefaultMaxPropagationDelay (void); | 230 static Time GetDefaultMaxPropagationDelay (void); |
366 static Time GetDefaultSlot (void); | 231 static Time GetDefaultSlot (void); |
367 static Time GetDefaultSifs (void); | 232 static Time GetDefaultSifs (void); |
368 static Time GetDefaultEifsNoDifs (void); | 233 static Time GetDefaultEifsNoDifs (void); |
369 static Time GetDefaultCtsAckDelay (void); | 234 static Time GetDefaultCtsAckDelay (void); |
370 static Time GetDefaultCtsAckTimeout (void); | 235 static Time GetDefaultCtsAckTimeout (void); |
371 static Time GetDefaultBasicBlockAckDelay (void); | 236 |
372 static Time GetDefaultBasicBlockAckTimeout (void); | 237 private: |
373 static Time GetDefaultCompressedBlockAckDelay (void); | 238 /** |
374 static Time GetDefaultCompressedBlockAckTimeout (void); | 239 * \param standard the phy standard to be used |
375 | 240 * |
376 /** | 241 * This method is called by ns3::WifiMac::ConfigureStandard to complete |
377 * This method is a private utility invoked to configure the channel | 242 * the configuration process for a requested phy standard. Subclasses should |
378 * access function for the specified Access Category. | 243 * implement this method to configure their dcf queues according to the |
379 * | 244 * requested standard. |
380 * \param ac the Access Category index of the queue to initialise. | 245 */ |
381 */ | 246 virtual void FinishConfigureStandard (enum WifiPhyStandard standard) = 0; |
382 void SetupEdcaQueue (enum AcIndex ac); | |
383 | |
384 /** Accessor for the DCF object */ | |
385 Ptr<DcaTxop> GetDcaTxop (void) const; | |
386 | |
387 /** Accessor for the AC_VO channel access function */ | |
388 Ptr<EdcaTxopN> GetVOQueue (void) const; | |
389 /** Accessor for the AC_VI channel access function */ | |
390 Ptr<EdcaTxopN> GetVIQueue (void) const; | |
391 /** Accessor for the AC_BE channel access function */ | |
392 Ptr<EdcaTxopN> GetBEQueue (void) const; | |
393 /** Accessor for the AC_BK channel access function */ | |
394 Ptr<EdcaTxopN> GetBKQueue (void) const; | |
395 | 247 |
396 Time m_maxPropagationDelay; | 248 Time m_maxPropagationDelay; |
397 | 249 |
398 void Configure80211a (void); | 250 void Configure80211a (void); |
399 void Configure80211b (void); | 251 void Configure80211b (void); |
400 void Configure80211_10Mhz (void); | 252 void Configure80211_10Mhz (void); |
401 void Configure80211_5Mhz (); | 253 void Configure80211_5Mhz (); |
402 void Configure80211p_CCH (void); | 254 void Configure80211p_CCH (void); |
403 void Configure80211p_SCH (void); | 255 void Configure80211p_SCH (void); |
404 | 256 |
405 /** | 257 /** |
406 * The trace source fired when packets come into the "top" of the device | 258 * The trace source fired when packets come into the "top" of the device |
407 * at the L3/L2 transition, before being queued for transmission. | 259 * at the L3/L2 transition, before being queued for transmission. |
408 * | 260 * |
409 * \see class CallBackTraceSource | 261 * \see class CallBackTraceSource |
410 */ | 262 */ |
411 TracedCallback<Ptr<const Packet> > m_macTxTrace; | 263 TracedCallback<Ptr<const Packet> > m_macTxTrace; |
412 | 264 |
413 /** | 265 /** |
414 * The trace source fired when packets coming into the "top" of the device | 266 * The trace source fired when packets coming into the "top" of the device |
415 * are dropped at the MAC layer during transmission. | 267 * are dropped at the MAC layer during transmission. |
416 * | 268 * |
417 * \see class CallBackTraceSource | 269 * \see class CallBackTraceSource |
418 */ | 270 */ |
419 TracedCallback<Ptr<const Packet> > m_macTxDropTrace; | 271 TracedCallback<Ptr<const Packet> > m_macTxDropTrace; |
420 | 272 |
421 /** | 273 /** |
422 * The trace source fired for packets successfully received by the device | 274 * The trace source fired for packets successfully received by the device |
423 * immediately before being forwarded up to higher layers (at the L2/L3 | 275 * immediately before being forwarded up to higher layers (at the L2/L3 |
424 * transition). This is a promiscuous trace. | 276 * transition). This is a promiscuous trace. |
425 * | 277 * |
426 * \see class CallBackTraceSource | 278 * \see class CallBackTraceSource |
427 */ | 279 */ |
428 TracedCallback<Ptr<const Packet> > m_macPromiscRxTrace; | 280 TracedCallback<Ptr<const Packet> > m_macPromiscRxTrace; |
429 | 281 |
430 /** | 282 /** |
431 * The trace source fired for packets successfully received by the device | 283 * The trace source fired for packets successfully received by the device |
432 * immediately before being forwarded up to higher layers (at the L2/L3 | 284 * immediately before being forwarded up to higher layers (at the L2/L3 |
433 * transition). This is a non- promiscuous trace. | 285 * transition). This is a non- promiscuous trace. |
434 * | 286 * |
435 * \see class CallBackTraceSource | 287 * \see class CallBackTraceSource |
436 */ | 288 */ |
437 TracedCallback<Ptr<const Packet> > m_macRxTrace; | 289 TracedCallback<Ptr<const Packet> > m_macRxTrace; |
438 | 290 |
439 /** | 291 /** |
440 * The trace source fired when packets coming into the "top" of the device | 292 * The trace source fired when packets coming into the "top" of the device |
441 * are dropped at the MAC layer during reception. | 293 * are dropped at the MAC layer during reception. |
442 * | 294 * |
443 * \see class CallBackTraceSource | 295 * \see class CallBackTraceSource |
444 */ | 296 */ |
445 TracedCallback<Ptr<const Packet> > m_macRxDropTrace; | 297 TracedCallback<Ptr<const Packet> > m_macRxDropTrace; |
446 | 298 |
447 TracedCallback<const WifiMacHeader &> m_txOkCallback; | |
448 | |
449 TracedCallback<const WifiMacHeader &> m_txErrCallback; | |
450 }; | 299 }; |
451 | 300 |
452 } // namespace ns3 | 301 } // namespace ns3 |
453 | 302 |
454 #endif /* WIFI_MAC_H */ | 303 #endif /* WIFI_MAC_H */ |
LEFT | RIGHT |