diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-02 20:50:24 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-02 21:14:02 +0100 |
| commit | ad541c67761b8aa6da1566802c347cac4018d0c2 (patch) | |
| tree | a9166fa9d349911d69a6948e53b05344dcc348a0 /src/ot_config.h | |
| parent | c679ff8a3b1418a5960cc49ba6458a0007df54fa (diff) | |
Move the build sources into src/
Diffstat (limited to 'src/ot_config.h')
| -rw-r--r-- | src/ot_config.h | 33 |
1 files changed, 33 insertions, 0 deletions
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 @@ | |||
| 1 | /* This software was written by Dirk Engling <erdgeist@erdgeist.org> | ||
| 2 | It is considered beerware. Prost. Skol. Cheers or whatever. */ | ||
| 3 | |||
| 4 | #ifndef OT_CONFIG_H__ | ||
| 5 | #define OT_CONFIG_H__ | ||
| 6 | |||
| 7 | #include <stdint.h> | ||
| 8 | |||
| 9 | #include "trackerlogic.h" | ||
| 10 | |||
| 11 | /* An address opentracker was asked to listen on. Options the statement did | ||
| 12 | not name have been filled in from the file wide defaults by the time these | ||
| 13 | are handed out. sock is filled in by whoever binds them. */ | ||
| 14 | typedef struct { | ||
| 15 | ot_ip6 ip; | ||
| 16 | uint16_t port; | ||
| 17 | PROTO_FLAG proto; | ||
| 18 | int shared; | ||
| 19 | int workers; | ||
| 20 | int64_t sock; | ||
| 21 | } ot_listen; | ||
| 22 | |||
| 23 | extern const char *g_redirecturl; | ||
| 24 | extern const char *g_serverdir; | ||
| 25 | extern const char *g_serveruser; | ||
| 26 | extern const char *g_statefile; | ||
| 27 | |||
| 28 | /* Reads the command line and every config file it names. Exits on error. */ | ||
| 29 | void config_parse(int argc, char **argv); | ||
| 30 | |||
| 31 | ot_listen *config_listen_entries(size_t *count); | ||
| 32 | |||
| 33 | #endif | ||
