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-carp.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-carp.c')
-rw-r--r-- | print-carp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/print-carp.c b/print-carp.c index 4d46c97a..6ce70566 100644 --- a/print-carp.c +++ b/print-carp.c @@ -53,8 +53,8 @@ carp_print(netdissect_options *ndo, const u_char *bp, u_int len, u_int ttl) ndo->ndo_protocol = "carp"; ND_TCHECK_1(bp); - version = (EXTRACT_U_1(bp) & 0xf0) >> 4; - type = EXTRACT_U_1(bp) & 0x0f; + version = (GET_U_1(bp) & 0xf0) >> 4; + type = GET_U_1(bp) & 0x0f; if (type == 1) type_s = "advertise"; else @@ -67,16 +67,17 @@ carp_print(netdissect_options *ndo, const u_char *bp, u_int len, u_int ttl) ND_TCHECK_1(bp + 2); ND_TCHECK_1(bp + 5); ND_PRINT("vhid=%u advbase=%u advskew=%u authlen=%u ", - EXTRACT_U_1(bp + 1), EXTRACT_U_1(bp + 5), EXTRACT_U_1(bp + 2), EXTRACT_U_1(bp + 3)); + GET_U_1(bp + 1), GET_U_1(bp + 5), GET_U_1(bp + 2), + GET_U_1(bp + 3)); if (ndo->ndo_vflag) { struct cksum_vec vec[1]; vec[0].ptr = (const uint8_t *)bp; vec[0].len = len; if (ND_TTEST_LEN(bp, len) && in_cksum(vec, 1)) ND_PRINT(" (bad carp cksum %x!)", - EXTRACT_BE_U_2(bp + 6)); + GET_BE_U_2(bp + 6)); } - ND_PRINT("counter=%" PRIu64, EXTRACT_BE_U_8(bp + 8)); + ND_PRINT("counter=%" PRIu64, GET_BE_U_8(bp + 8)); return; trunc: |