Watt-32 tcp/ip  2.2 dev-rel.10
Functions
chksum.c File Reference

Go to the source code of this file.

Functions

WORD W32_CALL in_checksum (const void *ptr, unsigned len)
 This checksum routine is only used by 16-bit targets (and files outside the library). More...
 
WORD _ip6_checksum (const in6_Header *ip, WORD proto, const void *payload, unsigned payloadlen)
 Generic IPv6 checksum function.
 
int _ip6_tcp_checksum (const in6_Header *ip, const tcp_Header *tcp, unsigned len)
 Check tcp header checksum of an IPv6 packet.
 
int _ip6_udp_checksum (const in6_Header *ip, const udp_Header *udp, unsigned len)
 Check udp header checksum of an IPv6 packet.
 
int _ip6_icmp_checksum (const in6_Header *ip, const void *icmp, unsigned len)
 
int ndis_in_checksum_offload (const void *ptr, unsigned len)
 Do the IP checksum in NIC hardware.
 
int do_checksum (const BYTE *buf, BYTE protocol, unsigned len)
 

Detailed Description

Compute internet checksum on data buffer. 1's complement (~) is done by caller.

Definition in file chksum.c.

Function Documentation

WORD W32_CALL in_checksum ( const void ptr,
unsigned  len 
)

This checksum routine is only used by 16-bit targets (and files outside the library).

32-bit targets use in_checksum_fast() in chksum0.s + chksum0.asm.

Note
`in_check_sum()' and `in_checksum_fast()' are equally fast on a Pentium 4 CPU. But on a Pentium 2 the ASM version is approx. 10 times faster.

Definition at line 29 of file chksum.c.