Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 (Tek) 9/26/83; site hammer.UUCP
Path: utzoo!linus!decvax!tektronix!orca!hammer!steveg
From: steveg@hammer.UUCP (Steve Glaser)
Newsgroups: net.lan
Subject: Re: (DoD) InterNet Header Checksum
Message-ID: <937@hammer.UUCP>
Date: Sun, 30-Sep-84 18:23:50 EDT
Article-I.D.: hammer.937
Posted: Sun Sep 30 18:23:50 1984
Date-Received: Tue, 2-Oct-84 03:54:50 EDT
References: <624@ttds.UUCP> <52@redwood.UUCP>
Organization: Tektronix, Wilsonville OR
Lines: 8

Berkeley uses a "cute trick" to speed up doing the ones complement
addition on a twos complement machine (like the VAX).  They do the end
around carries at then end of the buffer letting them accumulate in the
high half of a 32 bit register for a while (TCP/IP checksums are 16
bits).  They use the inline assembler for speed and so that they can
get to the vax adwc instruction (add with carry).

Steve Glaser