aboutsummaryrefslogtreecommitdiff
path: root/src/resolv.h
diff options
context:
space:
mode:
authorDavid Timber <mieabby@gmail.com>2020-08-24 09:37:43 +0930
committerDavid Timber <mieabby@gmail.com>2020-08-24 10:05:29 +0930
commitacf0b7a45171555eba2c10a6ef84f915c62f6791 (patch)
tree7253e8d86a199948530671c8bf59ecbb2c6e08f8 /src/resolv.h
parent076671e7aa28451de087088c2e47f9e6064ae434 (diff)
* htbt checkpoint
* Change PRNE_BUILD_ENTROPY to uint8_t array * endian.h problem * Remove "-I." CFLAG added by Automake () * Moved endian conversion macros to endian.h * Moved DNS server config from config.h to resolv.h to reduce compile time * Refactor resolv_ensure_act_dns_fd() to reduce binary size
Diffstat (limited to 'src/resolv.h')
-rw-r--r--src/resolv.h56
1 files changed, 55 insertions, 1 deletions
diff --git a/src/resolv.h b/src/resolv.h
index c62c642..44a2be8 100644
--- a/src/resolv.h
+++ b/src/resolv.h
@@ -19,7 +19,7 @@ typedef uint16_t prne_resolv_rcode_t;
typedef enum {
PRNE_RESOLV_QR_NONE = -1,
-
+
PRNE_RESOLV_QR_OK,
PRNE_RESOLV_QR_ERR,
PRNE_RESOLV_QR_PRO_ERR,
@@ -68,6 +68,60 @@ struct prne_resolv_rr {
uint16_t rd_len;
};
+#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_CLOUDFL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_RESOLV_NS_IPV6_CLEANBROWSING_B\
+}
+
/* Default Nameserver Pools
*
* For testing only. Referencing these will increase the size of the binary.