diff options
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 | ||
