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