From ad541c67761b8aa6da1566802c347cac4018d0c2 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Mon, 2 Nov 2026 20:50:24 +0100 Subject: Move the build sources into src/ --- src/ot_config.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/ot_config.h (limited to 'src/ot_config.h') diff --git a/src/ot_config.h b/src/ot_config.h new file mode 100644 index 0000000..79187ee --- /dev/null +++ b/src/ot_config.h @@ -0,0 +1,33 @@ +/* This software was written by Dirk Engling + It is considered beerware. Prost. Skol. Cheers or whatever. */ + +#ifndef OT_CONFIG_H__ +#define OT_CONFIG_H__ + +#include + +#include "trackerlogic.h" + +/* An address opentracker was asked to listen on. Options the statement did + not name have been filled in from the file wide defaults by the time these + are handed out. sock is filled in by whoever binds them. */ +typedef struct { + ot_ip6 ip; + uint16_t port; + PROTO_FLAG proto; + int shared; + int workers; + int64_t sock; +} ot_listen; + +extern const char *g_redirecturl; +extern const char *g_serverdir; +extern const char *g_serveruser; +extern const char *g_statefile; + +/* Reads the command line and every config file it names. Exits on error. */ +void config_parse(int argc, char **argv); + +ot_listen *config_listen_entries(size_t *count); + +#endif -- cgit v1.3