Rev 4699 | Rev 4722 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4699 | Rev 4711 | ||
---|---|---|---|
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 | /** Computes the ip header checksum. |
|
- | 88 | * 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. |
|
- | 90 | * The zero (0) value will returned in this case if valid. |
|
- | 91 | * @param data The header data. Input parameter. |
|
- | 92 | * @param length The header length in bytes. Input parameter. |
|
- | 93 | * @returns The internet protocol header checksum. |
|
- | 94 | * @returns 0xFFFF if the computed checksum is zero. |
|
- | 95 | */ |
|
- | 96 | uint16_t ip_checksum( uint8_t * data, size_t length ); |
|
- | 97 | ||
87 | #endif |
98 | #endif |
88 | 99 | ||
89 | /** @} |
100 | /** @} |
90 | */ |
101 | */ |