From 3f3f2505f2a02fcc471f7baba884959ccb2233c9 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 10 Dec 2017 16:23:34 -0800 Subject: Make nd_uint8_t and nd_int8_t arrays, to catch direct references. This catches direct references, so we can change them to use EXTRACT_U_1 or EXTRACT_S_1. Also, change some structures to use the nd_ types that weren't already using them. Then make the appropriate EXTRACT_{U,S}_1() changes. --- ip.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ip.h') diff --git a/ip.h b/ip.h index 8179061e..d2c83e05 100644 --- a/ip.h +++ b/ip.h @@ -51,8 +51,8 @@ */ struct ip { nd_uint8_t ip_vhl; /* header length, version */ -#define IP_V(ip) (((ip)->ip_vhl & 0xf0) >> 4) -#define IP_HL(ip) ((ip)->ip_vhl & 0x0f) +#define IP_V(ip) ((EXTRACT_U_1((ip)->ip_vhl) & 0xf0) >> 4) +#define IP_HL(ip) (EXTRACT_U_1((ip)->ip_vhl) & 0x0f) nd_uint8_t ip_tos; /* type of service */ nd_uint16_t ip_len; /* total length */ nd_uint16_t ip_id; /* identification */ -- cgit v1.2.1