llarp::dns::I_Platform

sets dns settings in a platform dependant way

#include <platform.hpp>

Inherited by llarp::dns::Multi_Platform, llarp::dns::Null_Platform, llarp::dns::nm::Platform, llarp::dns::sd::Platform

Public Functions

Name
virtual ~I_Platform() =default
virtual void set_resolver(unsigned int if_index, llarp::SockAddr dns, bool global) =0
Attempts to set lokinet as the DNS server.

Public Functions Documentation

function ~I_Platform

virtual ~I_Platform() =default

function set_resolver

virtual void set_resolver(
    unsigned int if_index,
    llarp::SockAddr dns,
    bool global
) =0

Attempts to set lokinet as the DNS server.

Parameters:

  • if_index – the interface index to which we add the DNS servers, this can be gotten from the interface name e.g. lokitun0 (Typically tun_endpoint.GetIfName().) and then put through if_nametoindex().
  • dns – the listening address of the lokinet DNS server
  • global – whether to set up lokinet for all DNS queries (true) or just .loki & .snode addresses (false).

Reimplemented by: llarp::dns::Multi_Platform::set_resolver, llarp::dns::sd::Platform::set_resolver, llarp::dns::nm::Platform::set_resolver, llarp::dns::Null_Platform::set_resolver

throws if unsupported or fails.


Updated on 2026-01-10 at 22:49:45 +0000