Changes in uspace/lib/net/include/net_checksum.h [8d601db:00d7e1b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/include/net_checksum.h
r8d601db r00d7e1b 30 30 * @{ 31 31 */ 32 33 32 /** @file 34 33 * General CRC and checksum computation. … … 42 41 43 42 /** IP checksum value for computed zero checksum. 43 * 44 44 * Zero is returned as 0xFFFF (not flipped) 45 * 45 46 */ 46 #define IP_CHECKSUM_ZERO 47 #define IP_CHECKSUM_ZERO 0xffffU 47 48 48 #ifdef ARCH_IS_BIG_ENDIAN 49 #ifdef __BE__ 50 49 51 #define compute_crc32(seed, data, length) \ 50 52 compute_crc32_be(seed, (uint8_t *) data, length) 51 #else 53 54 #endif 55 56 #ifdef __LE__ 57 52 58 #define compute_crc32(seed, data, length) \ 53 59 compute_crc32_le(seed, (uint8_t *) data, length) 60 54 61 #endif 55 62 … … 60 67 extern uint16_t flip_checksum(uint16_t); 61 68 extern uint16_t ip_checksum(uint8_t *, size_t); 69 extern uint64_t multicast_hash(const uint8_t addr[6]); 62 70 63 71 #endif
Note:
See TracChangeset
for help on using the changeset viewer.