ReactOS 0.4.16-dev-297-gc569aee
|
#include "lwip/opt.h"
#include "lwip/inet_chksum.h"
#include "lwip/def.h"
#include "lwip/ip_addr.h"
#include <string.h>
Go to the source code of this file.
Macros | |
#define | LWIP_CHKSUM lwip_standard_chksum |
#define | LWIP_CHKSUM_ALGORITHM 2 |
Functions | |
u16_t | lwip_standard_chksum (const void *dataptr, int len) |
static u16_t | inet_cksum_pseudo_base (struct pbuf *p, u8_t proto, u16_t proto_len, u32_t acc) |
u16_t | ip_chksum_pseudo (struct pbuf *p, u8_t proto, u16_t proto_len, const ip_addr_t *src, const ip_addr_t *dest) |
static u16_t | inet_cksum_pseudo_partial_base (struct pbuf *p, u8_t proto, u16_t proto_len, u16_t chksum_len, u32_t acc) |
u16_t | ip_chksum_pseudo_partial (struct pbuf *p, u8_t proto, u16_t proto_len, u16_t chksum_len, const ip_addr_t *src, const ip_addr_t *dest) |
u16_t | inet_chksum (const void *dataptr, u16_t len) |
u16_t | inet_chksum_pbuf (struct pbuf *p) |
Internet checksum functions.
These are some reference implementations of the checksum algorithm, with the aim of being simple, correct and fully portable. Checksumming is the first thing you would want to optimize for your platform. If you create your own version, link it in and in your cc.h put:
#define LWIP_CHKSUM your_checksum_routine
Or you can select from the implementations below by defining LWIP_CHKSUM_ALGORITHM to 1, 2 or 3.
Definition in file inet_chksum.c.
#define LWIP_CHKSUM lwip_standard_chksum |
Definition at line 57 of file inet_chksum.c.
#define LWIP_CHKSUM_ALGORITHM 2 |
Definition at line 59 of file inet_chksum.c.
Definition at line 555 of file inet_chksum.c.
Referenced by create_ip4_input_fragment(), tcp_create_segment_wnd(), and test_udp_create_test_packet().
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 568 of file inet_chksum.c.
|
static |
Parts of the pseudo checksum which are common to IPv4 and IPv6
Definition at line 260 of file inet_chksum.c.
|
static |
Parts of the pseudo checksum which are common to IPv4 and IPv6
Definition at line 399 of file inet_chksum.c.
u16_t ip_chksum_pseudo | ( | struct pbuf * | p, |
u8_t | proto, | ||
u16_t | proto_len, | ||
const ip_addr_t * | src, | ||
const ip_addr_t * | dest | ||
) |
Definition at line 379 of file inet_chksum.c.
Referenced by START_TEST(), and tcp_create_segment_wnd().
u16_t ip_chksum_pseudo_partial | ( | struct pbuf * | p, |
u8_t | proto, | ||
u16_t | proto_len, | ||
u16_t | chksum_len, | ||
const ip_addr_t * | src, | ||
const ip_addr_t * | dest | ||
) |
Definition at line 526 of file inet_chksum.c.
Definition at line 133 of file inet_chksum.c.