Left: | ||
Right: |
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) 2009, 2010 MIRKO BANCHI | 3 * Copyright (c) 2009, 2010 MIRKO BANCHI |
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 |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
363 } | 363 } |
364 else if ((*it)->hdr.GetSequenceNumber () > (agreement->second.first.Ge tStartingSequence () + 63) % 4096) | 364 else if ((*it)->hdr.GetSequenceNumber () > (agreement->second.first.Ge tStartingSequence () + 63) % 4096) |
365 { | 365 { |
366 agreement->second.first.SetStartingSequence ((*it)->hdr.GetSequenc eNumber ()); | 366 agreement->second.first.SetStartingSequence ((*it)->hdr.GetSequenc eNumber ()); |
367 } | 367 } |
368 packet = (*it)->packet->Copy (); | 368 packet = (*it)->packet->Copy (); |
369 hdr = (*it)->hdr; | 369 hdr = (*it)->hdr; |
370 hdr.SetRetry (); | 370 hdr.SetRetry (); |
371 *tstamp = (*it)->timestamp; | 371 *tstamp = (*it)->timestamp; |
372 NS_LOG_INFO ("Retry packet seq = " << hdr.GetSequenceNumber ()); | 372 NS_LOG_INFO ("Retry packet seq = " << hdr.GetSequenceNumber ()); |
373 Mac48Address recipient = hdr.GetAddr1 (); | 373 Mac48Address recip = hdr.GetAddr1 (); |
374 if (!agreement->second.first.IsHtSupported () | 374 if (!agreement->second.first.IsHtSupported () |
375 && (ExistsAgreementInState (recipient, tid, OriginatorBlockAckAgre ement::ESTABLISHED) | 375 && (ExistsAgreementInState (recip, tid, OriginatorBlockAckAgreemen t::ESTABLISHED) |
376 || SwitchToBlockAckIfNeeded (recipient, tid, hdr.GetSequenceNu mber ()))) | 376 || SwitchToBlockAckIfNeeded (recip, tid, hdr.GetSequenceNumber ()))) |
377 { | 377 { |
378 hdr.SetQosAckPolicy (WifiMacHeader::BLOCK_ACK); | 378 hdr.SetQosAckPolicy (WifiMacHeader::BLOCK_ACK); |
379 } | 379 } |
380 else | 380 else |
381 { | 381 { |
382 /* From section 9.10.3 in IEEE802.11e standard: | 382 /* From section 9.10.3 in IEEE802.11e standard: |
383 * In order to improve efficiency, originators using the Block Ack facility | 383 * In order to improve efficiency, originators using the Block Ack facility |
384 * may send MPDU frames with the Ack Policy subfield in QoS contro l frames | 384 * may send MPDU frames with the Ack Policy subfield in QoS contro l frames |
385 * set to Normal Ack if only a few MPDUs are available for transmi ssion.[...] | 385 * set to Normal Ack if only a few MPDUs are available for transmi ssion.[...] |
386 * When there are sufficient number of MPDUs, the originator may s witch back to | 386 * When there are sufficient number of MPDUs, the originator may s witch back to |
(...skipping 15 matching lines...) Expand all Loading... | |
402 std::list<PacketQueueI>::const_iterator it = m_retryPackets.begin (); | 402 std::list<PacketQueueI>::const_iterator it = m_retryPackets.begin (); |
403 for (; it != m_retryPackets.end (); it++) | 403 for (; it != m_retryPackets.end (); it++) |
404 { | 404 { |
405 if (!(*it)->hdr.IsQosData ()) | 405 if (!(*it)->hdr.IsQosData ()) |
406 { | 406 { |
407 NS_FATAL_ERROR ("Packet in blockAck manager retry queue is not Qos Dat a"); | 407 NS_FATAL_ERROR ("Packet in blockAck manager retry queue is not Qos Dat a"); |
408 } | 408 } |
409 if ((*it)->hdr.GetAddr1 () == recipient && (*it)->hdr.GetQosTid () == tid && (*it)->hdr.GetSequenceNumber () == seqnumber) | 409 if ((*it)->hdr.GetAddr1 () == recipient && (*it)->hdr.GetQosTid () == tid && (*it)->hdr.GetSequenceNumber () == seqnumber) |
410 { | 410 { |
411 WifiMacHeader hdr = (*it)->hdr; | 411 WifiMacHeader hdr = (*it)->hdr; |
412 uint8_t tid = hdr.GetQosTid (); | 412 uint8_t hdrTid = hdr.GetQosTid (); |
413 Mac48Address recipient = hdr.GetAddr1 (); | 413 Mac48Address hdrRecipient = hdr.GetAddr1 (); |
414 | 414 |
415 AgreementsI i = m_agreements.find (std::make_pair (recipient, tid)); | 415 AgreementsI i = m_agreements.find (std::make_pair (hdrRecipient, hdrTi d)); |
S. Deronne
2018/05/03 21:47:21
all those recipient params are not needed, I have
ammo6818-vandals.uidaho.edu
2018/05/07 15:05:54
Ok, I will ignore this file for now.
| |
416 i->second.second.erase ((*it)); | 416 i->second.second.erase ((*it)); |
417 | 417 |
418 m_retryPackets.erase (it); | 418 m_retryPackets.erase (it); |
419 NS_LOG_DEBUG ("Removed Packet from retry queue = " << hdr.GetSequenceN umber () << " " << +tid << " " << recipient << " Buffer Size = " << m_retryPacke ts.size ()); | 419 NS_LOG_DEBUG ("Removed Packet from retry queue = " << hdr.GetSequenceN umber () << " " << +tid << " " << recipient << " Buffer Size = " << m_retryPacke ts.size ()); |
420 return true; | 420 return true; |
421 } | 421 } |
422 } | 422 } |
423 return false; | 423 return false; |
424 } | 424 } |
425 | 425 |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
936 if (it == m_retryPackets.end ()) | 936 if (it == m_retryPackets.end ()) |
937 { | 937 { |
938 m_retryPackets.push_back (item); | 938 m_retryPackets.push_back (item); |
939 } | 939 } |
940 } | 940 } |
941 } | 941 } |
942 } | 942 } |
943 } | 943 } |
944 | 944 |
945 } //namespace ns3 | 945 } //namespace ns3 |
OLD | NEW |