Re: TCP checksum?

From: Fabrice MARIE (
Date: Thu Jun 13 2002 - 22:51:14 EST

Hello Jeffrey,

On Thursday 13 June 2002 23:10, Shipman, Jeffrey E wrote:
> I'm looking for a function similar to skb_checksum(), but
> for the tcphdr->check field. I'm playing around with a module
> I've written for netfilter and I would like to modify options of
> the IP and TCP headers. For example, right now I'm trying
> to set the destination IP to the source IP, but the TCP checksum
> is coming out incorrectly. How can I calculate this checksum?
> [...]

This functionallity is already provided by the ipt_MIRROR target.

If you want more info on netfilter module writting, read Rusty's
Netfilter Hacking HOWTO at :
and if needed, post netfilter development questions on the
netfilter-devel mailing list, for more info :

Have a nice day,


Fabrice MARIE
Senior R&D Engineer
Celestix Networks

"Silly hacker, root is for administrators" -Unknown - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:30 EST