diff options
author | David Timber <mieabby@gmail.com> | 2020-08-20 12:23:35 +0930 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-08-20 15:15:57 +0930 |
commit | 76d4d6b2bafada7b790e817b7324d53f3d3a0c7f (patch) | |
tree | d8b3669fa7b167fc3bf764e971fc6e70bd8d9b49 /src/config.h | |
parent | 7bd3eb3b1ad4209ac4cf4b46f849213d46bc33aa (diff) |
Progress ...
* Move DVault out of executable. Dynamically load it on startup
* Improved testing scheme
* Tidy up prne_*assert* macro series
* Protocol: store host credentials in base64 string. No mask
* Use the lock shm as a shared_global so the stats can persist
* mmap() the executable read-only for later use
Diffstat (limited to 'src/config.h')
-rw-r--r-- | src/config.h | 64 |
1 files changed, 63 insertions, 1 deletions
diff --git a/src/config.h b/src/config.h index 0482493..13beaa4 100644 --- a/src/config.h +++ b/src/config.h @@ -6,5 +6,67 @@ #include <stdbool.h> -extern const uint8_t PRNE_PROG_VER[16]; +#if INTPTR_MAX == INT32_MAX + #define PRNE_HOST_WORDSIZE 32 +#elif INTPTR_MAX == INT64_MAX + #define PRNE_HOST_WORDSIZE 64 +#else + #error "FIXME!" +#endif + +#define PRNE_PROG_VER { 0x11, 0xf7, 0x6b, 0x87, 0x62, 0x1a, 0x47, 0x9c, 0xa2, 0x18, 0x5c, 0x55, 0x40, 0x33, 0x7c, 0x9f } extern const prne_arch_t prne_host_arch; + +#define PRNE_RESOLV_NS_IPV4_GOOGLE_A\ + 0x8, 0x8, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 +#define PRNE_RESOLV_NS_IPV4_GOOGLE_B\ + 0x8, 0x8, 0x4, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 +#define PRNE_RESOLV_NS_IPV4_CLOUDFLARE_A\ + 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 +#define PRNE_RESOLV_NS_IPV4_CLOUDFLARE_B\ + 0x1, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 +#define PRNE_RESOLV_NS_IPV4_QUAD9_A\ + 0x9, 0x9, 0x9, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 +#define PRNE_RESOLV_NS_IPV4_QUAD9_B\ + 0x95, 0x70, 0x70, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 +#define PRNE_RESOLV_NS_IPV4_CLEANBROWSING_A\ + 0xb9, 0xe4, 0xa8, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 +#define PRNE_RESOLV_NS_IPV4_CLEANBROWSING_B\ + 0xb9, 0xe4, 0xa9, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 +#define PRNE_RESOLV_NS_POOL_IPV4 {\ + PRNE_RESOLV_NS_IPV4_GOOGLE_A,\ + PRNE_RESOLV_NS_IPV4_GOOGLE_B,\ + PRNE_RESOLV_NS_IPV4_CLOUDFLARE_A,\ + PRNE_RESOLV_NS_IPV4_CLOUDFLARE_B,\ + PRNE_RESOLV_NS_IPV4_QUAD9_A,\ + PRNE_RESOLV_NS_IPV4_QUAD9_B,\ + PRNE_RESOLV_NS_IPV4_CLEANBROWSING_A,\ + PRNE_RESOLV_NS_IPV4_CLEANBROWSING_B\ +} + +#define PRNE_RESOLV_NS_IPV6_GOOGLE_A\ + 0x20, 0x1, 0x48, 0x60, 0x48, 0x60, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x88, 0x88 +#define PRNE_RESOLV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_NS_IPV6_CLEANBROWSING_A,\ + PRNE_RESOLV_NS_IPV6_CLEANBROWSING_B\ +} |