mirror of https://github.com/oxen-io/lokinet
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
6 years ago
|
#ifndef LLARP_DNS_DOTLOKILOOKUP_HPP
|
||
|
#define LLARP_DNS_DOTLOKILOOKUP_HPP
|
||
6 years ago
|
|
||
6 years ago
|
#include <dnsd.hpp>
|
||
6 years ago
|
#include <service/address.hpp>
|
||
6 years ago
|
|
||
6 years ago
|
using map_address_hook_func =
|
||
6 years ago
|
std::function< bool(const byte_t *addr, bool isSNode, uint32_t ip) >;
|
||
6 years ago
|
|
||
6 years ago
|
/// dotLokiLookup context/config
|
||
6 years ago
|
struct dotLokiLookup
|
||
|
{
|
||
|
/// for timers (MAYBEFIXME? maybe we decouple this, yes pls have a generic
|
||
|
/// passed in)
|
||
6 years ago
|
// we can use DNSc for access to the logic
|
||
6 years ago
|
llarp::Logic *logic;
|
||
6 years ago
|
|
||
6 years ago
|
/// which ip tracker to use
|
||
|
struct dns_iptracker *ip_tracker;
|
||
6 years ago
|
|
||
6 years ago
|
/// tunEndpoint
|
||
6 years ago
|
// llarp::handlers::TunEndpoint *tunEndpoint; // is this even needed here?
|
||
6 years ago
|
void *user; // well dotLokiLookup current uses it to access the tun if
|
||
6 years ago
|
// pointer to tunendpoint properties?
|
||
6 years ago
|
// llarp::service::Context *hiddenServiceContext;
|
||
6 years ago
|
|
||
|
// need a way to reference
|
||
|
// 1. mapaddress
|
||
|
map_address_hook_func map_address_handler;
|
||
6 years ago
|
// std::function< bool(const llarp::service::Address &addr, uint32_t ip),
|
||
|
// llarp::handlers::TunEndpoint * > callback;
|
||
6 years ago
|
// 2. prefetch
|
||
|
};
|
||
|
|
||
|
dnsd_query_hook_response *
|
||
6 years ago
|
llarp_dotlokilookup_handler(std::string name,
|
||
6 years ago
|
const dnsd_question_request *request);
|
||
6 years ago
|
|
||
|
#endif
|