I'm working on a Win32 application and have noticed I am getting checksum issues in Wireshark (checking is not enabled by default). The IP header checksum is being set to 0 (this is not a massive issue but it would be preferable to sort it) and the UDP checksum is being set to the value that is expected for the IP header checksum. I am not doing anything to set the IP header checksum since it is out of scope for my project, but I have tried the steps here (also for the UDP checksum) to disable checksum offloading but that has not made a difference. No idea how to get it to set a value for the IP header checksum.
Regarding the UDP checksum, something I think I can affect, I have been experimenting with setsockopt, mainly setsockopt(UdpSocket, SOL_SOCKET, UDP_CHECKSUM_COVERAGE, (const char*)&t, sizeof(t))
, where t is a bool/DWORD set to true, and the setsockopts line is after socket() and bind(), before sendTo(). I have also tried changing SOL_SOCKET to IPPROTO_UDP. I know the socket is set up correctly since it has all been working fine before looking at the checksums. Does anyone know any other things I can try? I feel like I am out of options.
Thanks for any help you can give!