calculating checksum with pcap.net

May 11, 2015 at 8:39 AM
As a project me and some friends are working on a project that monitors a computer activity on the web, we created a proxy and we are send every packet that comes from his computer to the proxy therefore we need to change the packets values and change the checksum accordingly.
this is the code and errors we get
Header checksum: 0x7b82 [incorrect, should be 0x23c2 (may be caused by "IP checksum offload"?)]
Header checksum: 0x7933 [incorrect, should be 0x2073 (may be caused by "IP checksum offload"?)]
Code :
//chance dest port and ip to proxy
        tcp.DestinationPort = 8080;
        ip.PayloadPacket = tcp;
        ip.DestinationAddress = newIpAddress;
        ip.CalculateIPChecksum();
        tcp.CalculateTCPChecksum();

        //send the new packet with port 8080 and ip eve (send to proxy).
        device.SendPacket((eth));
so we send the packet to a proxy we created with the port 8080, and we stumbled upon a problem with the checksum as you can see.
can you help us or give us the correct way to write the code, we found no example online for CalculateIPChecksum() online.
Coordinator
May 16, 2015 at 11:05 AM
Hi Orfridman,

Please note that Pcap.Net has moved to GitHub.
See http://pcapdot.net

For Q&A, see Pcap.Net Q&A Group.

Boaz.