summaryrefslogtreecommitdiff
path: root/src/or/confparse.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-08-03 11:40:43 -0400
committerNick Mathewson <nickm@torproject.org>2016-08-03 11:43:19 -0400
commite6220ccbf8004090b9bcc7228b33d85d2cf9c067 (patch)
tree3f67bbd1ca1d5c7b6ee95bcbe968162273aa6810 /src/or/confparse.h
parentc9b8d4c086931d806655a48b16b82ed132613382 (diff)
downloadtor-e6220ccbf8004090b9bcc7228b33d85d2cf9c067.tar.gz
tor-e6220ccbf8004090b9bcc7228b33d85d2cf9c067.zip
Add deprecation for configuration options that need to go away.
Diffstat (limited to 'src/or/confparse.h')
-rw-r--r--src/or/confparse.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/confparse.h b/src/or/confparse.h
index ca6fb5ec43..415d680d2e 100644
--- a/src/or/confparse.h
+++ b/src/or/confparse.h
@@ -48,6 +48,11 @@ typedef struct config_abbrev_t {
int warn;
} config_abbrev_t;
+typedef struct config_deprecation_t {
+ const char *name;
+ const char *why_deprecated;
+} config_deprecation_t;
+
/* Handy macro for declaring "In the config file or on the command line,
* you can abbreviate <b>tok</b>s as <b>tok</b>". */
#define PLURAL(tok) { #tok, #tok "s", 0, 0 }
@@ -76,6 +81,7 @@ typedef struct config_format_t {
off_t magic_offset; /**< Offset of the magic value within the struct. */
config_abbrev_t *abbrevs; /**< List of abbreviations that we expand when
* parsing this format. */
+ config_deprecation_t *deprecations; /** List of deprecated options */
config_var_t *vars; /**< List of variables we recognize, their default
* values, and where we stick them in the structure. */
validate_fn_t validate_fn; /**< Function to validate config. */
@@ -125,6 +131,8 @@ void config_free_lines(config_line_t *front);
const char *config_expand_abbrev(const config_format_t *fmt,
const char *option,
int command_line, int warn_obsolete);
+void warn_deprecated_option(const char *what, const char *why);
+
#endif