Date: Wed, 15 Nov 2000 15:04:33 +0200 From: Ruslan Ermilov <ru@FreeBSD.ORG> To: Julian Elischer <julian@elischer.org> Cc: Charles Mott <cmott@scientech.com>, Archie Cobbs <archie@dellroad.org>, net@FreeBSD.ORG, Ari Suutari <ari@suutari.iki.fi> Subject: Re: libalias: Incremental Update of Internet Checksum Message-ID: <20001115150433.A98014@sunbay.com> In-Reply-To: <3A126F63.8EB0D49@elischer.org>; from julian@elischer.org on Wed, Nov 15, 2000 at 03:11:31AM -0800 References: <Pine.BSF.4.21.0011122254240.50684-100000@carcassonne.scientech.com> <Pine.BSF.4.21.0011130015100.50906-100000@carcassonne.scientech.com> <20001113103852.E34671@sunbay.com> <3A126F63.8EB0D49@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 15, 2000 at 03:11:31AM -0800, Julian Elischer wrote: > Ruslan Ermilov wrote: > > > Here's the version I wrote some years ago.. > > #define FIXSUM16(c, op, np) \ > do { \ > (c) -= (u_int16_t) ~*((u_int16_t *) (op)); \ > if ((c) < 0) { \ > (c) += 0xffff; \ > } \ > (c) -= (u_int16_t) *((u_int16_t *) (np)); \ > if ((c) < 0) { \ > (c) += 0xffff; \ > } \ > } while (0) > > it replaces the 16 bit word at *op with the new value at *np and updates > the checksum c > The above is the implementation of 4th equation from RFC 1624, right? But we are talking about the version that allows updating of N 16-bit words, not exactly one word. -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age 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?20001115150433.A98014>