summaryrefslogtreecommitdiff
path: root/ecp/server/server.h
blob: 652bd041acf2edc6ed17e61f874123d0edf0a252 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>

#define LOG_DEBUG           0
#define LOG_INFO            1
#define LOG_ERR             2

#define LOG_LEVEL           LOG_DEBUG
#define LOG(l, ...)         log_printf(l, __VA_ARGS__);

typedef struct SRVConfig {
    ECPDHKey key_perma;
    char *acl_fn;
    char *acl_fn_dir;
    ecp_tr_addr_t my_addr;
    uint8_t region;
    uint8_t roles;
} SRVConfig;

SRVConfig *srv_get_config(void);
void log_vfprintf(int level, FILE *file, char *format, va_list ap);
void log_printf(int level, char *format, ...);