Subversion Repositories HelenOS

Rev

Rev 4711 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4711 Rev 4722
Line 82... Line 82...
82
 *  @param sum Computed checksum. Input parameter.
82
 *  @param sum Computed checksum. Input parameter.
83
 *  @returns Compacted computed checksum to the 16 bits.
83
 *  @returns Compacted computed checksum to the 16 bits.
84
 */
84
 */
85
uint16_t    compact_checksum( uint32_t sum );
85
uint16_t    compact_checksum( uint32_t sum );
86
 
86
 
-
 
87
/** Returns or flips the checksum if zero.
-
 
88
 *  @param checksum The computed checksum. Input parameter.
-
 
89
 *  @returns The internet protocol header checksum.
-
 
90
 *  @returns 0xFFFF if the computed checksum is zero.
-
 
91
 */
-
 
92
uint16_t    flip_checksum( uint16_t checksum );
-
 
93
 
87
/** Computes the ip header checksum.
94
/** Computes the ip header checksum.
88
 *  To compute the checksum of a new packet, the checksum header field must be zero.
95
 *  To compute the checksum of a new packet, the checksum header field must be zero.
89
 *  To check the checksum of a received packet, the checksum may be left set.
96
 *  To check the checksum of a received packet, the checksum may be left set.
90
 *  The zero (0) value will returned in this case if valid.
97
 *  The zero (0) value will be returned in this case if valid.
91
 *  @param data The header data. Input parameter.
98
 *  @param data The header data. Input parameter.
92
 *  @param length The header length in bytes. Input parameter.
99
 *  @param length The header length in bytes. Input parameter.
93
 *  @returns The internet protocol header checksum.
100
 *  @returns The internet protocol header checksum.
94
 *  @returns 0xFFFF if the computed checksum is zero.
101
 *  @returns 0xFFFF if the computed checksum is zero.
95
 */
102
 */