Infering Packet Type

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

 



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

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux