summaryrefslogtreecommitdiff
path: root/tcp.h
diff options
context:
space:
mode:
authorguy <guy>2000-09-29 05:05:47 +0000
committerguy <guy>2000-09-29 05:05:47 +0000
commit6de29a031460967d9b26716a6b7a7369e7713137 (patch)
tree52d21ff23e41b319a117184902a8331fad969591 /tcp.h
parentcf53dc05f1c854cc8cb94afd3409bbf033a055ed (diff)
downloadtcpdump-6de29a031460967d9b26716a6b7a7369e7713137.tar.gz
Declare bitfields as "u_int", not "u_char"; ANSI C doesn't guarantee
that bitfields other than "int" or "unsigned int" are allowed, some compilers warn about them, and, given that the declaration of a bit field says how many bits it is wide, declaring them "u_char" doesn't have any advantage (other than making it a bit clearer, when reading the header, that the bitfields in question are part of a single byte).
Diffstat (limited to 'tcp.h')
-rw-r--r--tcp.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tcp.h b/tcp.h
index 0addc8a4..c39cce7e 100644
--- a/tcp.h
+++ b/tcp.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.2 2000-09-23 08:54:43 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.3 2000-09-29 05:05:48 guy Exp $ (LBL) */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
@@ -68,11 +68,11 @@ struct tcphdr {
tcp_seq th_seq; /* sequence number */
tcp_seq th_ack; /* acknowledgement number */
#if BYTE_ORDER == LITTLE_ENDIAN
- u_char th_x2:4, /* (unused) */
+ u_int th_x2:4, /* (unused) */
th_off:4; /* data offset */
#endif
#if BYTE_ORDER == BIG_ENDIAN
- u_char th_off:4, /* data offset */
+ u_int th_off:4, /* data offset */
th_x2:4; /* (unused) */
#endif
u_char th_flags;