Ethereal-users: [Ethereal-users] Computing the TCP checksum

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Doug Capellman <dcapellman@xxxxxxxx>
Date: Sun, 10 Mar 2002 13:30:42 -0500
Hello:
I am trying to compute the TCP checksum and I cannot duplicate what ethereal came up with for a value. I read RFC 1071 and on page 5, I used the following method:

byte 0/1    00    01
byte 2/3    f2    03
byte 4/5    f4    f5
byte 6/7    f6    f7

sum         2dc  1f0

                   2     1

sum2           dd  f2

final            dd  f2

Obviously I am not using all of the correct bytes when I compute the checksum. What bytes am I supposed to use when computing the TCP checksum? I am fairly familiar with the TCP header format (32 bytes plus the data). Thanks in advance.

Doug Capellman