diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-06-16 17:23:21 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2019-03-26 21:06:24 +0100 |
commit | ee68aa36460d7efeca48747f33b7f2adc0900bfb (patch) | |
tree | 72c1b65d29301835c0e064b433ea685fc856a68e /print-geneve.c | |
parent | 1af20c3adc4dfef93de41d4fcd02f0aeb6bbfd4e (diff) | |
download | tcpdump-ee68aa36460d7efeca48747f33b7f2adc0900bfb.tar.gz |
Use the new GET_ macros instead of the EXTRACT_ ones
The exceptions are currently:
Some EXTRACT_ in print-juniper.c, not used on packet buffer pointer.
An EXTRACT_BE_U_3 in addrtoname.c, not always used on packet buffer
pointer.
Diffstat (limited to 'print-geneve.c')
-rw-r--r-- | print-geneve.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/print-geneve.c b/print-geneve.c index c6ec3a53..fa679110 100644 --- a/print-geneve.c +++ b/print-geneve.c @@ -112,9 +112,9 @@ geneve_opts_print(netdissect_options *ndo, const u_char *bp, u_int len) ND_PRINT("%s", sep); sep = ", "; - opt_class = EXTRACT_BE_U_2(bp); - opt_type = EXTRACT_U_1(bp + 2); - opt_len = 4 + ((EXTRACT_U_1(bp + 3) & OPT_LEN_MASK) * 4); + opt_class = GET_BE_U_2(bp); + opt_type = GET_U_1(bp + 2); + opt_len = 4 + ((GET_U_1(bp + 3) & OPT_LEN_MASK) * 4); ND_PRINT("class %s (0x%x) type 0x%x%s len %u", format_opt_class(opt_class), opt_class, opt_type, @@ -132,7 +132,7 @@ geneve_opts_print(netdissect_options *ndo, const u_char *bp, u_int len) ND_PRINT(" data"); for (i = 4; i < opt_len; i += 4) { - ND_PRINT(" %08x", EXTRACT_BE_U_4(data)); + ND_PRINT(" %08x", GET_BE_U_4(data)); data++; } } @@ -158,7 +158,7 @@ geneve_print(netdissect_options *ndo, const u_char *bp, u_int len) ND_TCHECK_8(bp); - ver_opt = EXTRACT_U_1(bp); + ver_opt = GET_U_1(bp); bp += 1; len -= 1; @@ -168,19 +168,19 @@ geneve_print(netdissect_options *ndo, const u_char *bp, u_int len) return; } - flags = EXTRACT_U_1(bp); + flags = GET_U_1(bp); bp += 1; len -= 1; - prot = EXTRACT_BE_U_2(bp); + prot = GET_BE_U_2(bp); bp += 2; len -= 2; - vni = EXTRACT_BE_U_3(bp); + vni = GET_BE_U_3(bp); bp += 3; len -= 3; - reserved = EXTRACT_U_1(bp); + reserved = GET_U_1(bp); bp += 1; len -= 1; |