0

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.

user1190650
  • 3,207
  • 6
  • 27
  • 34
  • 2
    Related: 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 Answers1

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