Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
checksum_64.h File Reference
#include <linux/compiler.h>
#include <asm/uaccess.h>
#include <asm/byteorder.h>

Go to the source code of this file.

Macros

#define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER   1
 
#define HAVE_CSUM_COPY_USER   1
 
#define csum_and_copy_to_user   csum_partial_copy_to_user
 
#define csum_and_copy_from_user   csum_partial_copy_from_user
 
#define _HAVE_ARCH_IPV6_CSUM   1
 

Functions

__wsum csum_partial (const void *buff, int len, __wsum sum)
 
__wsum csum_partial_copy_generic (const void *src, const void *dst, int len, __wsum sum, int *src_err_ptr, int *dst_err_ptr)
 
__wsum csum_partial_copy_from_user (const void __user *src, void *dst, int len, __wsum isum, int *errp)
 
__wsum csum_partial_copy_to_user (const void *src, void __user *dst, int len, __wsum isum, int *errp)
 
__wsum csum_partial_copy_nocheck (const void *src, void *dst, int len, __wsum sum)
 
__sum16 ip_compute_csum (const void *buff, int len)
 
__sum16 csum_ipv6_magic (const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, unsigned short proto, __wsum sum)
 

Macro Definition Documentation

#define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER   1

Definition at line 131 of file checksum_64.h.

#define _HAVE_ARCH_IPV6_CSUM   1

Definition at line 177 of file checksum_64.h.

#define csum_and_copy_from_user   csum_partial_copy_from_user

Definition at line 150 of file checksum_64.h.

#define csum_and_copy_to_user   csum_partial_copy_to_user

Definition at line 149 of file checksum_64.h.

#define HAVE_CSUM_COPY_USER   1

Definition at line 132 of file checksum_64.h.

Function Documentation

__sum16 csum_ipv6_magic ( const struct in6_addr saddr,
const struct in6_addr daddr,
__u32  len,
unsigned short  proto,
__wsum  sum 
)

Definition at line 129 of file csum-wrappers_64.c.

__wsum csum_partial ( const void buff,
int  len,
__wsum  sum 
)

csum_partial - Compute an internet checksum. : buffer to be checksummed : length of buffer. : initial sum to be added in (32bit unfolded)

Returns the 32bit unfolded internet checksum of the buffer. Before filling it in it needs to be csum_fold()'ed. buff should be aligned to a 64bit boundary if possible.

Definition at line 164 of file checksum.c.

__wsum csum_partial_copy_from_user ( const void __user src,
void dst,
int  len,
__wsum  sum,
int csum_err 
)

csum_partial_copy_from_user - Copy and checksum from user space. : source address (user space) : destination address : number of bytes to be copied. : initial sum that is added into the result (32bit unfolded) : set to -EFAULT for an bad source address.

Returns an 32bit unfolded checksum of the buffer. src and dst are best aligned to 64bits.

Definition at line 333 of file csum_partial_copy.c.

__wsum csum_partial_copy_generic ( const void src,
const void dst,
int  len,
__wsum  sum,
int src_err_ptr,
int dst_err_ptr 
)
__wsum csum_partial_copy_nocheck ( const void src,
void dst,
int  len,
__wsum  sum 
)

csum_partial_copy_nocheck - Copy and checksum. : source address : destination address : number of bytes to be copied. : initial sum that is added into the result (32bit unfolded)

Returns an 32bit unfolded checksum of the buffer.

Definition at line 374 of file csum_partial_copy.c.

__wsum csum_partial_copy_to_user ( const void src,
void __user dst,
int  len,
__wsum  isum,
int errp 
)

csum_partial_copy_to_user - Copy and checksum to user space. : source address : destination address (user space) : number of bytes to be copied. : initial sum that is added into the result (32bit unfolded) : set to -EFAULT for an bad destination address.

Returns an 32bit unfolded checksum of the buffer. src and dst are best aligned to 64bits.

Definition at line 82 of file csum-wrappers_64.c.

__sum16 ip_compute_csum ( const void buff,
int  len 
)

ip_compute_csum - Compute an 16bit IP checksum. : buffer address. : length of buffer.

Returns the 16bit folded/inverted checksum of the passed buffer. Ready to fill in.

Definition at line 181 of file checksum.c.