#include <Ieee80211PhyProtocolDissector.h>
◆ dissect()
| void inet::Ieee80211PhyProtocolDissector::dissect |
( |
Packet * |
packet, |
|
|
const Protocol * |
protocol, |
|
|
ICallback & |
callback |
|
) |
| const |
|
overridevirtual |
Dissects the packet according to the protocol implemented by this ProtocolDissector.
Implements inet::ProtocolDissector.
32 callback.startProtocolDataUnit(protocolTag);
33 auto originalBackOffset = packet->getBackOffset();
34 auto payloadEndOffset = packet->getFrontOffset();
36 callback.visitChunk(header, protocolTag);
37 payloadEndOffset += header->getChunkLength() + header->getLengthField();
38 bool incorrect = (payloadEndOffset > originalBackOffset ||
b(header->getLengthField()) < header->getChunkLength());
40 callback.markIncorrect();
41 payloadEndOffset = originalBackOffset;
43 packet->setBackOffset(payloadEndOffset);
45 packet->setBackOffset(originalBackOffset);
46 auto paddingLength = packet->getDataLength();
47 if (paddingLength >
b(0)) {
48 const auto& padding = packet->popAtFront(paddingLength);
49 callback.visitChunk(padding, protocolTag);
51 callback.endProtocolDataUnit(protocolTag);
The documentation for this class was generated from the following files: