I am writing a little POSIX program and I need to compute the checksum of a TCP segment, I would like use an existing function in order to avoid to writing one myself.
Something like (pseudocode) :
char *data = ....
u16_integer = computeChecksum(data);
I searched on the web but I did not find a right answer, any suggestion ?