summaryrefslogtreecommitdiff
path: root/print-frag6.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-11-18 11:52:52 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-11-18 13:56:40 +0100
commit577621026df8d4a33a34d4e125f9ec964fc0e53c (patch)
treea25ed4b22461cbb115c9e112935c28bcd57406bc /print-frag6.c
parent0e854b0937199956478686ae610ff9f794aafc6b (diff)
downloadtcpdump-577621026df8d4a33a34d4e125f9ec964fc0e53c.tar.gz
Rename EXTRACT_nBITS() macros to EXTRACT_BE_nBITS()
It indicates clearly that these macros are used to extract big-endian integral values.
Diffstat (limited to 'print-frag6.c')
-rw-r--r--print-frag6.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/print-frag6.c b/print-frag6.c
index fbcabc5b..59b9dfef 100644
--- a/print-frag6.c
+++ b/print-frag6.c
@@ -45,19 +45,19 @@ frag6_print(netdissect_options *ndo, register const u_char *bp, register const u
if (ndo->ndo_vflag) {
ND_PRINT((ndo, "frag (0x%08x:%d|%ld)",
- EXTRACT_32BITS(&dp->ip6f_ident),
- EXTRACT_16BITS(&dp->ip6f_offlg) & IP6F_OFF_MASK,
- sizeof(struct ip6_hdr) + EXTRACT_16BITS(&ip6->ip6_plen) -
- (long)(bp - bp2) - sizeof(struct ip6_frag)));
+ EXTRACT_BE_32BITS(&dp->ip6f_ident),
+ EXTRACT_BE_16BITS(&dp->ip6f_offlg) & IP6F_OFF_MASK,
+ sizeof(struct ip6_hdr) + EXTRACT_BE_16BITS(&ip6->ip6_plen) -
+ (long)(bp - bp2) - sizeof(struct ip6_frag)));
} else {
ND_PRINT((ndo, "frag (%d|%ld)",
- EXTRACT_16BITS(&dp->ip6f_offlg) & IP6F_OFF_MASK,
- sizeof(struct ip6_hdr) + EXTRACT_16BITS(&ip6->ip6_plen) -
- (long)(bp - bp2) - sizeof(struct ip6_frag)));
+ EXTRACT_BE_16BITS(&dp->ip6f_offlg) & IP6F_OFF_MASK,
+ sizeof(struct ip6_hdr) + EXTRACT_BE_16BITS(&ip6->ip6_plen) -
+ (long)(bp - bp2) - sizeof(struct ip6_frag)));
}
/* it is meaningless to decode non-first fragment */
- if ((EXTRACT_16BITS(&dp->ip6f_offlg) & IP6F_OFF_MASK) != 0)
+ if ((EXTRACT_BE_16BITS(&dp->ip6f_offlg) & IP6F_OFF_MASK) != 0)
return -1;
else
{