STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
Macros | Functions
inet_chksum.c File Reference
#include "lwip/opt.h"
#include "lwip/inet_chksum.h"
#include "lwip/def.h"
#include "lwip/ip_addr.h"
#include <stddef.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)
 
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)
 
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)
 

Detailed Description

Incluse internet checksum functions.

Definition in file inet_chksum.c.

Macro Definition Documentation

#define LWIP_CHKSUM   lwip_standard_chksum

Definition at line 60 of file inet_chksum.c.

#define LWIP_CHKSUM_ALGORITHM   2

Definition at line 62 of file inet_chksum.c.

Function Documentation

u16_t inet_chksum ( const void *  dataptr,
u16_t  len 
)

Definition at line 558 of file inet_chksum.c.

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
ppbuf chain over that the checksum should be calculated
Returns
checksum (as u16_t) to be saved directly in the protocol header

Definition at line 571 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 382 of file inet_chksum.c.

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 529 of file inet_chksum.c.

u16_t lwip_standard_chksum ( const void *  dataptr,
int  len 
)

Definition at line 136 of file inet_chksum.c.