aboutgitcodebugslistschat
path: root/checksum.h
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2024-10-03 16:51:06 +0200
committerStefano Brivio <sbrivio@redhat.com>2024-10-04 14:51:08 +0200
commite6548c643796f036de83163e395f0efd56da4790 (patch)
tree373cacbab76e3027c785815dba789652d8f11157 /checksum.h
parentfd8334b25dfa0cf4a93bb7fad6728f3bd0e31c6d (diff)
downloadpasst-e6548c643796f036de83163e395f0efd56da4790.tar
passt-e6548c643796f036de83163e395f0efd56da4790.tar.gz
passt-e6548c643796f036de83163e395f0efd56da4790.tar.bz2
passt-e6548c643796f036de83163e395f0efd56da4790.tar.lz
passt-e6548c643796f036de83163e395f0efd56da4790.tar.xz
passt-e6548c643796f036de83163e395f0efd56da4790.tar.zst
passt-e6548c643796f036de83163e395f0efd56da4790.zip
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 <lvivier@redhat.com> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'checksum.h')
-rw-r--r--checksum.h3
1 files changed, 2 insertions, 1 deletions
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 */