]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tipc.c
Don't print timestamps to a buffer and then print the buffer.
[tcpdump] / print-tipc.c
index 8edfcc1e990b70ba6058c9a7c32c019cb03afd5a..45de7387638fdf66b243ebcd856ef2945fa2f954 100644 (file)
  */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
-#include <netdissect-stdinc.h>
+#include "netdissect-stdinc.h"
 
 #include "netdissect.h"
 #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:
- */
-