Prints the given chunk of protocol according to options into context.
21 if (
auto header = dynamicPtrCast<const IgmpMessage>(chunk)) {
22 switch (header->getType()) {
24 if (
auto header = dynamicPtrCast<const Igmpv1Query>(chunk)) {
25 context.infoColumn <<
"IGMPv1 QRY";
26 if (header->getGroupAddress().isUnspecified())
27 context.infoColumn <<
", general";
29 context.infoColumn <<
", group " << header->getGroupAddress();
31 else if (
auto header = dynamicPtrCast<const Igmpv2Query>(chunk)) {
32 context.infoColumn <<
"IGMPv2 QRY";
33 if (header->getGroupAddress().isUnspecified())
34 context.infoColumn <<
", general";
36 context.infoColumn <<
", group " << header->getGroupAddress();
37 context.infoColumn <<
", maxRespTime=" << SimTime(header->getMaxRespTimeCode(), (SimTimeUnit) - 1);
39 else if (
auto header = dynamicPtrCast<const Igmpv3Query>(chunk)) {
40 context.infoColumn <<
"IGMPv3 QRY";
41 if (header->getGroupAddress().isUnspecified())
42 context.infoColumn <<
", general";
44 context.infoColumn <<
", group " << header->getGroupAddress();
45 context.infoColumn <<
", maxRespTime=" << SimTime(
Igmpv3::decodeTime(header->getMaxRespTimeCode()), (SimTimeUnit) - 1);
46 if (header->getSuppressRouterProc())
47 context.infoColumn <<
" Suppress";
48 context.infoColumn <<
", QRV=" << header->getRobustnessVariable();
49 context.infoColumn <<
", QQIC=" << SimTime(
Igmpv3::decodeTime(header->getQueryIntervalCode()), SIMTIME_S);
50 if (header->getSourceList().size() > 0) {
51 context.infoColumn <<
", SRC={";
52 for (
auto it = header->getSourceList().begin(); it != header->getSourceList().end(); ++it) {
53 if (it != header->getSourceList().begin())
54 context.infoColumn <<
", ";
55 context.infoColumn << *it;
57 context.infoColumn <<
"}";
61 context.infoColumn <<
"IGMP QRY";
62 if (header->getGroupAddress().isUnspecified())
63 context.infoColumn <<
", general";
65 context.infoColumn <<
", group " << header->getGroupAddress();
69 context.infoColumn <<
"IGMPv1 REPORT";
70 if (
auto header = dynamicPtrCast<const Igmpv1Report>(chunk)) {
74 context.infoColumn <<
"IGMPv2 REPORT";
75 if (
auto header = dynamicPtrCast<const Igmpv2Report>(chunk)) {
79 context.infoColumn <<
"IGMPv2 LEAVE";
80 if (
auto header = dynamicPtrCast<const Igmpv2Leave>(chunk)) {
84 context.infoColumn <<
"IGMPv3 REPORT";
85 if (
auto header = dynamicPtrCast<const Igmpv3Report>(chunk)) {
89 context.infoColumn <<
" type=" << header->getType();
94 context.infoColumn <<
"(IGMP) " << chunk;