2022-06-22 16:14:33 +00:00
|
|
|
#pragma once
|
|
|
|
#include "platform.hpp"
|
|
|
|
|
|
|
|
#include <llarp/constants/platform.hpp>
|
2023-10-24 13:18:03 +00:00
|
|
|
|
2022-06-22 16:14:33 +00:00
|
|
|
#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
|
2022-07-28 16:07:38 +00:00
|
|
|
set_resolver(unsigned int if_index, llarp::SockAddr dns, bool global) override;
|
2022-06-22 16:14:33 +00:00
|
|
|
};
|
|
|
|
} // namespace sd
|
|
|
|
using SD_Platform_t =
|
|
|
|
std::conditional_t<llarp::platform::has_systemd, sd::Platform, Null_Platform>;
|
|
|
|
} // namespace llarp::dns
|