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

Go to the source code of this file.

Macros

#define tole(x)   ((__force u32) __constant_cpu_to_le32(x))
 
#define tobe(x)   ((__force u32) __constant_cpu_to_be32(x))
 
#define DO_CRC(x)   crc = t0[((crc >> 24) ^ (x)) & 255] ^ (crc << 8)
 
#define DO_CRC4
 
#define DO_CRC8
 

Functions

 MODULE_AUTHOR ("Matt Domsch <[email protected]>")
 
 MODULE_DESCRIPTION ("Various CRC32 calculations")
 
 MODULE_LICENSE ("GPL")
 
u32 __pure crc32_le (u32 crc, unsigned char const *p, size_t len)
 
u32 __pure __crc32c_le (u32 crc, unsigned char const *p, size_t len)
 
 EXPORT_SYMBOL (crc32_le)
 
 EXPORT_SYMBOL (__crc32c_le)
 
u32 __pure crc32_be (u32 crc, unsigned char const *p, size_t len)
 
 EXPORT_SYMBOL (crc32_be)
 

Macro Definition Documentation

#define DO_CRC (   x)    crc = t0[((crc >> 24) ^ (x)) & 255] ^ (crc << 8)
#define DO_CRC4
Value:
(t0[(q) & 255] ^ t1[(q >> 8) & 255] ^ \
t2[(q >> 16) & 255] ^ t3[(q >> 24) & 255])
#define DO_CRC8
Value:
(t4[(q) & 255] ^ t5[(q >> 8) & 255] ^ \
t6[(q >> 16) & 255] ^ t7[(q >> 24) & 255])
#define tobe (   x)    ((__force u32) __constant_cpu_to_be32(x))

Definition at line 41 of file crc32.c.

#define tole (   x)    ((__force u32) __constant_cpu_to_le32(x))

Definition at line 35 of file crc32.c.

Function Documentation

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

Definition at line 194 of file crc32.c.

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

Definition at line 256 of file crc32.c.

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

Definition at line 189 of file crc32.c.

EXPORT_SYMBOL ( crc32_le  )
EXPORT_SYMBOL ( __crc32c_le  )
EXPORT_SYMBOL ( crc32_be  )
MODULE_AUTHOR ( "Matt Domsch <[email protected]>"  )
MODULE_DESCRIPTION ( "Various CRC32 calculations"  )
MODULE_LICENSE ( "GPL"  )