From owner-freebsd-net Mon Mar 11 7:19:18 2002 Delivered-To: freebsd-net@freebsd.org Received: from catalyst.sasknow.net (catalyst.sasknow.net [207.195.92.130]) by hub.freebsd.org (Postfix) with ESMTP id F122A37B404 for ; Mon, 11 Mar 2002 07:19:12 -0800 (PST) Received: from localhost (ryan@localhost) by catalyst.sasknow.net (8.11.6/8.11.6) with ESMTP id g2BFKEO04710; Mon, 11 Mar 2002 09:20:16 -0600 (CST) (envelope-from ryan@sasknow.com) X-Authentication-Warning: catalyst.sasknow.net: ryan owned process doing -bs Date: Mon, 11 Mar 2002 09:20:14 -0600 (CST) From: Ryan Thompson To: alpha Cc: FreeBSD Subject: Re: help with tcp checksum In-Reply-To: <00bd01c1c906$72f7be30$fb1b3bd4@alpha> Message-ID: <20020311090940.B99093-100000@catalyst.sasknow.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 alpha wrote to FreeBSD: > 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, ^^^^^^^^^^^^^ :-) Well, honestly, I haven't had my coffee yet, so I'd probably screw it up anyway. I haven't hand-calculated one of these this century, but perhaps you are forgetting to take the checksum of the IP fields? In the implementations, the TCP checksum is filled with zeros and is calculated 1's comp. on most or all of the IP header fields, as well. Yes, this violates layers. No, I don't remember the exact specification. And, what's wrong with send(2), anyway? :-) Maybe if you post some of your work, outline the steps (as opposed to the wrong answer :-), someone can spot how you got that wrong answer. No part marks unless you show your work. :-) - Ryan -- Ryan Thompson Network Administrator, Accounts SaskNow Technologies - http://www.sasknow.com #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2 Tel: 306-664-3600 Fax: 306-664-1161 Saskatoon Toll-Free: 877-727-5669 (877-SASKNOW) North America To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message