[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTikZSn5zJYNPU2mdcBiyY7jfBOvq0f1khlbue4JD@mail.gmail.com>
Date: Sat, 12 Jun 2010 17:21:09 +0800
From: Changli Gao <xiaosuo@...il.com>
To: Jan Engelhardt <jengelh@...ozas.de>
Cc: "David S. Miller" <davem@...emloft.net>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
"Pekka Savola (ipv6)" <pekkas@...core.fi>,
James Morris <jmorris@...ei.org>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
Patrick McHardy <kaber@...sh.net>, netdev@...r.kernel.org,
netfilter-devel@...r.kernel.org
Subject: Re: [PATCH] tcp: unify tcp flag macros
On Sat, Jun 12, 2010 at 4:18 PM, Jan Engelhardt <jengelh@...ozas.de> wrote:
>
> 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}.
>
>
The same macros are definied by BSDs too. So I think it is better to
keep them the same.
--
Regards,
Changli Gao(xiaosuo@...il.com)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists