|
@@ -55,6 +55,7 @@ typedef struct config_abbrev_t {
|
|
|
#define PLURAL(tok) { #tok, #tok "s", 0, 0 }
|
|
|
|
|
|
|
|
|
+
|
|
|
static config_abbrev_t _option_abbrevs[] = {
|
|
|
PLURAL(ExitNode),
|
|
|
PLURAL(EntryNode),
|
|
@@ -92,6 +93,7 @@ static config_abbrev_t _option_abbrevs[] = {
|
|
|
{ NULL, NULL, 0, 0},
|
|
|
};
|
|
|
|
|
|
+
|
|
|
static config_abbrev_t _state_abbrevs[] = {
|
|
|
{ "AccountingBytesReadInterval", "AccountingBytesReadInInterval", 0, 0 },
|
|
|
{ "HelperNode", "EntryGuard", 0, 0 },
|
|
@@ -345,6 +347,7 @@ static config_var_t _option_vars[] = {
|
|
|
};
|
|
|
|
|
|
|
|
|
+
|
|
|
static config_var_t testing_tor_network_defaults[] = {
|
|
|
V(ServerDNSAllowBrokenConfig, BOOL, "1"),
|
|
|
V(DirAllowPrivateAddresses, BOOL, "1"),
|
|
@@ -369,6 +372,7 @@ static config_var_t testing_tor_network_defaults[] = {
|
|
|
#define VAR(name,conftype,member,initvalue) \
|
|
|
{ name, CONFIG_TYPE_ ## conftype, STRUCT_OFFSET(or_state_t, member), \
|
|
|
initvalue }
|
|
|
+
|
|
|
static config_var_t _state_vars[] = {
|
|
|
V(AccountingBytesReadInInterval, MEMUNIT, NULL),
|
|
|
V(AccountingBytesWrittenInInterval, MEMUNIT, NULL),
|
|
@@ -408,6 +412,7 @@ typedef struct config_var_description_t {
|
|
|
const char *description;
|
|
|
} config_var_description_t;
|
|
|
|
|
|
+
|
|
|
static config_var_description_t options_description[] = {
|
|
|
|
|
|
{ "AvoidDiskWrites", "If non-zero, try to write to disk less frequently than"
|
|
@@ -579,6 +584,7 @@ static config_var_description_t options_description[] = {
|
|
|
{ NULL, NULL },
|
|
|
};
|
|
|
|
|
|
+
|
|
|
static config_var_description_t state_description[] = {
|
|
|
{ "AccountingBytesReadInInterval",
|
|
|
"How many bytes have we read in this accounting period?" },
|
|
@@ -808,8 +814,10 @@ set_options(or_options_t *new_val, char **msg)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
extern const char tor_svn_revision[];
|
|
|
|
|
|
+
|
|
|
static char *_version = NULL;
|
|
|
|
|
|
|
|
@@ -4609,6 +4617,7 @@ struct unit_table_t {
|
|
|
uint64_t multiplier;
|
|
|
};
|
|
|
|
|
|
+
|
|
|
static struct unit_table_t memory_units[] = {
|
|
|
{ "", 1 },
|
|
|
{ "b", 1<< 0 },
|
|
@@ -4636,6 +4645,7 @@ static struct unit_table_t memory_units[] = {
|
|
|
{ NULL, 0 },
|
|
|
};
|
|
|
|
|
|
+
|
|
|
static struct unit_table_t time_units[] = {
|
|
|
{ "", 1 },
|
|
|
{ "second", 1 },
|