27#define G_LOG_DOMAIN "libgvm base"
46 g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
47 prefs_set (
"cgi_path",
"/cgi-bin:/scripts");
50 prefs_set (
"unscanned_closed_udp",
"yes");
54 prefs_set (
"open_sock_max_attempts",
"5");
56 prefs_set (
"nasl_no_signature_check",
"yes");
60 prefs_set (
"log_plugins_name_at_load",
"no");
62 prefs_set (
"non_simult_ports",
"139, 445, 3389, Services/irc");
64 prefs_set (
"auto_enable_dependencies",
"yes");
68 prefs_set (
"test_alive_hosts_only",
"yes");
69 prefs_set (
"test_alive_wait_timeout",
"3");
71 prefs_set (
"allow_simultaneous_ips",
"yes");
127 if (str && !strcmp (str,
"yes"))
147 g_hash_table_insert (
global_prefs, g_strdup (key), g_strdup (value));
192 while (g_hash_table_iter_next (&iter, &name, &value))
194 printf (
"%s = %s\n", (
char *) name, (
char *) value);
void prefs_config(const char *config)
Apply the configs from given file as preferences.
Definition prefs.c:156
int prefs_get_bool(const gchar *key)
Get a boolean expression of a preference value via a key.
Definition prefs.c:119
static void prefs_init(void)
Initializes the preferences structure. If it was already initialized, remove old settings and start f...
Definition prefs.c:40
const gchar * prefs_get(const gchar *key)
Get a string preference value via a key.
Definition prefs.c:99
static GHashTable * global_prefs
Definition prefs.c:29
GHashTable * preferences_get(void)
Get the pointer to the global preferences structure. Eventually this function should not be used anyw...
Definition prefs.c:81
void prefs_set(const gchar *, const gchar *)
Set a string preference value via a key.
Definition prefs.c:142
void prefs_dump(void)
Dump the preferences to stdout.
Definition prefs.c:184
Protos and data structures for NVT Information data sets.
gboolean settings_iterator_next(settings_iterator_t *iterator)
Increment an iterator.
Definition settings.c:150
void cleanup_settings_iterator(settings_iterator_t *iterator)
Cleanup a settings iterator.
Definition settings.c:136
int init_settings_iterator_from_file(settings_iterator_t *iterator, const gchar *filename, const gchar *group)
Initialise a settings iterator from a file.
Definition settings.c:98
gchar * settings_iterator_value(settings_iterator_t *iterator)
Get the value from a settings iterator.
Definition settings.c:179
const gchar * settings_iterator_name(settings_iterator_t *iterator)
Get the name from a settings iterator.
Definition settings.c:166
Protos and data structures for configuration file management.
Struct holding options to iterate over a GKeyFile.
Definition settings.h:36