diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-05-10 18:05:56 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-05-10 18:05:56 +0200 |
commit | 40ae3ad744d9f71079b410a810acbc33ef39f8ba (patch) | |
tree | 08a7248e1fbf30a52c35c98065df6facecb7ba8e /print-llc.c | |
parent | 1889ef324cceaf8b667a9d4dade8260c395913c7 (diff) | |
download | tcpdump-40ae3ad744d9f71079b410a810acbc33ef39f8ba.tar.gz |
Add more nd_print_trunc() calls
Update the output of some tests accordingly.
Moreover:
Add a ndo_protocol field assignment.
Diffstat (limited to 'print-llc.c')
-rw-r--r-- | print-llc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/print-llc.c b/print-llc.c index 95668f92..e7c50196 100644 --- a/print-llc.c +++ b/print-llc.c @@ -157,12 +157,12 @@ llc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, ndo->ndo_protocol = "llc"; if (caplen < 3) { - ND_PRINT("[|llc]"); + nd_print_trunc(ndo); ND_DEFAULTPRINT((const u_char *)p, caplen); return (caplen); } if (length < 3) { - ND_PRINT("[|llc]"); + nd_print_trunc(ndo); ND_DEFAULTPRINT((const u_char *)p, caplen); return (length); } @@ -189,12 +189,12 @@ llc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, * 2 bytes... */ if (caplen < 4) { - ND_PRINT("[|llc]"); + nd_print_trunc(ndo); ND_DEFAULTPRINT((const u_char *)p, caplen); return (caplen); } if (length < 4) { - ND_PRINT("[|llc]"); + nd_print_trunc(ndo); ND_DEFAULTPRINT((const u_char *)p, caplen); return (length); } @@ -368,14 +368,14 @@ llc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, return (hdrlen); } if (caplen < 1) { - ND_PRINT("[|llc]"); + nd_print_trunc(ndo); if (caplen > 0) ND_DEFAULTPRINT((const u_char *)p, caplen); return (hdrlen); } if (EXTRACT_U_1(p) == LLC_XID_FI) { if (caplen < 3 || length < 3) { - ND_PRINT("[|llc]"); + nd_print_trunc(ndo); if (caplen > 0) ND_DEFAULTPRINT((const u_char *)p, caplen); } else @@ -605,6 +605,6 @@ snap_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, return (0); trunc: - ND_PRINT("[|snap]"); + nd_print_trunc(ndo); return (1); } |