[lkml]   [2003]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectip_check_sum problem

I am having problems computing the IP checksum with the th ip_fast_csum.
I would REALLY appreciate if any of you can help me.

This is the function I am using to compute the IP checksum.

void computeIPChecksum(struct iphdr* ip) {
printk("*** IP checksum (before) : %d\n", ip->check);

ip->check = 0; /* it must be pre-zero'd */
ip->check = ip_fast_csum((unsigned char *)ip, ip->ihl);

printk("*** IP checksum (after) : %d\n", ip->check);

Please notice that because I am not modifying the packet at all yet, I
get the same result. Well, I don't. I have no clue why.
Any thoughts?

Please, reply directly to
Thank you so much, in advance,


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

 \ /
  Last update: 2005-03-22 13:34    [W:0.021 / U:3.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site