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

#include <RecipientMacDataService.h>

Inheritance diagram for inet::ieee80211::RecipientMacDataService:
inet::ieee80211::IRecipientMacDataService

Public Member Functions

virtual ~RecipientMacDataService ()
 
virtual std::vector< Ieee80211Frame * > dataFrameReceived (Ieee80211DataFrame *dataFrame) override
 
virtual std::vector< Ieee80211Frame * > managementFrameReceived (Ieee80211ManagementFrame *mgmtFrame) override
 
virtual std::vector< Ieee80211Frame * > controlFrameReceived (Ieee80211Frame *controlFrame) override
 

Protected Types

typedef std::vector< Ieee80211DataOrMgmtFrame * > Fragments
 

Protected Member Functions

virtual void initialize () override
 
Ieee80211DataOrMgmtFramedefragment (Ieee80211DataOrMgmtFrame *dataOrMgmtFrame)
 
virtual std::vector< Ieee80211Frame * > dataOrMgmtFrameReceived (Ieee80211DataOrMgmtFrame *frame)
 

Protected Attributes

BasicReassemblybasicReassembly = nullptr
 
IDuplicateRemovalduplicateRemoval = nullptr
 
IDefragmentationdefragmentation = nullptr
 

Member Typedef Documentation

Constructor & Destructor Documentation

inet::ieee80211::RecipientMacDataService::~RecipientMacDataService ( )
virtual
69 {
70  delete duplicateRemoval;
71  delete basicReassembly;
72 }
IDuplicateRemoval * duplicateRemoval
Definition: RecipientMacDataService.h:42
BasicReassembly * basicReassembly
Definition: RecipientMacDataService.h:38

Member Function Documentation

std::vector< Ieee80211Frame * > inet::ieee80211::RecipientMacDataService::controlFrameReceived ( Ieee80211Frame controlFrame)
overridevirtual

Implements inet::ieee80211::IRecipientMacDataService.

64 {
65  return std::vector<Ieee80211Frame*>(); // has nothing to do
66 }
std::vector< Ieee80211Frame * > inet::ieee80211::RecipientMacDataService::dataFrameReceived ( Ieee80211DataFrame dataFrame)
overridevirtual

Implements inet::ieee80211::IRecipientMacDataService.

54 {
55  return dataOrMgmtFrameReceived(dataFrame);
56 }
virtual std::vector< Ieee80211Frame * > dataOrMgmtFrameReceived(Ieee80211DataOrMgmtFrame *frame)
Definition: RecipientMacDataService.cc:40
std::vector< Ieee80211Frame * > inet::ieee80211::RecipientMacDataService::dataOrMgmtFrameReceived ( Ieee80211DataOrMgmtFrame frame)
protectedvirtual

Referenced by dataFrameReceived(), and managementFrameReceived().

41 {
43  delete frame;
44  return std::vector<Ieee80211Frame*>();
45  }
46  Ieee80211DataOrMgmtFrame *defragmentedFrame = nullptr;
47  if (basicReassembly) { // FIXME: defragmentation
48  defragmentedFrame = defragment(frame);
49  }
50  return defragmentedFrame != nullptr ? std::vector<Ieee80211Frame*>({defragmentedFrame}) : std::vector<Ieee80211Frame*>();
51 }
Ieee80211DataOrMgmtFrame * defragment(Ieee80211DataOrMgmtFrame *dataOrMgmtFrame)
Definition: RecipientMacDataService.cc:32
virtual bool isDuplicate(Ieee80211DataOrMgmtFrame *frame)=0
IDuplicateRemoval * duplicateRemoval
Definition: RecipientMacDataService.h:42
BasicReassembly * basicReassembly
Definition: RecipientMacDataService.h:38
Ieee80211DataOrMgmtFrame * inet::ieee80211::RecipientMacDataService::defragment ( Ieee80211DataOrMgmtFrame dataOrMgmtFrame)
protected

Referenced by dataOrMgmtFrameReceived().

33 {
34  if (auto completeFrame = dynamic_cast<Ieee80211DataOrMgmtFrame *>(basicReassembly->addFragment(dataOrMgmtFrame)))
35  return completeFrame;
36  else
37  return nullptr;
38 }
virtual Ieee80211DataOrMgmtFrame * addFragment(Ieee80211DataOrMgmtFrame *frame) override
Add a fragment to the reassembly buffer.
Definition: BasicReassembly.cc:29
BasicReassembly * basicReassembly
Definition: RecipientMacDataService.h:38
void inet::ieee80211::RecipientMacDataService::initialize ( )
overrideprotectedvirtual
27 {
28  duplicateRemoval = new LegacyDuplicateRemoval();
29  basicReassembly = new BasicReassembly();
30 }
IDuplicateRemoval * duplicateRemoval
Definition: RecipientMacDataService.h:42
BasicReassembly * basicReassembly
Definition: RecipientMacDataService.h:38
std::vector< Ieee80211Frame * > inet::ieee80211::RecipientMacDataService::managementFrameReceived ( Ieee80211ManagementFrame mgmtFrame)
overridevirtual

Implements inet::ieee80211::IRecipientMacDataService.

59 {
60  return dataOrMgmtFrameReceived(mgmtFrame);
61 }
virtual std::vector< Ieee80211Frame * > dataOrMgmtFrameReceived(Ieee80211DataOrMgmtFrame *frame)
Definition: RecipientMacDataService.cc:40

Member Data Documentation

BasicReassembly* inet::ieee80211::RecipientMacDataService::basicReassembly = nullptr
protected
IDefragmentation* inet::ieee80211::RecipientMacDataService::defragmentation = nullptr
protected
IDuplicateRemoval* inet::ieee80211::RecipientMacDataService::duplicateRemoval = nullptr
protected

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