diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-05-02 17:15:04 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-05-04 13:47:49 +0200 |
commit | ba8936b39b0ce2ff02f3aeb307df4c27657652d8 (patch) | |
tree | 71f8f3b775d7adfb7b2be374c634f749525c10eb /print-token.c | |
parent | c45392de183543487bfebf52a5d2ccbeb9cef462 (diff) | |
download | tcpdump-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-token.c')
-rw-r--r-- | print-token.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/print-token.c b/print-token.c index dcd023c0..9d9e36ed 100644 --- a/print-token.c +++ b/print-token.c @@ -89,7 +89,6 @@ struct token_header { nd_uint16_t token_rseg[ROUTING_SEGMENT_MAX]; }; -static const char tstr[] = "[|token-ring]"; /* Extract src, dst addresses */ static void @@ -157,7 +156,7 @@ token_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen trp = (const struct token_header *)p; if (caplen < TOKEN_HDRLEN) { - ND_PRINT("%s", tstr); + nd_print_trunc(ndo); return hdr_len; } @@ -175,13 +174,13 @@ token_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen token_hdr_print(ndo, trp, length, srcmac, dstmac); if (caplen < TOKEN_HDRLEN + 2) { - ND_PRINT("%s", tstr); + nd_print_trunc(ndo); return hdr_len; } route_len = RIF_LENGTH(trp); hdr_len += route_len; if (caplen < hdr_len) { - ND_PRINT("%s", tstr); + nd_print_trunc(ndo); return hdr_len; } if (ndo->ndo_vflag) { |