Changeset 59ecd4a in mainline for uspace/lib/net/include/net_checksum.h
- Timestamp:
- 2010-04-04T21:41:47Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5db9084
- Parents:
- 36a75a2 (diff), ee7e82a9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/include/net_checksum.h
r36a75a2 r59ecd4a 65 65 * @returns The computed CRC32 of the length bits of the data. 66 66 */ 67 uint32_t compute_crc32_le(uint32_t seed, uint8_t * data, size_t length);67 extern uint32_t compute_crc32_le(uint32_t seed, uint8_t * data, size_t length); 68 68 69 69 /** Computes CRC32 value in the big-endian environment. … … 73 73 * @returns The computed CRC32 of the length bits of the data. 74 74 */ 75 uint32_t compute_crc32_be(uint32_t seed, uint8_t * data, size_t length);75 extern uint32_t compute_crc32_be(uint32_t seed, uint8_t * data, size_t length); 76 76 77 77 /** Computes sum of the 2 byte fields. … … 82 82 * @returns The computed checksum of the length bytes of the data. 83 83 */ 84 uint32_t compute_checksum(uint32_t seed, uint8_t * data, size_t length);84 extern uint32_t compute_checksum(uint32_t seed, uint8_t * data, size_t length); 85 85 86 86 /** Compacts the computed checksum to the 16 bit number adding the carries. … … 88 88 * @returns Compacted computed checksum to the 16 bits. 89 89 */ 90 uint16_t compact_checksum(uint32_t sum);90 extern uint16_t compact_checksum(uint32_t sum); 91 91 92 92 /** Returns or flips the checksum if zero. … … 95 95 * @returns 0xFFFF if the computed checksum is zero. 96 96 */ 97 uint16_t flip_checksum(uint16_t checksum);97 extern uint16_t flip_checksum(uint16_t checksum); 98 98 99 99 /** Computes the ip header checksum. … … 106 106 * @returns 0xFFFF if the computed checksum is zero. 107 107 */ 108 uint16_t ip_checksum(uint8_t * data, size_t length);108 extern uint16_t ip_checksum(uint8_t * data, size_t length); 109 109 110 110 #endif
Note:
See TracChangeset
for help on using the changeset viewer.