mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-12 15:17:14 +03:00
71 lines
1.3 KiB
C
71 lines
1.3 KiB
C
/* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct)
|
|
* on Wed Nov 28 23:38:56 2018. */
|
|
|
|
|
|
#ifndef C2S_CONFIG_H
|
|
#define C2S_CONFIG_H
|
|
#include <libconfig.h>
|
|
|
|
#include "probe.h"
|
|
#include <sys/types.h>
|
|
#include <sys/socket.h>
|
|
#include <netdb.h>
|
|
|
|
struct config_listen_item {
|
|
char* host;
|
|
char* port;
|
|
int keepalive;
|
|
};
|
|
|
|
struct config_protocols_item {
|
|
const char* name;
|
|
char* host;
|
|
char* port;
|
|
int service_is_present;
|
|
const char* service;
|
|
int fork;
|
|
int log_level;
|
|
int keepalive;
|
|
int sni_hostnames_len;
|
|
const char** sni_hostnames;
|
|
int alpn_protocols_len;
|
|
const char** alpn_protocols;
|
|
int regex_patterns_len;
|
|
const char** regex_patterns;
|
|
T_PROBE* probe;
|
|
struct addrinfo* saddr;
|
|
void* data;
|
|
};
|
|
|
|
struct config_item {
|
|
int verbose;
|
|
int foreground;
|
|
int inetd;
|
|
int numeric;
|
|
int transparent;
|
|
int timeout;
|
|
int user_is_present;
|
|
const char* user;
|
|
int pidfile_is_present;
|
|
const char* pidfile;
|
|
int chroot_is_present;
|
|
const char* chroot;
|
|
const char* syslog_facility;
|
|
const char* on_timeout;
|
|
int listen_len;
|
|
struct config_listen_item* listen;
|
|
int protocols_len;
|
|
struct config_protocols_item* protocols;
|
|
};
|
|
|
|
int config_parser(
|
|
config_setting_t* cfg,
|
|
struct config_item* config,
|
|
const char** errmsg);
|
|
|
|
void config_print(
|
|
struct config_item *config,
|
|
int depth);
|
|
|
|
#endif
|