libosmo-netif 1.7.0.15-fe2d
Osmocom network interface library
ip_checksum.h
1#pragma once
2#include <stdint.h>
3#include <netinet/in.h>
4
5uint16_t osmo_ip_checksum_fast_csum(const void *iph, unsigned int ihl);
6uint32_t osmo_ip_checksum_csum_partial(const void *buff, int len, uint32_t wsum);
7uint16_t osmo_ip_checksum_compute_csum(const void *buff, int len);
8
9uint16_t osmo_ip_checksum_csum_ipv6_magic(const struct in6_addr *saddr,
10 const struct in6_addr *daddr,
11 uint32_t len, uint8_t proto, uint32_t csum);