The MPLS WG Archive

Cell Relay Retreat>MPLS WG Archive>month:2001-Apr> msg00058



[Date Prev][Date Next][Thread Prev][Thread Next]  
  [Date Index][Thread Index][Author Index][Subject Index]

Checksum in RSVP messages

  • From: David Charlap <david.charlap@marconi.com>
  • Date: Wed, 04 Apr 2001 11:44:29 -0400

Roberto Guglielmi wrote:
> 
> Hi all,
> I have a couple of questions about calculating RSVP checksum in the
> common header.
> 
> Our SW product implementing RSVP calculates the checksum making the
> one's complement of sum two-by-two of the bytes contained in the
> messages.
> The problem is that using the Sniffer protocol analizer to decode the
> messages sent by the nodes, the checksum seems to be wrong.
> 
> The RFC 2205 says the checksum is calculated in the following way:
> 
>          "The one's complement of the one's complement sum of the
>          message , with the checksum field replaced by zero..."
> 
> Are the bytes within the message supposed to be added one-by-one or
> two-by-two?
> 
> Are we supposed to make the one's complement of the message, make the
> sum and, at the end, the one's complement of the sum?

It's the same algorithm used to generate IP header and TCP checksums.

RFC 1071 explains the algorithm, along with detailed explanations, and
sample code in C and some assembly languages.

-- David