]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-usb.c
Don't print timestamps to a buffer and then print the buffer.
[tcpdump] / print-usb.c
index e2c1d78da90d23f442ea648bd9deb207f20181ed..56e6dd4674b9d4ac186b0f6552ad3c95050830cf 100644 (file)
@@ -135,7 +135,6 @@ typedef struct _usb_isodesc {
        nd_byte         pad[4];
 } usb_isodesc;
 
-static const char tstr[] = "[|usb]";
 
 /* returns direction: 1=inbound 2=outbound -1=invalid */
 static int
@@ -243,8 +242,9 @@ u_int
 usb_linux_48_byte_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
                            const u_char *p)
 {
+       ndo->ndo_protocol = "usb_linux_48_byte_if";
        if (h->caplen < sizeof(pcap_usb_header)) {
-               ND_PRINT("%s", tstr);
+               nd_print_trunc(ndo);
                return(sizeof(pcap_usb_header));
        }
 
@@ -266,8 +266,9 @@ u_int
 usb_linux_64_byte_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
                            const u_char *p)
 {
+       ndo->ndo_protocol = "usb_linux_64_byte_if";
        if (h->caplen < sizeof(pcap_usb_header_mmapped)) {
-               ND_PRINT("%s", tstr);
+               nd_print_trunc(ndo);
                return(sizeof(pcap_usb_header_mmapped));
        }