GVM GMP layer: Configs.
More...
#include "gmp_configs.h"
#include "gmp_base.h"
#include "gmp_get.h"
#include "manage_configs.h"
#include <assert.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gvm/util/xmlutils.h>
|
| static gpointer | nvt_selector_new (char *name, char *type, int include, char *family_or_nvt) |
| | Create a new NVT selector. More...
|
| |
|
static void | create_config_reset () |
| | Reset command data.
|
| |
| void | create_config_start (gmp_parser_t *gmp_parser, const gchar **attribute_names, const gchar **attribute_values) |
| | Start a command. More...
|
| |
| void | create_config_element_start (gmp_parser_t *gmp_parser, const gchar *name, const gchar **attribute_names, const gchar **attribute_values) |
| | Start element. More...
|
| |
| static gchar * | text_or_null (entity_t entity) |
| | Get the text of entity. More...
|
| |
| static gchar * | attr_or_null (entity_t entity, const gchar *name) |
| | Get the attribute of entity. More...
|
| |
| static void | cleanup_import_preferences (array_t *import_preferences) |
| | Cleanup preferences array. More...
|
| |
| void | create_config_run (gmp_parser_t *gmp_parser, GError **error) |
| | Execute command. More...
|
| |
| int | create_config_element_end (gmp_parser_t *gmp_parser, GError **error, const gchar *name) |
| | End element. More...
|
| |
| void | create_config_element_text (const gchar *text, gsize text_len) |
| | Add text to element. More...
|
| |
GVM GMP layer: Configs.
GMP configs.
◆ attr_or_null()
| static gchar* attr_or_null |
( |
entity_t |
entity, |
|
|
const gchar * |
name |
|
) |
| |
|
static |
Get the attribute of entity.
- Parameters
-
| [in] | entity | Entity. Can be NULL. |
| [in] | name | Name of attribute. |
- Returns
- Entity attribute if there's an entity, else NULL.
◆ cleanup_import_preferences()
| static void cleanup_import_preferences |
( |
array_t * |
import_preferences | ) |
|
|
static |
Cleanup preferences array.
- Parameters
-
| [in] | import_preferences | Import preferences. |
◆ create_config_element_end()
| int create_config_element_end |
( |
gmp_parser_t * |
gmp_parser, |
|
|
GError ** |
error, |
|
|
const gchar * |
name |
|
) |
| |
End element.
- Parameters
-
| [in] | gmp_parser | GMP parser. |
| [in] | error | Error parameter. |
| [in] | name | Element name. |
- Returns
- 0 success, 1 command finished.
◆ create_config_element_start()
| void create_config_element_start |
( |
gmp_parser_t * |
gmp_parser, |
|
|
const gchar * |
name, |
|
|
const gchar ** |
attribute_names, |
|
|
const gchar ** |
attribute_values |
|
) |
| |
Start element.
- Parameters
-
| [in] | gmp_parser | GMP parser. |
| [in] | name | Element name. |
| [in] | attribute_names | All attribute names. |
| [in] | attribute_values | All attribute values. |
◆ create_config_element_text()
| void create_config_element_text |
( |
const gchar * |
text, |
|
|
gsize |
text_len |
|
) |
| |
Add text to element.
- Parameters
-
| [in] | text | Text. |
| [in] | text_len | Text length. |
◆ create_config_run()
| void create_config_run |
( |
gmp_parser_t * |
gmp_parser, |
|
|
GError ** |
error |
|
) |
| |
Execute command.
- Parameters
-
| [in] | gmp_parser | GMP parser. |
| [in] | error | Error parameter. |
◆ create_config_start()
| void create_config_start |
( |
gmp_parser_t * |
gmp_parser, |
|
|
const gchar ** |
attribute_names, |
|
|
const gchar ** |
attribute_values |
|
) |
| |
Start a command.
- Parameters
-
| [in] | gmp_parser | GMP parser. |
| [in] | attribute_names | All attribute names. |
| [in] | attribute_values | All attribute values. |
◆ nvt_selector_new()
| static gpointer nvt_selector_new |
( |
char * |
name, |
|
|
char * |
type, |
|
|
int |
include, |
|
|
char * |
family_or_nvt |
|
) |
| |
|
static |
Create a new NVT selector.
- Parameters
-
| [in] | name | Name of NVT selector. |
| [in] | type | Type of NVT selector. |
| [in] | include | Include/exclude flag. |
| [in] | family_or_nvt | Family or NVT. |
- Returns
- Newly allocated NVT selector.
◆ text_or_null()
| static gchar* text_or_null |
( |
entity_t |
entity | ) |
|
|
static |
Get the text of entity.
- Parameters
-
| [in] | entity | Entity. Can be NULL. |
- Returns
- Entity text if there's an entity, else NULL.
◆ create_config_data
Parser callback data.
This is initially 0 because it's a global variable.