summaryrefslogtreecommitdiff
path: root/tcp.h
diff options
context:
space:
mode:
authoritojun <itojun>2000-10-03 03:14:46 +0000
committeritojun <itojun>2000-10-03 03:14:46 +0000
commit9d45fb750b14e7def999e9252592d0dbef12983d (patch)
tree3b1115f9afccd3c4d81c0794ecac7df7413514c8 /tcp.h
parent864dbc54eed179c7aa15191f42bb1d1040ac92ad (diff)
downloadtcpdump-9d45fb750b14e7def999e9252592d0dbef12983d.tar.gz
fix mistake in bitfield conversion
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 7b2b24e3..0398868a 100644
--- a/tcp.h
+++ b/tcp.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.5 2000-10-03 02:55:02 itojun Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.6 2000-10-03 03:14:47 itojun Exp $ (LBL) */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
@@ -67,8 +67,8 @@ struct tcphdr {
u_int16_t th_dport; /* destination port */
tcp_seq th_seq; /* sequence number */
tcp_seq th_ack; /* acknowledgement number */
- u_int8_t th_x2off;
-#define TH_OFF(th) ((th)->th_x2off & 0x0f) /* data offset, th_off */
+ u_int8_t th_offx2; /* data offset, rsvd */
+#define TH_OFF(th) (((th)->th_offx2 & 0xf0) >> 4)
u_int8_t th_flags;
#define TH_FIN 0x01
#define TH_SYN 0x02