From e6548c643796f036de83163e395f0efd56da4790 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 3 Oct 2024 16:51:06 +0200 Subject: checksum: Add an offset argument in csum_iov() The offset allows any headers that are not part of the data to checksum to be skipped. Signed-off-by: Laurent Vivier Signed-off-by: Stefano Brivio --- checksum.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'checksum.h') diff --git a/checksum.h b/checksum.h index c5964ac..49f7472 100644 --- a/checksum.h +++ b/checksum.h @@ -32,6 +32,7 @@ void csum_icmp6(struct icmp6hdr *icmp6hr, const void *payload, size_t dlen); uint32_t csum_unfolded(const void *buf, size_t len, uint32_t init); uint16_t csum(const void *buf, size_t len, uint32_t init); -uint16_t csum_iov(const struct iovec *iov, size_t n, uint32_t init); +uint16_t csum_iov(const struct iovec *iov, size_t n, size_t offset, + uint32_t init); #endif /* CHECKSUM_H */ -- cgit v1.2.3