10#include "ws_symbol_export.h"
26#define SET_CKSUM_VEC_PTR(vecelem, data, length) \
28 vecelem.ptr = (data); \
29 vecelem.len = (length); \
39#define SET_CKSUM_VEC_TVB(vecelem, tvb, offset, length) \
41 vecelem.len = (length); \
42 vecelem.ptr = tvb_get_ptr((tvb), (offset), vecelem.len); \
52WS_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
Core tvbuff (testy virtual buffer) structure representing a region of packet data,...
Definition tvbuff-int.h:95
Represents a contiguous buffer fragment used as input to checksum computation routines.
Definition in_cksum.h:15
int len
Definition in_cksum.h:17
const uint8_t * ptr
Definition in_cksum.h:16