57 std::vector<Ieee80211DataFrame *> *frames =
new std::vector<Ieee80211DataFrame *>();
58 Ieee80211AMsdu *aMsdu = check_and_cast<Ieee80211AMsdu *>(frame->getEncapsulatedPacket());
59 int tid = frame->getTid();
60 int numOfSubframes = aMsdu->getSubframesArraySize();
61 for (
int i = 0; i < numOfSubframes; i++)
63 Ieee80211MsduSubframe msduSubframe = aMsdu->getSubframes(i);
64 cPacket *msdu = msduSubframe.decapsulate();
65 Ieee80211DataFrame *dataFrame =
nullptr;
67 dataFrame = (msduSubframe.getEtherType() != -1) ?
new Ieee80211DataFrameWithSNAP(msduSubframe.getName()) :
new Ieee80211DataFrame(msduSubframe.getName());
70 dataFrame->setTransmitterAddress(msduSubframe.getSa());
71 dataFrame->setToDS(frame->getToDS());
72 dataFrame->setFromDS(frame->getFromDS());
73 dataFrame->setTid(tid);
75 if (
auto dataFrameWithSnap = dynamic_cast<Ieee80211DataFrameWithSNAP*>(dataFrame))
76 dataFrameWithSnap->setEtherType(msduSubframe.getEtherType());
77 dataFrame->encapsulate(msdu);
79 frames->push_back(dataFrame);
virtual void setExplodedFrameAddress(Ieee80211DataFrame *frame, Ieee80211MsduSubframe *subframe, Ieee80211DataFrame *aMsduFrame)
Definition: MsduDeaggregation.cc:25
Definition: Ieee80211Frame_m.h:117
const unsigned int QOSCONTROL_BITS
Definition: Ieee80211Frame_m.h:48