From 7d81b3c646c353924e7bd2ee719522694d212ba7 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Tue, 14 Sep 2021 19:02:36 +0200 Subject: checksum: Add checksum.h I forgot to commit this. Signed-off-by: Stefano Brivio --- checksum.h | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 checksum.h (limited to 'checksum.h') diff --git a/checksum.h b/checksum.h new file mode 100644 index 0000000..fb987e1 --- /dev/null +++ b/checksum.h @@ -0,0 +1,5 @@ +uint32_t sum_16b(void *buf, size_t len); +uint16_t csum_fold(uint32_t sum); +uint16_t csum_unaligned(void *buf, size_t len, uint32_t init); +void csum_tcp4(struct iphdr *iph); +uint16_t csum(const void *buf, size_t len, uint32_t init); -- cgit v1.2.3