Is there a C library function for calculating or validating a TCP checksum? I saw a few handcoded functions, but thought there must be a lib function somewhere.
Asked
Active
Viewed 1,163 times
0
-
2Related: http://stackoverflow.com/questions/9803201/is-there-a-pre-existing-function-or-code-i-can-use-to-compute-a-tcp-segment-chec?lq=1 http://stackoverflow.com/questions/8845178/c-programming-tcp-checksum it might be worth specifying your environment. – John Carter Sep 21 '12 at 00:23
-
If you're on Linux, see http://stackoverflow.com/questions/2497941/tcp-checksum-and-tcp-offloading?rq=1 – John Carter Sep 21 '12 at 00:31
1 Answers
1
No, there's no standard library function. Everyone just sort of copy&pastes the same in_cksum
function whenever they need it. Silly, eh?

Celada
- 21,627
- 4
- 64
- 78
-
This link is broken because Google Code Search was discontinued in 2013. – Anderson Green Oct 12 '16 at 20:07