/* * 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
*/
__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
*/
extern __wsum csum_partial_copy_nocheck(constvoid *src, void *dst, int len);
/* * This is a version of ip_fast_csum() optimized for IP headers, * which always checksum on 4 octet boundaries.
*/ staticinline __sum16 ip_fast_csum(constvoid *iph, unsignedint ihl)
{ unsignedint sum = 0; unsignedlong tmp;
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.