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-lane.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'print-lane.c') diff --git a/print-lane.c b/print-lane.c index b506ce30..ccc23527 100644 --- a/print-lane.c +++ b/print-lane.c @@ -69,7 +69,7 @@ static const struct tok lecop2str[] = { static void lane_hdr_print(netdissect_options *ndo, const u_char *bp) { - ND_PRINT((ndo, "lecid:%x ", EXTRACT_BE_16BITS(bp))); + ND_PRINT((ndo, "lecid:%x ", EXTRACT_BE_U_2(bp))); } /* @@ -91,13 +91,13 @@ lane_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen) } lec = (const struct lane_controlhdr *)p; - if (EXTRACT_BE_16BITS(&lec->lec_header) == 0xff00) { + if (EXTRACT_BE_U_2(&lec->lec_header) == 0xff00) { /* * LE Control. */ ND_PRINT((ndo, "lec: proto %x vers %x %s", lec->lec_proto, lec->lec_vers, - tok2str(lecop2str, "opcode-#%u", EXTRACT_BE_16BITS(&lec->lec_opcode)))); + tok2str(lecop2str, "opcode-#%u", EXTRACT_BE_U_2(&lec->lec_opcode)))); return; } -- cgit v1.2.1