mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-13 01:10:24 +00:00
25 lines
585 B
C++
25 lines
585 B
C++
|
#pragma once
|
||
|
#include "platform.hpp"
|
||
|
#include "null_platform.hpp"
|
||
|
|
||
|
#include <llarp/constants/platform.hpp>
|
||
|
#include <type_traits>
|
||
|
|
||
|
namespace llarp::dns
|
||
|
{
|
||
|
namespace sd
|
||
|
{
|
||
|
/// a dns platform that sets dns via systemd resolved
|
||
|
class Platform : public I_Platform
|
||
|
{
|
||
|
public:
|
||
|
virtual ~Platform() = default;
|
||
|
|
||
|
void
|
||
|
set_resolver(std::string ifname, llarp::SockAddr dns, bool global) override;
|
||
|
};
|
||
|
} // namespace sd
|
||
|
using SD_Platform_t =
|
||
|
std::conditional_t<llarp::platform::has_systemd, sd::Platform, Null_Platform>;
|
||
|
} // namespace llarp::dns
|