OLD | NEW |
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) 2006, 2009 INRIA | 3 * Copyright (c) 2006, 2009 INRIA |
4 * Copyright (c) 2009 MIRKO BANCHI | 4 * Copyright (c) 2009 MIRKO BANCHI |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License version 2 as | 7 * it under the terms of the GNU General Public License version 2 as |
8 * published by the Free Software Foundation; | 8 * published by the Free Software Foundation; |
9 * | 9 * |
10 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
(...skipping 22 matching lines...) Expand all Loading... |
33 * Combination of valid MAC header type/subtype. | 33 * Combination of valid MAC header type/subtype. |
34 */ | 34 */ |
35 enum WifiMacType | 35 enum WifiMacType |
36 { | 36 { |
37 WIFI_MAC_CTL_CTLWRAPPER = 0, | 37 WIFI_MAC_CTL_CTLWRAPPER = 0, |
38 WIFI_MAC_CTL_RTS, | 38 WIFI_MAC_CTL_RTS, |
39 WIFI_MAC_CTL_CTS, | 39 WIFI_MAC_CTL_CTS, |
40 WIFI_MAC_CTL_ACK, | 40 WIFI_MAC_CTL_ACK, |
41 WIFI_MAC_CTL_BACKREQ, | 41 WIFI_MAC_CTL_BACKREQ, |
42 WIFI_MAC_CTL_BACKRESP, | 42 WIFI_MAC_CTL_BACKRESP, |
| 43 WIFI_MAC_CTL_END, |
| 44 WIFI_MAC_CTL_END_ACK, |
43 | 45 |
44 WIFI_MAC_MGT_BEACON, | 46 WIFI_MAC_MGT_BEACON, |
45 WIFI_MAC_MGT_ASSOCIATION_REQUEST, | 47 WIFI_MAC_MGT_ASSOCIATION_REQUEST, |
46 WIFI_MAC_MGT_ASSOCIATION_RESPONSE, | 48 WIFI_MAC_MGT_ASSOCIATION_RESPONSE, |
47 WIFI_MAC_MGT_DISASSOCIATION, | 49 WIFI_MAC_MGT_DISASSOCIATION, |
48 WIFI_MAC_MGT_REASSOCIATION_REQUEST, | 50 WIFI_MAC_MGT_REASSOCIATION_REQUEST, |
49 WIFI_MAC_MGT_REASSOCIATION_RESPONSE, | 51 WIFI_MAC_MGT_REASSOCIATION_RESPONSE, |
50 WIFI_MAC_MGT_PROBE_REQUEST, | 52 WIFI_MAC_MGT_PROBE_REQUEST, |
51 WIFI_MAC_MGT_PROBE_RESPONSE, | 53 WIFI_MAC_MGT_PROBE_RESPONSE, |
52 WIFI_MAC_MGT_AUTHENTICATION, | 54 WIFI_MAC_MGT_AUTHENTICATION, |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 * Fill the Address 4 field with the given address. | 156 * Fill the Address 4 field with the given address. |
155 * | 157 * |
156 * \param address the address to be used in the Address 4 field | 158 * \param address the address to be used in the Address 4 field |
157 */ | 159 */ |
158 void SetAddr4 (Mac48Address address); | 160 void SetAddr4 (Mac48Address address); |
159 /** | 161 /** |
160 * Set Type/Subtype values with the correct values depending | 162 * Set Type/Subtype values with the correct values depending |
161 * on the given type. | 163 * on the given type. |
162 * | 164 * |
163 * \param type the WifiMacType for the header | 165 * \param type the WifiMacType for the header |
| 166 * \param resetToDsFromDs whether the ToDs and FromDs flags |
| 167 * should be reset. |
164 */ | 168 */ |
165 void SetType (WifiMacType type); | 169 void SetType (WifiMacType type, bool resetToDsFromDs = true); |
| 170 /** |
| 171 * Set the Duration/ID field with the given raw uint16_t value. |
| 172 * |
| 173 * \param duration the raw duration in uint16_t |
| 174 */ |
| 175 void SetRawDuration (uint16_t duration); |
166 /** | 176 /** |
167 * Set the Duration/ID field with the given duration (Time object). | 177 * Set the Duration/ID field with the given duration (Time object). |
168 * The method converts the given time to microseconds. | 178 * The method converts the given time to microseconds. |
169 * | 179 * |
170 * \param duration the duration (Time object) | 180 * \param duration the duration (Time object) |
171 */ | 181 */ |
172 void SetDuration (Time duration); | 182 void SetDuration (Time duration); |
173 /** | 183 /** |
174 * Set the Duration/ID field with the given ID. | 184 * Set the Duration/ID field with the given ID. |
175 * | 185 * |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 */ | 312 */ |
303 bool IsData (void) const; | 313 bool IsData (void) const; |
304 /** | 314 /** |
305 * Return true if the Type is DATA and Subtype is one of the | 315 * Return true if the Type is DATA and Subtype is one of the |
306 * possible values for QoS DATA. | 316 * possible values for QoS DATA. |
307 * | 317 * |
308 * \return true if Type is QoS DATA, false otherwise | 318 * \return true if Type is QoS DATA, false otherwise |
309 */ | 319 */ |
310 bool IsQosData (void) const; | 320 bool IsQosData (void) const; |
311 /** | 321 /** |
| 322 * Return true if the header type is DATA and is not DATA_NULL. |
| 323 * |
| 324 * \return true if the header type is DATA and is not DATA_NULL, |
| 325 * false otherwise |
| 326 */ |
| 327 bool HasData (void) const; |
| 328 /** |
312 * Return true if the Type is Control. | 329 * Return true if the Type is Control. |
313 * | 330 * |
314 * \return true if Type is Control, false otherwise | 331 * \return true if Type is Control, false otherwise |
315 */ | 332 */ |
316 bool IsCtl (void) const; | 333 bool IsCtl (void) const; |
317 /** | 334 /** |
318 * Return true if the Type is Management. | 335 * Return true if the Type is Management. |
319 * | 336 * |
320 * \return true if Type is Management, false otherwise | 337 * \return true if Type is Management, false otherwise |
321 */ | 338 */ |
322 bool IsMgt (void) const; | 339 bool IsMgt (void) const; |
323 /** | 340 /** |
324 * Return true if the Type/Subtype is one of the possible CF-Poll headers. | 341 * Return true if the Type/Subtype is one of the possible CF-Poll headers. |
325 * | 342 * |
326 * \return true if the Type/Subtype is one of the possible CF-Poll headers, fa
lse otherwise | 343 * \return true if the Type/Subtype is one of the possible CF-Poll headers, fa
lse otherwise |
327 */ | 344 */ |
328 bool IsCfpoll (void) const; | 345 bool IsCfPoll (void) const; |
| 346 /** |
| 347 * Return true if the header is a CF-ACK header. |
| 348 * |
| 349 * \return true if the header is a CF_ACK header, false otherwise |
| 350 */ |
| 351 bool IsCfAck (void) const; |
| 352 /** |
| 353 * Return true if the header is a CF-END header. |
| 354 * |
| 355 * \return true if the header is a CF_END header, false otherwise |
| 356 */ |
| 357 bool IsCfEnd (void) const; |
| 358 /** |
| 359 * Return true if the header is a CF-END+CF_ACK header. |
| 360 * |
| 361 * \return true if the header is a CF-END+CF_ACK header, false otherwise |
| 362 */ |
| 363 bool IsCfEndAck (void) const; |
329 /** | 364 /** |
330 * Return true if the header is a RTS header. | 365 * Return true if the header is a RTS header. |
331 * | 366 * |
332 * \return true if the header is a RTS header, false otherwise | 367 * \return true if the header is a RTS header, false otherwise |
333 */ | 368 */ |
334 bool IsRts (void) const; | 369 bool IsRts (void) const; |
335 /** | 370 /** |
336 * Return true if the header is a CTS header. | 371 * Return true if the header is a CTS header. |
337 * | 372 * |
338 * \return true if the header is a CTS header, false otherwise | 373 * \return true if the header is a CTS header, false otherwise |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 */ | 458 */ |
424 bool IsAction () const; | 459 bool IsAction () const; |
425 /** | 460 /** |
426 * Check if the header is a Multihop action header. | 461 * Check if the header is a Multihop action header. |
427 * | 462 * |
428 * \return true if the header is a Multihop action header, | 463 * \return true if the header is a Multihop action header, |
429 * false otherwise | 464 * false otherwise |
430 */ | 465 */ |
431 bool IsMultihopAction () const; | 466 bool IsMultihopAction () const; |
432 /** | 467 /** |
| 468 * Return the raw duration from the Duration/ID field. |
| 469 * |
| 470 * \return the raw duration from the Duration/ID field |
| 471 */ |
| 472 uint16_t GetRawDuration (void) const; |
| 473 /** |
433 * Return the duration from the Duration/ID field (Time object). | 474 * Return the duration from the Duration/ID field (Time object). |
434 * | 475 * |
435 * \return the duration from the Duration/ID field (Time object) | 476 * \return the duration from the Duration/ID field (Time object) |
436 */ | 477 */ |
437 Time GetDuration (void) const; | 478 Time GetDuration (void) const; |
438 /** | 479 /** |
439 * Return the raw Sequence Control field. | 480 * Return the raw Sequence Control field. |
440 * | 481 * |
441 * \return the raw Sequence Control field | 482 * \return the raw Sequence Control field |
442 */ | 483 */ |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 uint8_t m_qosTid; ///< QOS TID | 622 uint8_t m_qosTid; ///< QOS TID |
582 uint8_t m_qosEosp; ///< QOS EOSP | 623 uint8_t m_qosEosp; ///< QOS EOSP |
583 uint8_t m_qosAckPolicy; ///< QOS ack policy | 624 uint8_t m_qosAckPolicy; ///< QOS ack policy |
584 uint8_t m_amsduPresent; ///< AMSDU present | 625 uint8_t m_amsduPresent; ///< AMSDU present |
585 uint8_t m_qosStuff; ///< QOS stuff | 626 uint8_t m_qosStuff; ///< QOS stuff |
586 }; | 627 }; |
587 | 628 |
588 } //namespace ns3 | 629 } //namespace ns3 |
589 | 630 |
590 #endif /* WIFI_MAC_HEADER_H */ | 631 #endif /* WIFI_MAC_HEADER_H */ |
OLD | NEW |