summaryrefslogtreecommitdiffstats
path: root/contrib/tcpdump/ip.h
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2015-01-07 19:55:18 +0000
committerdelphij <delphij@FreeBSD.org>2015-01-07 19:55:18 +0000
commitf49c5d523af9076a4a59e8dd664f9a897108432e (patch)
treee268839e08c106e178b33bd461d8d0a9c6fb5ad9 /contrib/tcpdump/ip.h
parentc371846049d370ab78d943e60e789cdffe0aad3d (diff)
parent08263d19579d35a7a65e0c8bcb768504ce76d04e (diff)
downloadFreeBSD-src-f49c5d523af9076a4a59e8dd664f9a897108432e.zip
FreeBSD-src-f49c5d523af9076a4a59e8dd664f9a897108432e.tar.gz
MFV r276761: tcpdump 4.6.2.
MFC after: 1 month
Diffstat (limited to 'contrib/tcpdump/ip.h')
-rw-r--r--contrib/tcpdump/ip.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/contrib/tcpdump/ip.h b/contrib/tcpdump/ip.h
index 8a97632..891a89c 100644
--- a/contrib/tcpdump/ip.h
+++ b/contrib/tcpdump/ip.h
@@ -1,4 +1,3 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ip.h,v 1.12 2007-09-14 01:29:28 guy Exp $ (LBL) */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
@@ -34,6 +33,9 @@
* @(#)ip.h 8.2 (Berkeley) 6/1/94
*/
+#ifndef TCPDUMP_IP_H
+#define TCPDUMP_IP_H
+
/*
* Definitions for internet protocol version 4.
* Per RFC 791, September 1981.
@@ -48,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;
@@ -121,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;
@@ -159,6 +161,4 @@ struct ip_timestamp {
#define IPTTLDEC 1 /* subtracted when forwarding */
#define IP_MSS 576 /* default maximum segment size */
-
-/* in print-ip.c */
-extern int nextproto4_cksum(const struct ip *, const u_int8_t *, u_int, u_int);
+#endif /* TCPDUMP_IP_H */
OpenPOWER on IntegriCloud