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
> - 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