#include <Icmpv6ProtocolPrinter.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::Icmpv6ProtocolPrinter::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.
20 if (
auto header = dynamicPtrCast<const Icmpv6Header>(chunk)) {
21 switch (header->getType()) {
23 context.infoColumn <<
"ICMPv6-UNSPEC";
26 auto header2 =
CHK(dynamicPtrCast<const Icmpv6DestUnreachableMsg>(header));
28 context.infoColumn <<
"ICMPv6-DEST-UN code=" << header2->getCode();
32 context.infoColumn <<
"ICMPv6-PK-TOO-BIG";
35 context.infoColumn <<
"ICMPv6-TIME-EXCEEDED";
38 context.infoColumn <<
"ICMPv6-PARAM-PROBLEM";
41 auto echoHeader =
CHK(dynamicPtrCast<const Icmpv6EchoRequestMsg>(header));
42 context.infoColumn <<
"ICMPv6-ECHO-REQ code=" << echoHeader->getCode()
43 <<
" id=" << echoHeader->getIdentifier() <<
" seq=" << echoHeader->getSeqNumber();
47 auto echoHeader =
CHK(dynamicPtrCast<const Icmpv6EchoReplyMsg>(header));
48 context.infoColumn <<
"ICMPv6-ECHO-REPLY code=" << echoHeader->getCode()
49 <<
" id=" << echoHeader->getIdentifier() <<
" seq=" << echoHeader->getSeqNumber();
53 context.infoColumn <<
"ICMPv6-MLD-QRY";
57 context.infoColumn <<
"ICMPv6-MLD-REPORT";
61 context.infoColumn <<
"ICMPv6-MLD-DONE";
65 context.infoColumn <<
"ICMPv6-ROUTER-SOL";
69 context.infoColumn <<
"ICMPv6-ROUTER-AD";
73 context.infoColumn <<
"ICMPv6-NEIGHBOUR-SOL";
77 context.infoColumn <<
"ICMPv6-NEIGHBOUR-AD";
81 context.infoColumn <<
"ICMPv6-NEIGHBOUR-REDIR";
84 context.infoColumn <<
"ICMPv6-MLDv2-REPORT";
88 context.infoColumn <<
"ICMPv6-EXPERIMENTAL-MOBILITY";
94 context.infoColumn <<
"(ICMPv6) " << chunk;
The documentation for this class was generated from the following files: