mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
main_router_getRange to get access to tun
This commit is contained in:
parent
eebb2609b8
commit
79fb82a3c8
|
@ -8,6 +8,7 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
#include "router.hpp" // for service::address
|
||||
#include <llarp/service/endpoint.hpp>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
@ -95,6 +96,9 @@ extern "C"
|
|||
|
||||
#ifdef __cplusplus
|
||||
|
||||
llarp_tun_io *
|
||||
main_router_getRange(struct llarp_main *ptr);
|
||||
|
||||
/// map an ip to a hidden service address
|
||||
bool
|
||||
main_router_mapAddress(struct llarp_main *ptr, const llarp::service::Address &addr, uint32_t ip);
|
||||
|
|
|
@ -458,15 +458,21 @@ llarp_main_queryDHT(struct check_online_request *request)
|
|||
{1000, request, &llarp_main_checkOnline});
|
||||
// llarp_dht_lookup_router(ptr->ctx->router->dht, job);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
main_router_mapAddress(struct llarp_main *ptr, const llarp::service::Address &addr, uint32_t ip)
|
||||
{
|
||||
auto *endpoint = &ptr->ctx->router->hiddenServiceContext;
|
||||
return endpoint->MapAddress(addr, ip);
|
||||
}
|
||||
|
||||
|
||||
|
||||
llarp_tun_io *
|
||||
main_router_getRange(struct llarp_main *ptr)
|
||||
{
|
||||
auto *endpoint = &ptr->ctx->router->hiddenServiceContext;
|
||||
return endpoint->getRange();
|
||||
}
|
||||
|
||||
const char *
|
||||
handleBaseCmdLineArgs(int argc, char *argv[])
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue