Disabling IP Checksum Calculation

Hello Friends,
I'm constructing the IP Packets by using the RAW Sockets. If I give any value for VER/TTL/Protocol the packet is being transmitted with that particular values.
But in case of IP Checksum, I'm always getting the correct checksum value irrespective of the value I give.
Can anyone please let me know, who is filling the correct checksum and how to disable it??

Thanks in Advance.

Regards,
Aamir

Disabling that functions is a feature of most ethernet cards, it's called "TCP checksum offload". Under Linux you have to execute : "ethtool -K eth0 rx off tx off" - replace eth0 if different name is used, and consult the man pages for "ethtool"

LOL, its the kernel obviously :D, what option did ya use after opening the socket ???
AFAIK, if you include the ip header (which you did) then the kernel will compute that checksum for you if checksum field is 0 otherwise your packet will be sent using that value... So your problem seems a bit weird to me too :confused:

Hello,
I'm getting the following error when running "ethtool -K eth0 rx off tx off"
Cannot set device rx csum settings: Operation not supported.

Thanks in Advance.

Regards,
Aamir

Like I said, this option is available only for certain NICs, it may be the case that you network card doesn't support it. I'm not aware of any other option.

Hello Friends,
I was able to do it by using PF_PACKET option and form the entire packet (ie ethernet+ip+udp).
What ever checksum i give for ip is not getting modified now.

Thanks a lot for your help.

Regards,
Aamir