]> The Tcpdump Group git mirrors - tcpdump/commitdiff
fix mistake in bitfield conversion
authoritojun <itojun>
Tue, 3 Oct 2000 03:14:46 +0000 (03:14 +0000)
committeritojun <itojun>
Tue, 3 Oct 2000 03:14:46 +0000 (03:14 +0000)
ip.h
tcp.h

diff --git a/ip.h b/ip.h
index f76cff80ad2819821bf5dd478fceebdb2a4530fa..c5f399d1659915e72b45e75c036016ba1a45b0b4 100644 (file)
--- a/ip.h
+++ b/ip.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ip.h,v 1.5 2000-10-03 02:54:56 itojun Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/ip.h,v 1.6 2000-10-03 03:14:46 itojun Exp $ (LBL) */
 /*
  * Copyright (c) 1982, 1986, 1993
  *     The Regents of the University of California.  All rights reserved.
@@ -145,9 +145,9 @@ 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_flgoflw;    /* flags, overflow counter */
-#define IPTS_FLG(ip)   (((ipt)->ipt_flgoflw & 0xf0) >> 4)
-#define IPTS_OFLW(ip)  ((ipt)->ipt_flgoflw & 0x0f)
+       u_int8_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];
                struct  ipt_ta {
diff --git a/tcp.h b/tcp.h
index 7b2b24e35eb75a261835ff625d31d3e8854d5679..0398868ad90303b0616a7824eb0d4db0919a7ed4 100644 (file)
--- 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