]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tipc.c
Print truncations with nd_print_trunc() instead of tstr[] strings
[tcpdump] / print-tipc.c
index d4a01d67ff78dcc219faa034baf5bb5160fecec7..45de7387638fdf66b243ebcd856ef2945fa2f954 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
 #include "netdissect-stdinc.h"
@@ -37,7 +37,6 @@
 #include "ethertype.h"
 #include "extract.h"
 
-static const char tstr[] = "[|TIPC]";
 
 #define TIPC_USER_LOW_IMPORTANCE       0
 #define TIPC_USER_MEDIUM_IMPORTANCE    1
@@ -216,7 +215,7 @@ print_payload(netdissect_options *ndo, const struct payload_tipc_pkthdr *ap)
        return;
 
 trunc:
-       ND_PRINT("%s", tstr);
+       nd_print_trunc(ndo);
 }
 
 static void
@@ -284,7 +283,7 @@ print_internal(netdissect_options *ndo, const struct internal_tipc_pkthdr *ap)
        return;
 
 trunc:
-       ND_PRINT("%s", tstr);
+       nd_print_trunc(ndo);
 }
 
 static void
@@ -330,7 +329,7 @@ print_link_conf(netdissect_options *ndo, const struct link_conf_tipc_pkthdr *ap)
        return;
 
 trunc:
-       ND_PRINT("%s", tstr);
+       nd_print_trunc(ndo);
 }
 
 void
@@ -341,6 +340,7 @@ tipc_print(netdissect_options *ndo, const u_char *bp, u_int length _U_,
        uint32_t w0;
        u_int user;
 
+       ndo->ndo_protocol = "tipc";
        ap = (const struct tipc_pkthdr *)bp;
        ND_TCHECK_4(ap->w0);
        w0 = EXTRACT_BE_U_4(ap->w0);
@@ -373,12 +373,5 @@ tipc_print(netdissect_options *ndo, const u_char *bp, u_int length _U_,
        return;
 
 trunc:
-       ND_PRINT("%s", tstr);
+       nd_print_trunc(ndo);
 }
-
-/*
- * Local Variables:
- * c-style: bsd
- * End:
- */
-