From 577621026df8d4a33a34d4e125f9ec964fc0e53c Mon Sep 17 00:00:00 2001 From: Francois-Xavier Le Bail Date: Sat, 18 Nov 2017 11:52:52 +0100 Subject: Rename EXTRACT_nBITS() macros to EXTRACT_BE_nBITS() It indicates clearly that these macros are used to extract big-endian integral values. --- print-geonet.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'print-geonet.c') diff --git a/print-geonet.c b/print-geonet.c index 9da89bfe..f30e434b 100644 --- a/print-geonet.c +++ b/print-geonet.c @@ -75,8 +75,8 @@ static void print_btp(netdissect_options *ndo, const u_char *bp) { - uint16_t dest = EXTRACT_16BITS(bp+0); - uint16_t src = EXTRACT_16BITS(bp+2); + uint16_t dest = EXTRACT_BE_16BITS(bp + 0); + uint16_t src = EXTRACT_BE_16BITS(bp + 2); ND_PRINT((ndo, "; BTP Dst:%u Src:%u", dest, src)); } @@ -92,9 +92,9 @@ print_long_pos_vector(netdissect_options *ndo, if (!ND_TTEST2(*(bp+12), 8)) return (-1); - lat = EXTRACT_32BITS(bp+12); + lat = EXTRACT_BE_32BITS(bp + 12); ND_PRINT((ndo, "lat:%d ", lat)); - lon = EXTRACT_32BITS(bp+16); + lon = EXTRACT_BE_32BITS(bp + 16); ND_PRINT((ndo, "lon:%d", lon)); return (0); } @@ -132,7 +132,7 @@ geonet_print(netdissect_options *ndo, const u_char *bp, u_int length, next_hdr = bp[0] & 0x0f; hdr_type = bp[1] >> 4; hdr_subtype = bp[1] & 0x0f; - payload_length = EXTRACT_16BITS(bp+4); + payload_length = EXTRACT_BE_16BITS(bp + 4); hop_limit = bp[7]; switch (next_hdr) { -- cgit v1.2.1