From f7f7332afafd4f965c5ef1d45cc1c7da9275c6ef Mon Sep 17 00:00:00 2001 From: David Timber Date: Mon, 14 Sep 2020 15:47:30 +0930 Subject: * Add "--enable-static" configure option * Change "PRNE_DEBUG" macro use * Add "PRNE_VERBOSE" * Impl "recon" * Add "inet.h" for Internet Protocol stuff * Changes regarding "PRNE_RND_WELL512_SEEDLEN" * Add prne_own_realloc() for objects with multiple array memebers * Add prne_add_timespec() --- src/inet.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/inet.h (limited to 'src/inet.h') diff --git a/src/inet.h b/src/inet.h new file mode 100644 index 0000000..8e593f5 --- /dev/null +++ b/src/inet.h @@ -0,0 +1,22 @@ +#include +#include +#include + +// TODO: don't use these +#include +#include + + +void prne_netmask_from_cidr (uint8_t *out, size_t cidr); +uint16_t prne_calc_tcp_chksum4 ( + const struct iphdr *ih, + const uint8_t *th, + size_t th_len, + const uint8_t *data, + size_t data_len); +uint16_t prne_calc_tcp_chksum6 ( + const struct ipv6hdr *ih, + const uint8_t *th, + size_t th_len, + const uint8_t *data, + size_t data_len); -- cgit