Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 2002 16:10:02 +0200
From:      "alpha" <alpha_byte@centras.lt>
To:        "FreeBSD" <freebsd-net@freebsd.org>
Subject:   help with tcp checksum
Message-ID:  <00bd01c1c906$72f7be30$fb1b3bd4@alpha>

next in thread | raw e-mail | index | archive | help
hi,

 nobody wants to help me with checksum. so i decided to ask very simply.
 here's my generated all packet from david c. witt site's example code:

 0000  00 50 04 35 44 49 00 80  48 AF D8 3E 08 00 45 00   .P.5DI..H..>..E.
 0010  00 BC 49 00 00 00 FF 06  F0 E4 C0 A8 00 05 C0 A8   ..I.............
 0020  00 01 00 50 04 06 00 AA  00 5F 00 0C 50 62 50 11   ...P....._..PbP.
 0030  05 B4 CA CF 00 00 48 54  54 50 2F 31 2E 30 20 32   ......HTTP/1.0.2
 0040  30 30 20 4F 4B 0D 0A 43  6F 6E 74 65 6E 74 2D 74   00.OK..Content-t
 0050  79 70 65 3A 20 74 65 78  74 2F 68 74 6D 6C 0D 0A   ype:.text/html..
 0060  0D 0A 3C 48 54 4D 4C 3E  3C 62 6F 64 79 3E 53 69   ..<HTML><body>Si
 0070  6D 6D 53 74 69 63 6B 26  72 65 67 3B 20 57 65 62   mmStick&reg;.Web
 0080  20 53 65 72 76 65 72 3C  62 72 3E 75 73 69 6E 67   .Server<br>using
 0090  20 61 20 50 49 43 20 31  36 46 38 37 34 3C 62 72   .a.PIC.16F874<br
 00A0  3E 62 79 20 44 61 76 69  64 20 43 2E 20 57 69 74   >by.David.C..Wit
 00B0  74 20 28 31 32 2F 32 34  2F 30 30 29 3C 2F 62 6F   t.(12/24/00)</bo
 00C0  64 79 3E 3C 2F 48 54 4D  4C 3E                     dy></HTML>

 TCP header begins at 0022h. as you can see checksum generated is CACFh. and
 simple question: how to get this checksum? i know all algorithms, but they
 show me CAE3h, but not CACFh. if you don't be lazy and try to calculate it,
 you'll see that i'm right. but how computer accepts packet with this
 checksum and rejects with correct - CAE3h. i read rfc1071 and rfc793 and i
 did all by these documentations and i know this checksum algotirhm, but i
 can't understand how to get CACFh checksum from this TCP header. help me
 please!

 Darius


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00bd01c1c906$72f7be30$fb1b3bd4>