X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/bfe9582ec625704c427b441dfa3a57d7a99604b8..b51a0dafc7861eb31d21524ec067d7c529a664b8:/ip.h diff --git a/ip.h b/ip.h index 8179061e..ca87548f 100644 --- a/ip.h +++ b/ip.h @@ -51,13 +51,13 @@ */ 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) ((GET_U_1((ip)->ip_vhl) & 0xf0) >> 4) +#define IP_HL(ip) (GET_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 */ nd_uint16_t ip_off; /* fragment offset field */ -#define IP_DF 0x4000 /* dont fragment flag */ +#define IP_DF 0x4000 /* don't fragment flag */ #define IP_MF 0x2000 /* more fragments flag */ #define IP_OFFMASK 0x1fff /* mask for fragmenting bits */ nd_uint8_t ip_ttl; /* time to live */