Tor
0.4.7.0-alpha-dev
|
Definitions for various low-level configuration types. More...
#include "orconfig.h"
#include "lib/conf/conftypes.h"
#include "lib/conf/confdecl.h"
#include "lib/confmgt/typedvar.h"
#include "lib/confmgt/type_defs.h"
#include "lib/confmgt/unitparse.h"
#include "lib/cc/compat_compiler.h"
#include "lib/container/smartlist.h"
#include "lib/encoding/confline.h"
#include "lib/encoding/time_fmt.h"
#include "lib/log/escape.h"
#include "lib/log/log.h"
#include "lib/log/util_bug.h"
#include "lib/malloc/malloc.h"
#include "lib/string/parse_int.h"
#include "lib/string/printf.h"
#include "lib/confmgt/var_type_def_st.h"
#include <stddef.h>
#include <string.h>
#include <errno.h>
Go to the source code of this file.
Data Structures | |
struct | int_parse_params_t |
struct | enumeration_table_t |
struct | enumeration_params_t |
Functions | |
static int | string_parse (void *target, const char *value, char **errmsg, const void *params) |
static char * | string_encode (const void *value, const void *params) |
static void | string_clear (void *value, const void *params) |
static int | int_parse (void *target, const char *value, char **errmsg, const void *params) |
static char * | int_encode (const void *value, const void *params) |
static void | int_clear (void *value, const void *params) |
static bool | int_ok (const void *value, const void *params) |
static int | uint64_parse (void *target, const char *value, char **errmsg, const void *params) |
static char * | uint64_encode (const void *value, const void *params) |
static void | uint64_clear (void *value, const void *params) |
static int | units_parse_u64 (void *target, const char *value, char **errmsg, const void *params) |
static int | units_parse_int (void *target, const char *value, char **errmsg, const void *params) |
static bool | units_ok_int (const void *value, const void *params) |
static int | double_parse (void *target, const char *value, char **errmsg, const void *params) |
static char * | double_encode (const void *value, const void *params) |
static void | double_clear (void *value, const void *params) |
static int | enum_parse (void *target, const char *value, char **errmsg, const void *params_) |
static char * | enum_encode (const void *value, const void *params_) |
static void | enum_clear (void *value, const void *params_) |
static bool | enum_ok (const void *value, const void *params_) |
static int | time_parse (void *target, const char *value, char **errmsg, const void *params) |
static char * | time_encode (const void *value, const void *params) |
static void | time_clear (void *value, const void *params) |
static int | csv_parse (void *target, const char *value, char **errmsg, const void *params) |
static char * | csv_encode (const void *value, const void *params) |
static void | csv_clear (void *value, const void *params) |
static int | legacy_csv_interval_parse (void *target, const char *value, char **errmsg, const void *params) |
static int | linelist_kv_parse (void *target, const struct config_line_t *line, char **errmsg, const void *params) |
static int | linelist_kv_virt_noparse (void *target, const struct config_line_t *line, char **errmsg, const void *params) |
static struct config_line_t * | linelist_kv_encode (const char *key, const void *value, const void *params) |
static struct config_line_t * | linelist_s_kv_encode (const char *key, const void *value, const void *params) |
static void | linelist_clear (void *target, const void *params) |
static bool | linelist_eq (const void *a, const void *b, const void *params) |
static int | linelist_copy (void *target, const void *value, const void *params) |
static void | linelist_mark_fragile (void *target, const void *params) |
static int | ignore_parse (void *target, const char *value, char **errmsg, const void *params) |
static char * | ignore_encode (const void *value, const void *params) |
const var_type_def_t * | lookup_type_def (config_type_t type) |
Variables | |
static const var_type_fns_t | string_fns |
static const int_parse_params_t | INT_PARSE_UNRESTRICTED |
static const int_parse_params_t | INT_PARSE_POSINT |
static const var_type_fns_t | int_fns |
static const var_type_fns_t | uint64_fns |
static const var_type_fns_t | memunit_fns |
static const var_type_fns_t | interval_fns |
static const var_type_fns_t | double_fns |
static const enumeration_table_t | enum_table_bool [] |
static const enumeration_params_t | enum_params_bool |
static const enumeration_table_t | enum_table_autobool [] |
static const enumeration_params_t | enum_params_autobool |
static const var_type_fns_t | enum_fns |
static const var_type_fns_t | time_fns |
static const var_type_fns_t | csv_fns |
static const var_type_fns_t | legacy_csv_interval_fns |
static const var_type_fns_t | linelist_fns |
static const var_type_fns_t | linelist_v_fns |
static const var_type_fns_t | linelist_s_fns |
static const var_type_fns_t | ignore_fns |
const var_type_def_t | STRING_type_defn |
const var_type_def_t | FILENAME_type_defn |
const var_type_def_t | INT_type_defn |
const var_type_def_t | POSINT_type_defn |
const var_type_def_t | UINT64_type_defn |
const var_type_def_t | MEMUNIT_type_defn |
const var_type_def_t | INTERVAL_type_defn |
const var_type_def_t | MSEC_INTERVAL_type_defn |
const var_type_def_t | DOUBLE_type_defn |
const var_type_def_t | BOOL_type_defn |
const var_type_def_t | AUTOBOOL_type_defn |
const var_type_def_t | ISOTIME_type_defn |
const var_type_def_t | CSV_type_defn |
const var_type_def_t | CSV_INTERVAL_type_defn |
const var_type_def_t | LINELIST_type_defn |
const var_type_def_t | LINELIST_S_type_defn |
const var_type_def_t | LINELIST_V_type_defn |
const var_type_def_t | IGNORE_type_defn |
const var_type_def_t | OBSOLETE_type_defn |
static const var_type_def_t * | type_definitions_table [] |
Definitions for various low-level configuration types.
This module creates a number of var_type_def_t objects, to be used by typedvar.c in manipulating variables.
The types here are common types that can be implemented with Tor's low-level functionality. To define new types, see var_type_def_st.h.
Definition in file type_defs.c.
const var_type_def_t* lookup_type_def | ( | config_type_t | type | ) |
Return a pointer to the var_type_def_t object for the given config_type_t value, or NULL if no such type definition exists.
Definition at line 842 of file type_defs.c.
Referenced by get_type_def().
|
static |
Definition at line 538 of file type_defs.c.
|
static |
Definition at line 345 of file type_defs.c.
|
static |
Definition at line 446 of file type_defs.c.
|
static |
Definition at line 441 of file type_defs.c.
|
static |
Definition at line 429 of file type_defs.c.
|
static |
Definition at line 434 of file type_defs.c.
|
static |
Definition at line 423 of file type_defs.c.
|
static |
Definition at line 745 of file type_defs.c.
|
static |
Definition at line 161 of file type_defs.c.
|
static |
Definition at line 106 of file type_defs.c.
|
static |
Definition at line 101 of file type_defs.c.
|
static |
Definition at line 287 of file type_defs.c.
|
static |
Definition at line 573 of file type_defs.c.
|
static |
Definition at line 688 of file type_defs.c.
|
static |
Definition at line 706 of file type_defs.c.
|
static |
Definition at line 697 of file type_defs.c.
|
static |
Definition at line 281 of file type_defs.c.
|
static |
Definition at line 80 of file type_defs.c.
|
static |
Definition at line 490 of file type_defs.c.
|
static |
Table mapping conf_type_t values to var_type_def_t objects.
Definition at line 815 of file type_defs.c.
|
static |
Definition at line 208 of file type_defs.c.