]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-usb.c
travis: try removing the matrix: clause and putting back the Coverity stuff.
[tcpdump] / print-usb.c
index d0ae440e6aa66804a6793e490073e2cf5b601434..dc697f5fc719a83c356e7b66170fb19d51c4979b 100644 (file)
@@ -187,6 +187,13 @@ usb_header_print(netdissect_options *ndo, const pcap_usb_header *uh)
        int direction;
        uint8_t transfer_type, event_type;
 
+       ndo->ndo_protocol = "usb";
+
+       nd_print_protocol_caps(ndo);
+       if (ndo->ndo_qflag)
+               return;
+
+       ND_PRINT(" ");
        transfer_type = GET_U_1(uh->transfer_type);
        switch(transfer_type)
        {
@@ -240,19 +247,21 @@ usb_header_print(netdissect_options *ndo, const pcap_usb_header *uh)
  * 'h->len' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
-u_int
+void
 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";
+       ndo->ndo_protocol = "usb_linux_48_byte";
        if (h->caplen < sizeof(pcap_usb_header)) {
+               ndo->ndo_ll_header_length += h->caplen;
                nd_print_trunc(ndo);
-               return(sizeof(pcap_usb_header));
+               return;
        }
+       ndo->ndo_ll_header_length += sizeof (pcap_usb_header);
 
        usb_header_print(ndo, (const pcap_usb_header *) p);
 
-       return(sizeof(pcap_usb_header));
+       return;
 }
 
 #ifdef DLT_USB_LINUX_MMAPPED
@@ -264,19 +273,21 @@ usb_linux_48_byte_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
  * 'h->len' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
-u_int
+void
 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";
+       ndo->ndo_protocol = "usb_linux_64_byte";
        if (h->caplen < sizeof(pcap_usb_header_mmapped)) {
+               ndo->ndo_ll_header_length += h->caplen;
                nd_print_trunc(ndo);
-               return(sizeof(pcap_usb_header_mmapped));
+               return;
        }
+       ndo->ndo_ll_header_length += sizeof (pcap_usb_header_mmapped);
 
        usb_header_print(ndo, (const pcap_usb_header *) p);
 
-       return(sizeof(pcap_usb_header_mmapped));
+       return;
 }
 #endif /* DLT_USB_LINUX_MMAPPED */