diff options
author | David Timber <mieabby@gmail.com> | 2020-09-14 15:47:30 +0930 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-09-14 15:47:30 +0930 |
commit | f7f7332afafd4f965c5ef1d45cc1c7da9275c6ef (patch) | |
tree | 53b8e96d2d070215f0c6ee133cdba58ca93a4138 /src/inet.h | |
parent | c4160ed41717260b5941e2729c444b8ec051d5f0 (diff) |
* 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()
Diffstat (limited to 'src/inet.h')
-rw-r--r-- | src/inet.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 <stdint.h> +#include <stdbool.h> +#include <stddef.h> + +// TODO: don't use these +#include <linux/ip.h> +#include <linux/ipv6.h> + + +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); |