From: Francois-Xavier Le Bail Date: Fri, 18 May 2018 09:39:52 +0000 (+0200) Subject: Add more nd_print_trunc() calls X-Git-Tag: tcpdump-4.99-bp~1180 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/480af1cdceda69d49bbc8e6a9d88db8eb9dfae79 Add more nd_print_trunc() calls Update the output of some tests accordingly. --- diff --git a/print-juniper.c b/print-juniper.c index 56cb14d4..b059d6bb 100644 --- a/print-juniper.c +++ b/print-juniper.c @@ -498,7 +498,7 @@ juniper_ggsn_if_print(netdissect_options *ndo, return l2info.header_len; trunc: - ND_PRINT("[|juniper_services]"); + nd_print_trunc(ndo); return l2info.header_len; } #endif @@ -576,7 +576,7 @@ juniper_es_if_print(netdissect_options *ndo, return l2info.header_len; trunc: - ND_PRINT("[|juniper_services]"); + nd_print_trunc(ndo); return l2info.header_len; } #endif @@ -616,7 +616,7 @@ juniper_monitor_if_print(netdissect_options *ndo, return l2info.header_len; trunc: - ND_PRINT("[|juniper_services]"); + nd_print_trunc(ndo); return l2info.header_len; } #endif @@ -658,7 +658,7 @@ juniper_services_if_print(netdissect_options *ndo, return l2info.header_len; trunc: - ND_PRINT("[|juniper_services]"); + nd_print_trunc(ndo); return l2info.header_len; } #endif @@ -788,7 +788,7 @@ juniper_pppoe_atm_if_print(netdissect_options *ndo, return l2info.header_len; trunc: - ND_PRINT("[|juniper_pppoe_atm]"); + nd_print_trunc(ndo); return l2info.header_len; } #endif @@ -1003,7 +1003,7 @@ juniper_atm1_if_print(netdissect_options *ndo, return l2info.header_len; trunc: - ND_PRINT("[|juniper_atm1]"); + nd_print_trunc(ndo); return l2info.header_len; } #endif @@ -1067,7 +1067,7 @@ juniper_atm2_if_print(netdissect_options *ndo, return l2info.header_len; trunc: - ND_PRINT("[|juniper_atm2]"); + nd_print_trunc(ndo); return l2info.header_len; } #endif @@ -1514,7 +1514,7 @@ juniper_parse_header(netdissect_options *ndo, ND_PRINT("hlen %u, proto 0x%04x, ", l2info->header_len, l2info->proto); return 1; /* everything went ok so far. continue parsing */ - trunc: - ND_PRINT("[|juniper_hdr], length %u", h->len); +trunc: + nd_print_trunc(ndo); return 0; } diff --git a/tests/hoobr_juniper.out b/tests/hoobr_juniper.out index 72ab682b..0c838245 100644 --- a/tests/hoobr_juniper.out +++ b/tests/hoobr_juniper.out @@ -1 +1 @@ -[|juniper_hdr], length 262144 + [|juniper_atm1_if] diff --git a/tests/hoobr_juniper2.out b/tests/hoobr_juniper2.out index 1f164cfb..0c838245 100644 --- a/tests/hoobr_juniper2.out +++ b/tests/hoobr_juniper2.out @@ -1 +1 @@ -[|juniper_atm1] + [|juniper_atm1_if] diff --git a/tests/hoobr_juniper3.out b/tests/hoobr_juniper3.out index 8062118b..f8bbb6f5 100644 --- a/tests/hoobr_juniper3.out +++ b/tests/hoobr_juniper3.out @@ -1 +1 @@ -Unknown Juniper DLT_ type 132: [|juniper_services] +Unknown Juniper DLT_ type 132: [|juniper_es_if] diff --git a/tests/hoobr_juniper4.out b/tests/hoobr_juniper4.out index 72ab682b..0c838245 100644 --- a/tests/hoobr_juniper4.out +++ b/tests/hoobr_juniper4.out @@ -1 +1 @@ -[|juniper_hdr], length 262144 + [|juniper_atm1_if] diff --git a/tests/juniper_atm1.out b/tests/juniper_atm1.out index c5cd9e01..d63c735f 100644 --- a/tests/juniper_atm1.out +++ b/tests/juniper_atm1.out @@ -1,2 +1,2 @@ Out - Juniper PCAP Flags [none]ATM1-PIC, cookie-len 4, cookie 0x30303030: [|juniper_hdr], length 262144 + Juniper PCAP Flags [none]ATM1-PIC, cookie-len 4, cookie 0x30303030: [|juniper_atm1_if] diff --git a/tests/juniper_es.out b/tests/juniper_es.out index 9d241a47..73c73a8e 100644 --- a/tests/juniper_es.out +++ b/tests/juniper_es.out @@ -1,2 +1,2 @@ Out - Juniper PCAP Flags [none]ES-PIC, cookie-len 0: [|juniper_hdr], length 262144 + Juniper PCAP Flags [none]ES-PIC, cookie-len 0: [|juniper_es_if] diff --git a/tests/juniper_header-heapoverflow.out b/tests/juniper_header-heapoverflow.out index 72ab682b..d268d66e 100644 --- a/tests/juniper_header-heapoverflow.out +++ b/tests/juniper_header-heapoverflow.out @@ -1 +1 @@ -[|juniper_hdr], length 262144 + [|juniper_ether_if]