When an RSVP message is received, it is in a raw form: it is a series of bytes.
A class called RsvpPacket has been written to manipulate the messages in this form (checksum calculation, translation to and from a structured form (
)).
The checksum used is the classical Internet checksum. It consists in calculating the 1's complement sum of the pair of adjacent octets composing the message. Checking that a packet is correct means computing the same sum, including the computed checksum, and checking that the result is all 1 bits. The class InternetChecksum was designed to compute these operations, using the properties described in RFC 1071 [#!RFC1071!#].
When a message is received, its validity is thus checked (checksum and length, which must be a multiple of 4), and it is discarded if it is not valid.