Subject: Re: A question about the IP header checksum
To: None <tech-net@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-net
Date: 12/06/2007 00:07:12
On Wed, 05 Dec 2007, John Nemeth wrote:
> }     Is it proper to substitute a resulting value of 0x0000 with 0xffff as 
> }     is done in UDP?
> 
>      No.  This question could easily be answered by checking the RFC
> for IP (it is fairly easy to read).  See
> ftp://ftp.rfc-editor.org/in-notes/rfc791.txt .

RFC 791 simply refers to one's complement arithmetic without defining
it.  In one's complement arithmetic, both 0x0000 and 0xffff represent
zero, so I'd say that they are interchangeable, in the absence of extra
text in RFC 791 saying that they are not interchangeable.

--apb (Alan Barrett)