Question: how tcp checksum is calculated?
Answer: Then it starts calculating the checksum by dividing the whole thing into 16 bit chunks(pseudo header, tcp data, tcp header) and then adds it. Finally it calculates the ones complement as we did earlier. Once the checksum is calculated, the result of the checksum will then go to the right place.