#include <Fragmentation.h>
Implements inet::ieee80211::IFragmentation.
32 std::vector<Ieee80211DataOrMgmtFrame *> *fragments =
new std::vector<Ieee80211DataOrMgmtFrame *>();
34 cPacket *payload = frame->decapsulate();
35 Ieee80211DataOrMgmtFrame *fragmentHeader = frame->dup();
36 frame->encapsulate(payload);
38 for (
int i = 0; i < (int)fragmentSizes.size(); i++) {
39 bool lastFragment = i == (int)fragmentSizes.size() - 1;
40 Ieee80211DataOrMgmtFrame *fragment = fragmentHeader->dup();
41 fragment->setFragmentNumber(i);
42 fragment->setMoreFragments(!lastFragment);
44 fragment->encapsulate(frame);
45 fragment->setByteLength(fragmentSizes.at(i));
46 fragments->push_back(fragment);
48 delete fragmentHeader;
The documentation for this class was generated from the following files: