diff options
author | Thomas Gschwantner <tharre3@gmail.com> | 2019-02-08 07:59:54 +0100 |
---|---|---|
committer | Thomas Gschwantner <tharre3@gmail.com> | 2019-02-08 08:00:01 +0100 |
commit | ed194fa8fcfeec3840489cb2a1ad88e124e5f1fd (patch) | |
tree | ce2ad500f429e8deed564b5b0af967ab8e4524f8 /common.h | |
parent | WIP: parsing (diff) | |
download | wg-dynamic-kv_parsing.tar.xz wg-dynamic-kv_parsing.zip |
WIP: parsing (2)kv_parsing
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -9,6 +9,8 @@ #include <stdint.h> #include <stdlib.h> +#include <netinet/in.h> + #define MAX_CONNECTIONS 16 #define MAX_LINESIZE 4096 @@ -50,8 +52,18 @@ struct wg_dynamic_request { struct wg_dynamic_attr *first, *last; }; +struct wg_combined_ip { + uint16_t family; + union { + struct in_addr ip4; + struct in6_addr ip6; + } ip; + uint8_t cidr; +}; + #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) +void free_wg_dynamic_request(struct wg_dynamic_request *req); int parse_request(struct wg_dynamic_request *req, unsigned char *buf, size_t len); |