summaryrefslogtreecommitdiff
path: root/ip.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-04-23 00:45:13 -0700
committerGuy Harris <guy@alum.mit.edu>2014-04-23 00:45:13 -0700
commitdbddfda2c806a98b1fc8fd86cc3c34a4f9915d70 (patch)
treed15fd799819a42cba4161976b519dfcc513b7a24 /ip.h
parented85e20e4d6a27d5405f37366dd34b64c10a9211 (diff)
downloadtcpdump-dbddfda2c806a98b1fc8fd86cc3c34a4f9915d70.tar.gz
More getting rid of old u_intN_t.
Diffstat (limited to 'ip.h')
-rw-r--r--ip.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/ip.h b/ip.h
index 64ec5dc6..37570f36 100644
--- a/ip.h
+++ b/ip.h
@@ -50,19 +50,19 @@
* against negative integers quite easily, and fail in subtle ways.
*/
struct ip {
- u_int8_t ip_vhl; /* header length, version */
+ uint8_t ip_vhl; /* header length, version */
#define IP_V(ip) (((ip)->ip_vhl & 0xf0) >> 4)
#define IP_HL(ip) ((ip)->ip_vhl & 0x0f)
- u_int8_t ip_tos; /* type of service */
- u_int16_t ip_len; /* total length */
- u_int16_t ip_id; /* identification */
- u_int16_t ip_off; /* fragment offset field */
+ uint8_t ip_tos; /* type of service */
+ uint16_t ip_len; /* total length */
+ uint16_t ip_id; /* identification */
+ uint16_t ip_off; /* fragment offset field */
#define IP_DF 0x4000 /* dont fragment flag */
#define IP_MF 0x2000 /* more fragments flag */
#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
- u_int8_t ip_ttl; /* time to live */
- u_int8_t ip_p; /* protocol */
- u_int16_t ip_sum; /* checksum */
+ uint8_t ip_ttl; /* time to live */
+ uint8_t ip_p; /* protocol */
+ uint16_t ip_sum; /* checksum */
struct in_addr ip_src,ip_dst; /* source and dest address */
} UNALIGNED;
@@ -123,17 +123,17 @@ struct ip {
* Time stamp option structure.
*/
struct ip_timestamp {
- u_int8_t ipt_code; /* IPOPT_TS */
- u_int8_t ipt_len; /* size of structure (variable) */
- u_int8_t ipt_ptr; /* index of current entry */
- u_int8_t ipt_oflwflg; /* flags, overflow counter */
+ uint8_t ipt_code; /* IPOPT_TS */
+ uint8_t ipt_len; /* size of structure (variable) */
+ uint8_t ipt_ptr; /* index of current entry */
+ uint8_t ipt_oflwflg; /* flags, overflow counter */
#define IPTS_OFLW(ip) (((ipt)->ipt_oflwflg & 0xf0) >> 4)
#define IPTS_FLG(ip) ((ipt)->ipt_oflwflg & 0x0f)
union ipt_timestamp {
- u_int32_t ipt_time[1];
+ uint32_t ipt_time[1];
struct ipt_ta {
struct in_addr ipt_addr;
- u_int32_t ipt_time;
+ uint32_t ipt_time;
} ipt_ta[1];
} ipt_timestamp;
} UNALIGNED;