diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-11-27 18:11:50 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-11-27 18:13:32 -0500 |
commit | 9ce5801e22790e4df702b4a56555404c75ac8058 (patch) | |
tree | a39a4b970b6e09e893ade75a4dd0029501d4a34c /src/or/or.h | |
parent | b5a306e82c684bdd30b832fdfd9e2b55c06b54ae (diff) | |
download | tor-9ce5801e22790e4df702b4a56555404c75ac8058.tar.gz tor-9ce5801e22790e4df702b4a56555404c75ac8058.zip |
Make linelists always overridden by the command line
This starts an effort to refactor torrc handling code to make it easier
to live with. It makes it possible to override exit policies from the
command line, and possible to override (rather than append to) socksport
lists from the command line.
It'll be necessary to make a "base" torrc implementation work at all.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h index 546fe17bf3..b3fd082cb6 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2836,11 +2836,23 @@ typedef struct port_cfg_t { char unix_addr[FLEXIBLE_ARRAY_MEMBER]; } port_cfg_t; +/** Ordinary configuration line. */ +#define CONFIG_LINE_NORMAL 0 +/** Appends to previous configuration for the same option, even if we + * would ordinary replace it. */ +#define CONFIG_LINE_APPEND 1 + /** A linked list of lines in a config file. */ typedef struct config_line_t { char *key; char *value; struct config_line_t *next; + /** What special treatment (if any) does this line require? */ + unsigned int command:1; + /** If true, subsequent assignments to this linelist should replace + * it, not extend it. Set only on the first item in a linelist in an + * or_options_t. */ + unsigned int fragile:1; } config_line_t; typedef struct routerset_t routerset_t; |