uc-sdk
|
Go to the source code of this file.
Macros | |
#define | SWAP_BYTES_IN_WORD(w) (((w) & 0xff) << 8) | (((w) & 0xff00) >> 8) |
#define | FOLD_U32T(u) (((u) >> 16) + ((u) & 0x0000ffffUL)) |
#define | LWIP_CHKSUM_COPY_ALGORITHM 0 |
Functions | |
u16_t | inet_chksum (void *dataptr, u16_t len) |
u16_t | inet_chksum_pbuf (struct pbuf *p) |
u16_t | inet_chksum_pseudo (struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, u8_t proto, u16_t proto_len) |
u16_t | inet_chksum_pseudo_partial (struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, u8_t proto, u16_t proto_len, u16_t chksum_len) |
#define FOLD_U32T | ( | u) | (((u) >> 16) + ((u) & 0x0000ffffUL)) |
Split an u32_t in two u16_ts and add them up
Definition at line 53 of file inet_chksum.h.
#define LWIP_CHKSUM_COPY_ALGORITHM 0 |
Definition at line 66 of file inet_chksum.h.
#define SWAP_BYTES_IN_WORD | ( | w) | (((w) & 0xff) << 8) | (((w) & 0xff00) >> 8) |
Swap the bytes in an u16_t: much like htons() for little-endian
Definition at line 47 of file inet_chksum.h.
Definition at line 396 of file inet_chksum.c.
Calculate a checksum over a chain of pbufs (without pseudo-header, much like inet_chksum only pbufs are used).
p | pbuf chain over that the checksum should be calculated |
Definition at line 409 of file inet_chksum.c.
u16_t inet_chksum_pseudo | ( | struct pbuf * | p, |
ip_addr_t * | src, | ||
ip_addr_t * | dest, | ||
u8_t | proto, | ||
u16_t | proto_len | ||
) |
Definition at line 272 of file inet_chksum.c.