Greenbone Vulnerability Manager  9.0.0
Macros | Functions
manage_config_discovery.c File Reference

GVM management layer: Predefined config: Discovery. More...

#include "manage.h"
#include "sql.h"

Macros

#define G_LOG_DOMAIN   "md main"
 GLib log domain.
 
#define NVT_SELECTOR(selector, oid, family)
 Insert a nvt selector. More...
 

Functions

void make_config_discovery_service_detection (char *const selector_name)
 Make Discovery Scan Config. More...
 
void make_config_discovery (char *const uuid, char *const selector_name)
 Make Discovery Scan Config. More...
 
int check_config_discovery (const char *uuid)
 Ensure the Discovery config is up to date. More...
 

Detailed Description

GVM management layer: Predefined config: Discovery.

This file contains the creation of the predefined config Discovery.

Macro Definition Documentation

◆ NVT_SELECTOR

#define NVT_SELECTOR (   selector,
  oid,
  family 
)
Value:
sql ("INSERT INTO nvt_selectors" \
" (name, exclude, type, family_or_nvt, family)" \
" VALUES" \
" ('%s', 0, " G_STRINGIFY (NVT_SELECTOR_TYPE_NVT) ", '%s','%s');", \
selector, oid, family)

Insert a nvt selector.

Function Documentation

◆ check_config_discovery()

int check_config_discovery ( const char *  uuid)

Ensure the Discovery config is up to date.

Parameters
[in]uuidUUID of config.
Returns
0 success, -1 error.

◆ make_config_discovery()

void make_config_discovery ( char *const  uuid,
char *const  selector_name 
)

Make Discovery Scan Config.

Caller must lock the db.

Parameters
[in]uuidUUID for new scan config.
[in]selector_nameName of NVT selector to use.

◆ make_config_discovery_service_detection()

void make_config_discovery_service_detection ( char *const  selector_name)

Make Discovery Scan Config.

Caller must lock the db.

Parameters
[in]selector_nameName of NVT selector to use.
sql
void sql(char *sql,...)
Perform an SQL statement, retrying if database is busy or locked.
Definition: sql.c:207