]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-igmp.c
Fix spaces
[tcpdump] / print-igmp.c
index f1f95bec5bdc5f4b55a76abd6c55ee11dd43bfa2..3205a224740bd544ae4a8eac3db2a552890ca608 100644 (file)
@@ -30,7 +30,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
 #include "netdissect-stdinc.h"
@@ -43,7 +43,6 @@
 #define IN_CLASSD(i) (((int32_t)(i) & 0xf0000000) == 0xe0000000)
 #endif
 
-static const char tstr[] = "[|igmp]";
 
 /* (following from ipmulti/mrouted/prune.h) */
 
@@ -127,7 +126,7 @@ print_mtrace(netdissect_options *ndo,
         ND_PRINT(" with-ttl %u", EXTRACT_U_1(tr->tr_rttl));
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 static void
@@ -149,7 +148,7 @@ print_mresp(netdissect_options *ndo,
         ND_PRINT(" with-ttl %u", EXTRACT_U_1(tr->tr_rttl));
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 static void
@@ -203,7 +202,7 @@ print_igmpv3_report(netdissect_options *ndo,
     }
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 static void
@@ -259,7 +258,7 @@ print_igmpv3_query(netdissect_options *ndo,
     ND_PRINT("]");
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 void
@@ -268,6 +267,7 @@ igmp_print(netdissect_options *ndo,
 {
     struct cksum_vec vec[1];
 
+    ndo->ndo_protocol = "igmp";
     if (ndo->ndo_qflag) {
         ND_PRINT("igmp");
         return;
@@ -343,5 +343,5 @@ igmp_print(netdissect_options *ndo,
     }
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }