Hi I have developed a kernel module which receives packet from the linux kernel. It receives by adding a hook in the netif_recieve_skb() function. My kernel module which receives the packet is an IP packet. How do i get to know whether its a TCP packet or UDP packet. There are separate headers for TCP and UDP processing but how do i typecast the skb to tcp or udp. or rather how do i know to which header should i typecast the socket buffer to. Which field says that its a TCP packet or UDP packet ? Cheers, Balaji -- To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html