]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-zephyr.c
Don't print timestamps to a buffer and then print the buffer.
[tcpdump] / print-zephyr.c
index 01e34ed8aa92b422a9cca7320b4f95db6b05fe2a..bce7394b26ef0eb18e28306ae4b5a2be558b2d92 100644 (file)
@@ -119,7 +119,7 @@ z_triple(const char *class, const char *inst, const char *recipient)
 {
     if (!*recipient)
        recipient = "*";
-    snprintf(z_buf, sizeof(z_buf), "<%s,%s,%s>", class, inst, recipient);
+    nd_snprintf(z_buf, sizeof(z_buf), "<%s,%s,%s>", class, inst, recipient);
     z_buf[sizeof(z_buf)-1] = '\0';
     return z_buf;
 }
@@ -169,6 +169,7 @@ zephyr_print(netdissect_options *ndo, const u_char *cp, int length)
     int lose = 0;
     int truncated = 0;
 
+    ndo->ndo_protocol = "zephyr";
     /* squelch compiler warnings */
 
 #define PARSE_STRING                                           \
@@ -342,6 +343,6 @@ zephyr_print(netdissect_options *ndo, const u_char *cp, int length)
     return;
 
 trunc:
-    ND_PRINT(" [|zephyr] (%d)", length);
+    nd_print_trunc(ndo);
     return;
 }