summaryrefslogtreecommitdiff
path: root/print-tftp.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-11-22 23:54:09 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-11-22 23:54:09 +0100
commitda20bc56d6100b5275d6f85c4a25bac1dab4e57e (patch)
tree643c746e737c54d5a13d0b0083049d847d2cff24 /print-tftp.c
parent3c8f3e13b03380742c24070f8a7b56fe12c6b8ee (diff)
downloadtcpdump-da20bc56d6100b5275d6f85c4a25bac1dab4e57e.tar.gz
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
Diffstat (limited to 'print-tftp.c')
-rw-r--r--print-tftp.c6
1 files changed, 3 insertions, 3 deletions
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 */