INET Framework for OMNeT++/OMNEST
inet::ieee80211::LegacyDuplicateRemoval Class Reference

#include <LegacyDuplicateRemoval.h>

Inheritance diagram for inet::ieee80211::LegacyDuplicateRemoval:
inet::ieee80211::IDuplicateRemoval

Public Member Functions

virtual bool isDuplicate (Ieee80211DataOrMgmtFrame *frame) override
 
- Public Member Functions inherited from inet::ieee80211::IDuplicateRemoval
virtual ~IDuplicateRemoval ()
 

Protected Attributes

std::map< MACAddress, SequenceControlFieldlastSeenSeqNumCache
 

Member Function Documentation

bool inet::ieee80211::LegacyDuplicateRemoval::isDuplicate ( Ieee80211DataOrMgmtFrame frame)
overridevirtual

Implements inet::ieee80211::IDuplicateRemoval.

25 {
26  ASSERT(frame->getType() != ST_DATA_WITH_QOS);
27  const MACAddress& address = frame->getTransmitterAddress();
28  SequenceControlField seqVal(frame);
29  auto it = lastSeenSeqNumCache.find(address);
30  if (it == lastSeenSeqNumCache.end())
31  lastSeenSeqNumCache.insert(std::pair<MACAddress, SequenceControlField>(address, seqVal));
32  else if (it->second.getSequenceNumber() == seqVal.getSequenceNumber() && it->second.getFragmentNumber() == seqVal.getFragmentNumber() && frame->getRetry())
33  return true;
34  else
35  it->second = seqVal;
36  return false;
37 }
std::map< MACAddress, SequenceControlField > lastSeenSeqNumCache
Definition: LegacyDuplicateRemoval.h:32
Definition: Ieee80211Frame_m.h:117

Member Data Documentation

std::map<MACAddress, SequenceControlField> inet::ieee80211::LegacyDuplicateRemoval::lastSeenSeqNumCache
protected

Referenced by isDuplicate().


The documentation for this class was generated from the following files: