Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
crc32.h File Reference
#include <linux/types.h>
#include <linux/bitrev.h>

Go to the source code of this file.

Macros

#define crc32(seed, data, length)   crc32_le(seed, (unsigned char const *)(data), length)
 
#define ether_crc(length, data)   bitrev32(crc32_le(~0, data, length))
 
#define ether_crc_le(length, data)   crc32_le(~0, data, length)
 

Functions

u32 crc32_le (u32 crc, unsigned char const *p, size_t len)
 
u32 crc32_be (u32 crc, unsigned char const *p, size_t len)
 
u32 __crc32c_le (u32 crc, unsigned char const *p, size_t len)
 

Macro Definition Documentation

#define crc32 (   seed,
  data,
  length 
)    crc32_le(seed, (unsigned char const *)(data), length)

Definition at line 16 of file crc32.h.

#define ether_crc (   length,
  data 
)    bitrev32(crc32_le(~0, data, length))

Definition at line 26 of file crc32.h.

#define ether_crc_le (   length,
  data 
)    crc32_le(~0, data, length)

Definition at line 27 of file crc32.h.

Function Documentation

u32 __crc32c_le ( u32  crc,
unsigned char const p,
size_t  len 
)

Definition at line 194 of file crc32.c.

u32 crc32_be ( u32  crc,
unsigned char const p,
size_t  len 
)

Definition at line 256 of file crc32.c.

u32 crc32_le ( u32  crc,
unsigned char const p,
size_t  len 
)

Definition at line 189 of file crc32.c.