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-frag6.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-frag6.c')
-rw-r--r-- | print-frag6.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/print-frag6.c b/print-frag6.c index 618e93bb..818cce2a 100644 --- a/print-frag6.c +++ b/print-frag6.c @@ -46,19 +46,19 @@ frag6_print(netdissect_options *ndo, const u_char *bp, const u_char *bp2) if (ndo->ndo_vflag) { ND_PRINT("frag (0x%08x:%u|%u)", - EXTRACT_BE_U_4(dp->ip6f_ident), - EXTRACT_BE_U_2(dp->ip6f_offlg) & IP6F_OFF_MASK, - (u_int)(sizeof(struct ip6_hdr) + EXTRACT_BE_U_2(ip6->ip6_plen) - - (bp - bp2) - sizeof(struct ip6_frag))); + GET_BE_U_4(dp->ip6f_ident), + GET_BE_U_2(dp->ip6f_offlg) & IP6F_OFF_MASK, + (u_int)(sizeof(struct ip6_hdr) + GET_BE_U_2(ip6->ip6_plen) - + (bp - bp2) - sizeof(struct ip6_frag))); } else { ND_PRINT("frag (%u|%u)", - EXTRACT_BE_U_2(dp->ip6f_offlg) & IP6F_OFF_MASK, - (u_int)(sizeof(struct ip6_hdr) + EXTRACT_BE_U_2(ip6->ip6_plen) - - (bp - bp2) - sizeof(struct ip6_frag))); + GET_BE_U_2(dp->ip6f_offlg) & IP6F_OFF_MASK, + (u_int)(sizeof(struct ip6_hdr) + GET_BE_U_2(ip6->ip6_plen) - + (bp - bp2) - sizeof(struct ip6_frag))); } /* it is meaningless to decode non-first fragment */ - if ((EXTRACT_BE_U_2(dp->ip6f_offlg) & IP6F_OFF_MASK) != 0) + if ((GET_BE_U_2(dp->ip6f_offlg) & IP6F_OFF_MASK) != 0) return -1; else { |