#include <Ieee80211MacProtocolPrinter.h>
|
| virtual void | print (const Ptr< const Chunk > &chunk, const Protocol *protocol, const cMessagePrinter::Options *options, Context &context) const override |
| | Prints the given chunk of protocol according to options into context. More...
|
| |
◆ print()
| void inet::ieee80211::Ieee80211MacProtocolPrinter::print |
( |
const Ptr< const Chunk > & |
chunk, |
|
|
const Protocol * |
protocol, |
|
|
const cMessagePrinter::Options * |
options, |
|
|
Context & |
context |
|
) |
| const |
|
overridevirtual |
Prints the given chunk of protocol according to options into context.
Implements inet::ProtocolPrinter.
21 if (
auto macHeader = dynamicPtrCast<const Ieee80211MacHeader>(chunk)) {
22 context.infoColumn <<
"WLAN ";
23 if (
auto oneAddressHeader = dynamicPtrCast<const Ieee80211OneAddressHeader>(chunk))
24 context.destinationColumn << oneAddressHeader->getReceiverAddress();
25 if (
auto twoAddressHeader = dynamicPtrCast<const Ieee80211TwoAddressHeader>(chunk))
26 context.sourceColumn << twoAddressHeader->getTransmitterAddress();
27 switch (macHeader->getType()) {
29 context.typeColumn <<
"AssocReq";
33 context.typeColumn <<
"AssocResp";
37 context.typeColumn <<
"ReassocReq";
41 context.typeColumn <<
"ReassocResp";
45 context.typeColumn <<
"ProbeRequest";
49 context.typeColumn <<
"ProbeResponse";
53 context.typeColumn <<
"Beacon";
57 context.typeColumn <<
"Atim";
61 context.typeColumn <<
"Disassoc";
65 context.typeColumn <<
"Auth";
69 context.typeColumn <<
"Deauth";
73 context.typeColumn <<
"Action";
77 context.typeColumn <<
"Noackaction";
81 context.typeColumn <<
"Pspoll";
85 context.typeColumn <<
"RTS";
89 context.typeColumn <<
"CTS";
90 context.infoColumn << macHeader->getReceiverAddress();
94 context.typeColumn <<
"ACK";
95 context.infoColumn << macHeader->getReceiverAddress();
99 context.typeColumn <<
"BlockAckReq";
103 context.typeColumn <<
"BlockAck";
108 context.typeColumn <<
"DATA";
112 context.typeColumn <<
"LbmsReq";
116 context.typeColumn <<
"LbmsReport";
120 context.infoColumn <<
"Type=" << macHeader->getType();
125 context.infoColumn <<
"(IEEE 802.11 Mac) " << chunk;
The documentation for this class was generated from the following files: