Add a nd_print_trunc() call

Replace a ND_TTEST_*() with ND_TCHECK_*().
Update the output of some tests accordingly.
This commit is contained in:
Francois-Xavier Le Bail 2018-05-18 14:55:12 +02:00
parent 34017c6fcb
commit 6e1fdd00a6
3 changed files with 6 additions and 6 deletions

View File

@ -679,10 +679,7 @@ void
isoclns_print(netdissect_options *ndo, const u_char *p, u_int length) isoclns_print(netdissect_options *ndo, const u_char *p, u_int length)
{ {
ndo->ndo_protocol = "isoclns"; ndo->ndo_protocol = "isoclns";
if (!ND_TTEST_1(p)) { /* enough bytes on the wire ? */ ND_TCHECK_1(p); /* enough bytes on the wire ? */
ND_PRINT("|OSI");
return;
}
if (ndo->ndo_eflag) if (ndo->ndo_eflag)
ND_PRINT("OSI NLPID %s (0x%02x): ", tok2str(nlpid_values, "Unknown", EXTRACT_U_1(p)), EXTRACT_U_1(p)); ND_PRINT("OSI NLPID %s (0x%02x): ", tok2str(nlpid_values, "Unknown", EXTRACT_U_1(p)), EXTRACT_U_1(p));
@ -731,6 +728,9 @@ isoclns_print(netdissect_options *ndo, const u_char *p, u_int length)
print_unknown_data(ndo, p, "\n\t", length); print_unknown_data(ndo, p, "\n\t", length);
break; break;
} }
return;
trunc:
nd_print_trunc(ndo);
} }
#define CLNP_PDU_ER 1 #define CLNP_PDU_ER 1

View File

@ -1 +1 @@
|OSI [|isoclns]

View File

@ -1 +1 @@
|OSI [|isoclns]