Re: [PATCH] tcp: unify tcp flag macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 2010-06-12 07:59, Changli Gao wrote:
>--- a/include/net/tcp.h
>+++ b/include/net/tcp.h
>@@ -602,6 +602,17 @@ extern u32	__tcp_select_window(struct sock *sk);
>  */
> #define tcp_time_stamp		((__u32)(jiffies))
> 
>+#define tcp_flag_byte(th) (((u_int8_t *)th)[13])
>+
>+#define	TH_FIN	0x01
>+#define	TH_SYN	0x02
>+#define	TH_RST	0x04
>+#define	TH_PUSH	0x08
>+#define	TH_ACK	0x10
>+#define	TH_URG	0x20
>+#define	TH_ECE	0x40
>+#define	TH_CWR	0x80

I'd prefer something less generic, like TCPHDR_{FIN,SYN,etc}.

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux