aboutsummaryrefslogtreecommitdiff
path: root/src/app/config/resolve_addr.h
blob: 6c94fe06ba0eb8a62494f0361e1c4154b2e2fb47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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_v4(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_v4(void);
void reset_last_resolved_addr_v4(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 */