aboutsummaryrefslogtreecommitdiff
path: root/print-usb.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-05-02 17:15:04 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-05-04 13:47:49 +0200
commitba8936b39b0ce2ff02f3aeb307df4c27657652d8 (patch)
tree71f8f3b775d7adfb7b2be374c634f749525c10eb /print-usb.c
parentc45392de183543487bfebf52a5d2ccbeb9cef462 (diff)
downloadtcpdump-ba8936b39b0ce2ff02f3aeb307df4c27657652d8.tar.gz
Print truncations with nd_print_trunc() instead of tstr[] strings
Remove the tstr[] strings. Update the output of some tests accordingly. Moreover: Add or update some ndo_protocol fields.
Diffstat (limited to 'print-usb.c')
-rw-r--r--print-usb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/print-usb.c b/print-usb.c
index 7b750a06..56e6dd46 100644
--- a/print-usb.c
+++ b/print-usb.c
@@ -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
@@ -245,7 +244,7 @@ usb_linux_48_byte_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
{
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));
}
@@ -269,7 +268,7 @@ usb_linux_64_byte_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
{
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));
}