Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/include/net_checksum.h

    r8d601db r00d7e1b  
    3030 * @{
    3131 */
    32 
    3332/** @file
    3433 * General CRC and checksum computation.
     
    4241
    4342/** IP checksum value for computed zero checksum.
     43 *
    4444 * Zero is returned as 0xFFFF (not flipped)
     45 *
    4546 */
    46 #define IP_CHECKSUM_ZERO        0xffffU
     47#define IP_CHECKSUM_ZERO  0xffffU
    4748
    48 #ifdef ARCH_IS_BIG_ENDIAN
     49#ifdef __BE__
     50
    4951#define compute_crc32(seed, data, length) \
    5052        compute_crc32_be(seed, (uint8_t *) data, length)
    51 #else
     53
     54#endif
     55
     56#ifdef __LE__
     57
    5258#define compute_crc32(seed, data, length) \
    5359        compute_crc32_le(seed, (uint8_t *) data, length)
     60
    5461#endif
    5562
     
    6067extern uint16_t flip_checksum(uint16_t);
    6168extern uint16_t ip_checksum(uint8_t *, size_t);
     69extern uint64_t multicast_hash(const uint8_t addr[6]);
    6270
    6371#endif
Note: See TracChangeset for help on using the changeset viewer.