summaryrefslogtreecommitdiff
path: root/src/lib/conf
AgeCommit message (Collapse)Author
2019-08-24whitespace fixNick Mathewson
2019-06-25Make "invisibility" and "undumpability" properties of variables.Nick Mathewson
Previously, these were magical things that we detected by checking whether a variable's name was prefixed with two or three underscores.
2019-06-25Turn several properties of types or variables into flags.Nick Mathewson
"unsettable" is a property of types. LINELIST_V and OBSOLETE are unsettable, meaning that they cannot be set by name. "contained" is a property of types. I'm hoping to find a better name here. LINELIST_S is "contained" because it always appears within a LINELIST_V, and as such doesn't need to be dumped ore copied independently. "cumulative" is a property of types. Cumulative types can appear more than once in a torrc without causing a warning, because they add to each other rather than replacing each other. "obsolete" is a property of variables. "marking fragile" is now a command that struct members can accept. With these changes, confparse and config no longer ever need to mention CONFIG_TYPE_XYZ values by name.
2019-06-25Extend macros to allow flag arguments.Nick Mathewson
2019-06-25Add a "flags" member to config_var_tNick Mathewson
Additionally, adjust the macros so that we can add new members like this more easily.
2019-06-25Move responsibility for config var macrosNick Mathewson
The testing-only parts now live in a conftesting.h; the shared parts of the macros live in confmacros.h
2019-06-25Move config_var_t info conftypes.hNick Mathewson
2019-06-25Add new "struct_var_" functions to manipulate struct fields.Nick Mathewson
These functions exist one level higher than typed_var_t. They describe a type, a name, and an offset within a structure.
2019-06-24Further clarify our clarification about the type of POSINTNick Mathewson
2019-06-24Add a "typed_var" abstraction to implement lvalue access in C.Nick Mathewson
Right now, this has been done at a high level by confparse.c, but it makes more sense to lower it. This API is radically un-typesafe as it stands; we'll be wrapping it in a safer API as we do #30914 and lower the struct manipulation code as well. Closes ticket 30864.
2019-06-24Start moving types that will be used for config vars to lib/confNick Mathewson
This will be a lower-level module than anything that actually sets or handles configuration variables. Part of 30864.