Greenbone Vulnerability Manager  22.4.0~dev1
Data Structures | Functions | Variables
gmp_port_lists.c File Reference

GVM GMP layer: Port Lists. More...

#include "gmp_port_lists.h"
#include "gmp_base.h"
#include "gmp_get.h"
#include "manage_port_lists.h"
#include "utils.h"
#include <stdlib.h>
#include <string.h>
#include <strings.h>

Data Structures

struct  create_port_list_t
 The create_port_list command. More...
 

Functions

static void create_port_list_reset ()
 Reset command data.
 
void create_port_list_start (gmp_parser_t *gmp_parser, const gchar **attribute_names, const gchar **attribute_values)
 Start a command. More...
 
void create_port_list_element_start (gmp_parser_t *gmp_parser, const gchar *name, const gchar **attribute_names, const gchar **attribute_values)
 Start element. More...
 
void parse_port_list_entity (entity_t port_list, const char **port_list_id, char **name, char **comment, array_t **ranges)
 Get creation data from a port_list entity. More...
 
void create_port_list_run (gmp_parser_t *gmp_parser, GError **error)
 Execute command. More...
 
int create_port_list_element_end (gmp_parser_t *gmp_parser, GError **error, const gchar *name)
 End element. More...
 
void create_port_list_element_text (const gchar *text, gsize text_len)
 Add text to element. More...
 

Variables

static create_port_list_t create_port_list_data
 Parser callback data. More...
 

Detailed Description

GVM GMP layer: Port Lists.

GMP port lists.

Function Documentation

◆ create_port_list_element_end()

int create_port_list_element_end ( gmp_parser_t gmp_parser,
GError **  error,
const gchar *  name 
)

End element.

Parameters
[in]gmp_parserGMP parser.
[in]errorError parameter.
[in]nameElement name.
Returns
0 success, 1 command finished.

◆ create_port_list_element_start()

void create_port_list_element_start ( gmp_parser_t gmp_parser,
const gchar *  name,
const gchar **  attribute_names,
const gchar **  attribute_values 
)

Start element.

Parameters
[in]gmp_parserGMP parser.
[in]nameElement name.
[in]attribute_namesAll attribute names.
[in]attribute_valuesAll attribute values.

◆ create_port_list_element_text()

void create_port_list_element_text ( const gchar *  text,
gsize  text_len 
)

Add text to element.

Parameters
[in]textText.
[in]text_lenText length.

◆ create_port_list_run()

void create_port_list_run ( gmp_parser_t gmp_parser,
GError **  error 
)

Execute command.

Parameters
[in]gmp_parserGMP parser.
[in]errorError parameter.

◆ create_port_list_start()

void create_port_list_start ( gmp_parser_t gmp_parser,
const gchar **  attribute_names,
const gchar **  attribute_values 
)

Start a command.

Parameters
[in]gmp_parserGMP parser.
[in]attribute_namesAll attribute names.
[in]attribute_valuesAll attribute values.

◆ parse_port_list_entity()

void parse_port_list_entity ( entity_t  port_list,
const char **  port_list_id,
char **  name,
char **  comment,
array_t **  ranges 
)

Get creation data from a port_list entity.

Parameters
[in]port_listPort list entity.
[out]port_list_idAddress for port list ID if required, else NULL.
[out]nameAddress for name.
[out]commentAddress for comment.
[out]rangesAddress for port ranges.

Variable Documentation

◆ create_port_list_data

create_port_list_t create_port_list_data
static

Parser callback data.

This is initially 0 because it's a global variable.