A version of LWIP, provided for backwards compatibility.
Dependents: AA_DemoBoard DemoBoard HelloServerDemo DemoBoard_RangeIndicator ... more
inet_chksum.c File Reference
Incluse internet checksum functions. More...
Go to the source code of this file.
Functions | |
static u16_t | lwip_standard_chksum (void *dataptr, u16_t len) |
lwip checksum | |
static u16_t | lwip_standard_chksum (void *dataptr, int len) |
An optimized checksum routine. | |
u16_t | inet_chksum_pbuf (struct pbuf *p) |
Calculate a checksum over a chain of pbufs (without pseudo-header, much like inet_chksum only pbufs are used). |
Detailed Description
Incluse internet checksum functions.
Definition in file trunk/Core/lwIP/core/ipv4/inet_chksum.c.
Function Documentation
u16_t inet_chksum_pbuf | ( | struct pbuf * | p ) |
Calculate a checksum over a chain of pbufs (without pseudo-header, much like inet_chksum only pbufs are used).
- Parameters:
-
p pbuf chain over that the checksum should be calculated
- Returns:
- checksum (as u16_t) to be saved directly in the protocol header
Definition at line 417 of file trunk/Core/lwIP/core/ipv4/inet_chksum.c.
static u16_t lwip_standard_chksum | ( | void * | dataptr, |
u16_t | len | ||
) | [static] |
lwip checksum
- Parameters:
-
dataptr points to start of data to be summed at any boundary len length of data to be summed
- Returns:
- host order (!) lwip checksum (non-inverted Internet sum)
- Note:
- accumulator size limits summable length to 64k
- host endianess is irrelevant (p3 RFC1071)
Definition at line 92 of file trunk/Core/lwIP/core/ipv4/inet_chksum.c.
static u16_t lwip_standard_chksum | ( | void * | dataptr, |
int | len | ||
) | [static] |
An optimized checksum routine.
Basically, it uses loop-unrolling on the checksum loop, treating the head and tail bytes specially, whereas the inner loop acts on 8 bytes at a time.
- start of buffer to be checksummed. May be an odd byte address. number of bytes in the buffer to be checksummed.
- Returns:
- host order (!) lwip checksum (non-inverted Internet sum)
Definition at line 146 of file trunk/Core/lwIP/core/ipv4/inet_chksum.c.
Generated on Tue Jul 12 2022 16:06:29 by 1.7.2