From da20bc56d6100b5275d6f85c4a25bac1dab4e57e Mon Sep 17 00:00:00 2001 From: Francois-Xavier Le Bail Date: Wed, 22 Nov 2017 23:54:09 +0100 Subject: Rename EXTRACT_ macros Now all the macros have a name meaning a count in bytes. With _S_: signed, _U_: unsigned e.g.: EXTRACT_BE_32BITS -> EXTRACT_BE_U_4 EXTRACT_LE_32BITS -> EXTRACT_LE_U_4 ... EXTRACT_BE_INT32 -> EXTRACT_BE_S_4 and have: EXTRACT_8BITS -> EXTRACT_U_1 EXTRACT_INT8 -> EXTRACT_S_1 --- print-tftp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'print-tftp.c') diff --git a/print-tftp.c b/print-tftp.c index a47a7847..314dfb41 100644 --- a/print-tftp.c +++ b/print-tftp.c @@ -102,7 +102,7 @@ tftp_print(netdissect_options *ndo, if (length < 2) goto trunc; ND_TCHECK_2(bp); - opcode = EXTRACT_BE_16BITS(bp); + opcode = EXTRACT_BE_U_2(bp); cp = tok2str(op2str, "tftp-#%d", opcode); ND_PRINT((ndo, " %s", cp)); /* Bail if bogus opcode */ @@ -169,7 +169,7 @@ tftp_print(netdissect_options *ndo, if (length < 2) goto trunc; /* no block number */ ND_TCHECK_2(bp); - ND_PRINT((ndo, " block %d", EXTRACT_BE_16BITS(bp))); + ND_PRINT((ndo, " block %d", EXTRACT_BE_U_2(bp))); break; case TFTP_ERROR: @@ -178,7 +178,7 @@ tftp_print(netdissect_options *ndo, goto trunc; /* no error code */ ND_TCHECK_2(bp); ND_PRINT((ndo, " %s", tok2str(err2str, "tftp-err-#%d \"", - EXTRACT_BE_16BITS(bp)))); + EXTRACT_BE_U_2(bp)))); bp += 2; length -= 2; /* Print error message string */ -- cgit v1.2.1