mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-10-29 11:05:43 +00:00
38c9633ca2
add strict-connect option
47 lines
821 B
C++
47 lines
821 B
C++
#ifndef LIBLLARP_CONFIG_HPP
|
|
#define LIBLLARP_CONFIG_HPP
|
|
#include <list>
|
|
#include <string>
|
|
|
|
#include <llarp/config.h>
|
|
|
|
namespace llarp
|
|
{
|
|
struct Config
|
|
{
|
|
using section_t = std::list< std::pair< std::string, std::string > >;
|
|
|
|
section_t router;
|
|
section_t network;
|
|
section_t netdb;
|
|
section_t dns;
|
|
section_t iwp_links;
|
|
section_t connect;
|
|
section_t services;
|
|
section_t system;
|
|
section_t api;
|
|
section_t lokid;
|
|
section_t bootstrap;
|
|
|
|
bool
|
|
Load(const char *fname);
|
|
};
|
|
|
|
} // namespace llarp
|
|
|
|
struct llarp_config
|
|
{
|
|
llarp::Config impl;
|
|
};
|
|
|
|
void
|
|
llarp_generic_ensure_config(std::ofstream &f, std::string basepath);
|
|
|
|
void
|
|
llarp_ensure_router_config(std::ofstream &f, std::string basepath);
|
|
|
|
bool
|
|
llarp_ensure_client_config(std::ofstream &f, std::string basepath);
|
|
|
|
#endif
|