Defines | Functions

alexb/lib/lwip/contrib/src/core/ipv4/inet_chksum.c File Reference

Incluse internet checksum functions. More...

#include "lwip/opt.h"
#include "lwip/inet_chksum.h"
#include "lwip/def.h"
#include <stddef.h>
#include <string.h>

Defines

#define LWIP_CHKSUM   lwip_standard_chksum
#define LWIP_CHKSUM_ALGORITHM   2

Functions

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)
u16_t inet_chksum (void *dataptr, u16_t len)
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.


Define Documentation

#define LWIP_CHKSUM   lwip_standard_chksum
#define LWIP_CHKSUM_ALGORITHM   2

Function Documentation

u16_t inet_chksum ( void *  dataptr,
u16_t  len 
)
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
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 
)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines