I've been working with raw sockets for a bit, and I've managed to figure out IP header checksum calculation, but I've hit a wall here. What I can't seem to get a good understanding of is the checksums in the protocol (UDP, TCP, ICMP, etc) headers as seen in this screenshot.
I understand that the pseudo header is involved, but what I don't understand from all of the guides that I could find is where the data (payload) comes in. The guides are very vague when it is mentioned, some imply that the data itself is used while others say it is only the length of the data. Could someone provide some more in-depth material on this subject? Or maybe a PoC script with comments explaining the process of the calculation?