summaryrefslogtreecommitdiff
path: root/src/app/config/resolve_addr.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2020-05-05 13:42:52 -0400
committerDavid Goulet <dgoulet@torproject.org>2020-05-05 14:24:04 -0400
commita25f16707296b0a25c09c09cc31387b9ef799fae (patch)
tree6337c129e484478d918c21d6f4704ba02c6a5eec /src/app/config/resolve_addr.h
parent445df9e7b5bbb0ea080bbed25dc4f3b52b0eb7df (diff)
downloadtor-a25f16707296b0a25c09c09cc31387b9ef799fae.tar.gz
tor-a25f16707296b0a25c09c09cc31387b9ef799fae.zip
config: New file resolve_addr.{c|h}
Move a series of function from config.c into that new file which is related to address resolving. Part of #33789 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/app/config/resolve_addr.h')
-rw-r--r--src/app/config/resolve_addr.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/app/config/resolve_addr.h b/src/app/config/resolve_addr.h
new file mode 100644
index 0000000000..3747546402
--- /dev/null
+++ b/src/app/config/resolve_addr.h
@@ -0,0 +1,28 @@
+/* Copyright (c) 2020, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file resolve_addr.h
+ * \brief Header file for resolve_addr.c.
+ **/
+
+#ifndef TOR_CONFIG_RESOLVE_ADDR_H
+#define TOR_CONFIG_RESOLVE_ADDR_H
+
+#include "app/config/or_options_st.h"
+
+int resolve_my_address(int warn_severity, const or_options_t *options,
+ uint32_t *addr_out,
+ const char **method_out, char **hostname_out);
+
+uint32_t get_last_resolved_addr(void);
+void reset_last_resolved_addr(void);
+
+MOCK_DECL(int, is_local_addr, (const tor_addr_t *addr));
+
+#ifdef RESOLVE_ADDR_PRIVATE
+
+#endif /* RESOLVE_ADDR_PRIVATE */
+
+#endif /* TOR_CONFIG_RESOLVE_ADDR_H */
+