From owner-freebsd-net Mon Mar 11 6:10:17 2002 Delivered-To: freebsd-net@freebsd.org Received: from mail.takas.lt (mail-src.takas.lt [212.59.31.66]) by hub.freebsd.org (Postfix) with ESMTP id 2EE0937B405 for ; Mon, 11 Mar 2002 06:10:09 -0800 (PST) Received: from alpha ([212.59.27.251]) by mail.takas.lt with Microsoft SMTPSVC(5.0.2195.2966); Mon, 11 Mar 2002 16:10:07 +0200 Message-ID: <00bd01c1c906$72f7be30$fb1b3bd4@alpha> From: "alpha" To: "FreeBSD" Subject: help with tcp checksum Date: Mon, 11 Mar 2002 16:10:02 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1257" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-OriginalArrivalTime: 11 Mar 2002 14:10:08.0298 (UTC) FILETIME=[7335D8A0:01C1C906] Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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 ..Si 0070 6D 6D 53 74 69 63 6B 26 72 65 67 3B 20 57 65 62 mmStick®.Web 0080 20 53 65 72 76 65 72 3C 62 72 3E 75 73 69 6E 67 .Server
using 0090 20 61 20 50 49 43 20 31 36 46 38 37 34 3C 62 72 .a.PIC.16F874
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) 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