Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

inet checksum

0 views
Skip to first unread message

Oli Schwarz

unread,
Sep 16, 2009, 2:34:31 PM9/16/09
to
Hallo,

ich spiele z.Z. mit RAW-Sockets herum. Bei der Berechnung der
Inet-Prüfsumme habe ich einige Verständnisprobleme. In RFC 1071 wird
beschrieben, wie die Prüfsumme zu berechnen ist.

Folgendes habe ich nicht verstanden:

- Die Berechnung soll byteorderunabhängig sein. Warum ist das so?

- Weiterhin verstehe ich diese Passage aus dem RFC nicht:

On a 2's complement machine, the 1's complement sum must be
computed by means of an "end around carry", i.e., any overflows
from the most significant bits are added into the least
significant bits.

Warum muss man den Überlauf in das "least significant byte" addieren?


Ich stehe da gerade auf dem Schlauch. Kann mir bitte jemand helfen?

Oli

Rolf Magnus

unread,
Sep 20, 2009, 2:53:36 PM9/20/09
to
Oli Schwarz wrote:

> - Weiterhin verstehe ich diese Passage aus dem RFC nicht:
>
> On a 2's complement machine, the 1's complement sum must be
> computed by means of an "end around carry", i.e., any overflows
> from the most significant bits are added into the least
> significant bits.
>
> Warum muss man den Überlauf in das "least significant byte" addieren?

Weil das beim Einer-Komplement eben so ist.
http://de.wikipedia.org/wiki/Einer-Komplement


0 new messages