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) 2006, 2009 INRIA | 3 * Copyright (c) 2006, 2009 INRIA |
| 4 * Copyright (c) 2009 MIRKO BANCHI |
4 * | 5 * |
5 * 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 |
6 * 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· |
7 * published by the Free Software Foundation; | 8 * published by the Free Software Foundation; |
8 * | 9 * |
9 * 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, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 13 * GNU General Public License for more details. |
13 * | 14 * |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 349 |
349 void | 350 void |
350 QapWifiMac::ForwardDown (Ptr<const Packet> packet, Mac48Address from, Mac48Addre
ss to) | 351 QapWifiMac::ForwardDown (Ptr<const Packet> packet, Mac48Address from, Mac48Addre
ss to) |
351 { | 352 { |
352 /* For now Qos AP sends only Qos frame. In the future it should be able to· | 353 /* For now Qos AP sends only Qos frame. In the future it should be able to· |
353 send frames also to Non-Qos Stas. | 354 send frames also to Non-Qos Stas. |
354 */ | 355 */ |
355 NS_LOG_FUNCTION (this << packet << from << to); | 356 NS_LOG_FUNCTION (this << packet << from << to); |
356 WifiMacHeader hdr; | 357 WifiMacHeader hdr; |
357 hdr.SetType (WIFI_MAC_QOSDATA); | 358 hdr.SetType (WIFI_MAC_QOSDATA); |
358 hdr.SetQosAckPolicy (NORMAL_ACK); | 359 hdr.SetQosAckPolicy (WifiMacHeader::NORMAL_ACK); |
359 hdr.SetQosNoEosp (); | 360 hdr.SetQosNoEosp (); |
360 hdr.SetQosNoAmsdu (); | 361 hdr.SetQosNoAmsdu (); |
361 /* Transmission of multiple frames in the same· | 362 /* Transmission of multiple frames in the same· |
362 Txop is not supported for now */ | 363 Txop is not supported for now */ |
363 hdr.SetQosTxopLimit (0); | 364 hdr.SetQosTxopLimit (0); |
364 | 365 |
365 hdr.SetAddr1 (to); | 366 hdr.SetAddr1 (to); |
366 hdr.SetAddr2 (GetAddress ()); | 367 hdr.SetAddr2 (GetAddress ()); |
367 hdr.SetAddr3 (from); | 368 hdr.SetAddr3 (from); |
368 hdr.SetDsFrom (); | 369 hdr.SetDsFrom (); |
(...skipping 18 matching lines...) Expand all Loading... |
387 QapWifiMac::ForwardDown (Ptr<const Packet> packet, Mac48Address from, Mac48Addre
ss to, | 388 QapWifiMac::ForwardDown (Ptr<const Packet> packet, Mac48Address from, Mac48Addre
ss to, |
388 WifiMacHeader const *oldHdr) | 389 WifiMacHeader const *oldHdr) |
389 { | 390 { |
390 /* For now Qos AP sends only Qos frame. In the future it should be able to· | 391 /* For now Qos AP sends only Qos frame. In the future it should be able to· |
391 send frames also to Non-Qos Stas. | 392 send frames also to Non-Qos Stas. |
392 */ | 393 */ |
393 NS_LOG_FUNCTION (this << packet << from << to); | 394 NS_LOG_FUNCTION (this << packet << from << to); |
394 NS_ASSERT (oldHdr->IsQosData ()); | 395 NS_ASSERT (oldHdr->IsQosData ()); |
395 WifiMacHeader hdr; | 396 WifiMacHeader hdr; |
396 hdr.SetType (WIFI_MAC_QOSDATA); | 397 hdr.SetType (WIFI_MAC_QOSDATA); |
397 hdr.SetQosAckPolicy (NORMAL_ACK); | 398 hdr.SetQosAckPolicy (WifiMacHeader::NORMAL_ACK); |
398 hdr.SetQosNoEosp (); | 399 hdr.SetQosNoEosp (); |
399 hdr.SetQosNoAmsdu (); | 400 hdr.SetQosNoAmsdu (); |
400 /* Transmission of multiple frames in the same· | 401 /* Transmission of multiple frames in the same· |
401 Txop is not supported for now */ | 402 Txop is not supported for now */ |
402 hdr.SetQosTxopLimit (0); | 403 hdr.SetQosTxopLimit (0); |
403 hdr.SetQosTid (oldHdr->GetQosTid ()); | 404 hdr.SetQosTid (oldHdr->GetQosTid ()); |
404 | 405 |
405 hdr.SetAddr1 (to); | 406 hdr.SetAddr1 (to); |
406 hdr.SetAddr2 (GetAddress ()); | 407 hdr.SetAddr2 (GetAddress ()); |
407 hdr.SetAddr3 (from); | 408 hdr.SetAddr3 (from); |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 m_queues.insert (std::make_pair(AC_BK, m_bkEdca)); | 832 m_queues.insert (std::make_pair(AC_BK, m_bkEdca)); |
832 m_queues[AC_BK]->SetLow (m_low); | 833 m_queues[AC_BK]->SetLow (m_low); |
833 m_queues[AC_BK]->SetManager (m_dcfManager); | 834 m_queues[AC_BK]->SetManager (m_dcfManager); |
834 m_queues[AC_BK]->SetTypeOfStation (AP); | 835 m_queues[AC_BK]->SetTypeOfStation (AP); |
835 m_queues[AC_BK]->SetTxMiddle (m_txMiddle); | 836 m_queues[AC_BK]->SetTxMiddle (m_txMiddle); |
836 m_queues[AC_BK]->SetTxOkCallback (MakeCallback (&QapWifiMac::TxOk, this)); | 837 m_queues[AC_BK]->SetTxOkCallback (MakeCallback (&QapWifiMac::TxOk, this)); |
837 m_queues[AC_BK]->SetTxFailedCallback (MakeCallback (&QapWifiMac::TxFailed, thi
s)); | 838 m_queues[AC_BK]->SetTxFailedCallback (MakeCallback (&QapWifiMac::TxFailed, thi
s)); |
838 } | 839 } |
839 | 840 |
840 } //namespace ns3 | 841 } //namespace ns3 |
LEFT | RIGHT |