Re: TCP checksum?

From: Guillaume Morin (guillaume@morinfr.org)
Date: Thu Jun 13 2002 - 10:28:51 EST


Dans un message du 13 jun à 9:10, Shipman, Jeffrey E écrivait :
>
> 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?

There is a netfilter function for that. Look at
ip_nat_core.c:ip_nat_cheat_check.

-- 
Guillaume Morin <guillaume@morinfr.org>

5 years from now everyone will be running free GNU on their 200 MIPS, 64M SPARCstation-5 (Andy Tanenbaum, 30 Jan 1992) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



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