]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Add more nd_print_trunc() calls
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 11 May 2018 08:40:40 +0000 (10:40 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 17 May 2018 10:51:47 +0000 (12:51 +0200)
Update the output of some tests accordingly.

print-ipx.c
print-mpls.c
print-msnlb.c
print-zephyr.c
tests/hoobr_parse_field.out
tests/msnlb2.out

index c2c327402f5da7d9ddc4cf9eafd4802e05c1d7be..674dd4578848b551c1283119ae20f7492855a598 100644 (file)
@@ -93,7 +93,7 @@ ipx_print(netdissect_options *ndo, const u_char *p, u_int length)
        ipx_decode(ndo, ipx, p + ipxSize, length - ipxSize);
        return;
 trunc:
-       ND_PRINT("[|ipx %u]", length);
+       nd_print_trunc(ndo);
 }
 
 static const char *
index e45f2826ffb33db9c9fd063ba2adba14a4240de9..77ed2f3b51c0476bc315d95d13c7f08bf15726a3 100644 (file)
@@ -69,10 +69,8 @@ mpls_print(netdissect_options *ndo, const u_char *bp, u_int length)
        ND_PRINT("MPLS");
        do {
                ND_TCHECK_LEN(p, sizeof(label_entry));
-               if (length < sizeof(label_entry)) {
-                       ND_PRINT("[|MPLS], length %u", length);
-                       return;
-               }
+               if (length < sizeof(label_entry))
+                       goto trunc;
                label_entry = EXTRACT_BE_U_4(p);
                ND_PRINT("%s(label %u",
                       (label_stack_depth && ndo->ndo_vflag) ? "\n\t" : " ",
index 5fdf5575991133aa895882dde0e1a1ae0dbad5e0..7a86ff0652be7830c68cf3b5144488f4974c34df 100644 (file)
@@ -62,5 +62,5 @@ msnlb_print(netdissect_options *ndo, const u_char *bp)
        ND_PRINT(" host IP: %s", ipaddr_string(ndo, hb->host_ip));
        return;
 trunc:
-       ND_PRINT("[|MS NLB]");
+       nd_print_trunc(ndo);
 }
index 3edbeea42a0b3379c1f4fbe7d3ec6afccc04e9cf..bce7394b26ef0eb18e28306ae4b5a2be558b2d92 100644 (file)
@@ -343,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;
 }
index 1c0779d32818950318c633ca52fdaa64b63cc10c..2184bc5a04b4712d2f0ff113318ad630be982928 100644 (file)
@@ -2,4 +2,4 @@
        0x0000:  3030 3030 3030 3030 3030 3030 3030 3030  0000000000000000
        0x0010:  3030 3030 3030 3030 3030 3030 3030 3030  0000000000000000
        0x0020:  3030                                     00
-IP 48.48.48.48.2104 > 48.48.48.48.12336:  [|zephyr] (12308)
+IP 48.48.48.48.2104 > 48.48.48.48.12336:  [|zephyr]
index 00fc1a66fc61b1977a1f897ae8175cdb1ca05a9e..2b57b6483d6ccd58db3bf40798af9b0b8ed56c3a 100644 (file)
@@ -1,2 +1,2 @@
-[|MS NLB]
-[|MS NLB]
+ [|msnlb]
+ [|msnlb]