On Thursday 2010-02-25 19:17, supercodeing35271 supercodeing35271 wrote: >Hi,I really do not know that is it correctly of asking such a foolish >question in this high-level mailing list,but i could not find the >answer by google it. >As a recruit,i'm now studying netfilter,i want to write a simply test >kernel module by the function of dropping the packet which the >protocol is TCP.For that i have read the "Using Netfilter >hooks"(http://www.topsight.net/article.php/2003050621055083/print),in >the page there is a piece of code below: You need to look at a recent documentation, such as "Writing Netfilter Modules" PDF/e-book. > static int check_tcp_packet(struct sk_buff *skb) > { > /*........................*/ > if (skb->nh.iph->protocol != IPPROTO_TCP) { > return NF_ACCEPT; > } > > /*................*/ > } -- 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