Greenbone Vulnerability Management Libraries
11.0.1
|
Go to the documentation of this file.
52 g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
53 prefs_set (
"cgi_path",
"/cgi-bin:/scripts");
56 prefs_set (
"unscanned_closed_udp",
"yes");
60 prefs_set (
"open_sock_max_attempts",
"5");
62 prefs_set (
"nasl_no_signature_check",
"yes");
118 if (str && !strcmp (str,
"yes"))
138 g_hash_table_insert (
global_prefs, g_strdup (key), g_strdup (value));
155 strncpy (buffer, config,
sizeof (buffer));
180 while (g_hash_table_iter_next (&iter, &
name, &value))
182 printf (
"%s = %s\n", (
char *)
name, (
char *) value);
198 char *pref_name = g_strdup_printf (
"timeout.%s",
oid);
200 int timeout = (val ? atoi (val) : 0);
static void prefs_init(void)
Initializes the preferences structure. If it was already initialized, remove old settings and start f...
void prefs_config(const char *config)
Apply the configs from given file as preferences.
int prefs_nvt_timeout(const char *oid)
Returns the timeout defined by the client or 0 if none was set.
Protos and data structures for configuration file management.
Struct holding options to iterate over a GKeyFile.
int init_settings_iterator_from_file(settings_iterator_t *iterator, const gchar *filename, const gchar *group)
Initialise a settings iterator from a file.
gint timeout
Default timeout time for this NVT.
void prefs_set(const gchar *, const gchar *)
Set a string preference value via a key.
const gchar * settings_iterator_value(settings_iterator_t *iterator)
Get the value from a settings iterator.
GHashTable * preferences_get(void)
Get the pointer to the global preferences structure. Eventually this function should not be used anyw...
void cleanup_settings_iterator(settings_iterator_t *iterator)
Cleanup a settings iterator.
void prefs_dump(void)
Dump the preferences to stdout.
const gchar * prefs_get(const gchar *key)
Get a string preference value via a key.
static GHashTable * global_prefs
const gchar * settings_iterator_name(settings_iterator_t *iterator)
Get the name from a settings iterator.
int prefs_get_bool(const gchar *key)
Get a boolean expression of a preference value via a key.
gboolean settings_iterator_next(settings_iterator_t *iterator)
Increment an iterator.