mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 18:14:29 +08:00
fix mistake in bitfield conversion
This commit is contained in:
parent
864dbc54ee
commit
9d45fb750b
8
ip.h
8
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 {
|
||||
|
6
tcp.h
6
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
|
||||
|
Loading…
Reference in New Issue
Block a user