10#include "ws_symbol_export.h"
17#define SET_CKSUM_VEC_PTR(vecelem, data, length) \
19 vecelem.ptr = (data); \
20 vecelem.len = (length); \
23#define SET_CKSUM_VEC_TVB(vecelem, tvb, offset, length) \
25 vecelem.len = (length); \
26 vecelem.ptr = tvb_get_ptr((tvb), (offset), vecelem.len); \
36WS_DLL_PUBLIC uint16_t
ip_checksum(
const uint8_t *ptr,
int len);
WS_DLL_PUBLIC uint16_t ip_checksum_tvb(tvbuff_t *tvb, int offset, int len)
Calculate the IP checksum for a given TVB.
Definition in_cksum.c:160
WS_DLL_PUBLIC uint16_t in_cksum_shouldbe(uint16_t sum, uint16_t computed_sum)
Calculate the expected checksum value based on the computed checksum and the checksum field value.
Definition in_cksum.c:180
WS_DLL_PUBLIC uint16_t ip_checksum(const uint8_t *ptr, int len)
Calculate the IP checksum for a given buffer.
Definition in_cksum.c:151
WS_DLL_PUBLIC int in_cksum_ret_partial(const vec_t *vec, int veclen, uint16_t *partial)
Calculates a partial checksum for a vector of data.
Definition in_cksum.c:47
WS_DLL_PUBLIC int in_cksum(const vec_t *vec, int veclen)
Calculate the IP checksum for a given vector of data.
Definition in_cksum.c:145
Definition tvbuff-int.h:33