/* * This is a version of ip_compute_csum() optimized for IP headers, * which always checksum on 4 octet boundaries.
*/ extern __sum16 ip_fast_csum(constvoid *iph, unsignedint ihl);
/* * computes the checksum of the TCP/UDP pseudo-header * returns a 16-bit checksum, already complemented
*/
__sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
__u32 len, __u8 proto, __wsum sum);
/* * computes the checksum of a memory block at buff, length len, * and adds in "sum" (32-bit) * * returns a 32-bit number suitable for feeding into itself * or csum_tcpudp_magic * * this function must be called with even lengths, except * for the last fragment, which may be odd * * it's best to have buff aligned on a 32-bit boundary
*/ extern __wsum csum_partial(constvoid *buff, int len, __wsum sum);
/* * the same as csum_partial, but copies from src while it * checksums * * here even more important to align src and dst on a 32-bit (or even * better 64-bit) boundary
*/ #define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER #define _HAVE_ARCH_CSUM_AND_COPY
__wsum csum_and_copy_from_user(constvoid __user *src, void *dst, int len);
__wsum csum_partial_copy_nocheck(constvoid *src, void *dst, int len);
/* * this routine is used for miscellaneous IP-like checksums, mainly * in icmp.c
*/
extern __sum16 ip_compute_csum(constvoid *buff, int len);
/* * Fold a partial checksum without adding pseudo headers
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.