28 #include "../base/array.h" 29 #include "../util/serverutils.h" 30 #include "../util/xmlutils.h" 33 #include <glib/gtypes.h> 34 #include <gnutls/gnutls.h> 55 {0, NULL, NULL, NULL, NULL, NULL, NULL};
104 "a994b278-1f62-11e1-96ac-406186ea4fc5",
202 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
203 NULL, NULL, 0, NULL, NULL, NULL, NULL, 0};
230 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0};
272 NULL, NULL, NULL, NULL};
306 const char *password);
315 gmp_create_task (gnutls_session_t *,
const char *,
const char *,
const char *,
316 const char *, gchar **);
365 const void *, gsize);
385 const char *,
const char *, gchar **);
389 const char *,
const char *,
const char *,
const char * actions
Actions argument.
Definition: gmp.h:159
int overrides
Whether to include overrides in the report.
Definition: gmp.h:91
static const gmp_create_target_opts_t gmp_create_target_opts_defaults
Sensible default values for gmp_get_report_opts_t.
Definition: gmp.h:229
int gmp_get_system_reports_ext(gnutls_session_t *, gmp_get_system_reports_opts_t, entity_t *)
Get system reports.
Definition: gmp.c:1959
const char * smb_credential_id
ID of SMB credential.
Definition: gmp.h:212
const char * target_id
ID of target.
Definition: gmp.h:182
char ** timezone
[out] Timezone if any, else NULL.
Definition: gmp.h:47
const char * exclude_hosts
Hosts to exclude.
Definition: gmp.h:219
int autofp
Definition: gmp.h:72
int gmp_ping(gnutls_session_t *, int)
"Ping" the manager.
Definition: gmp.c:129
const char * hosts
Name of target.
Definition: gmp.h:218
const char * community
SNMP community.
Definition: gmp.h:257
int details
Whether to include overrides in the tasks.
Definition: gmp.h:162
int gmp_modify_task_file(gnutls_session_t *, const char *, const char *, const void *, gsize)
Modify a file on a task.
Definition: gmp.c:1223
const char * source_iface
Source iface preference.
Definition: gmp.h:193
char * host_search_phrase
Search phrase result filter.
Definition: gmp.h:85
int ignore_pagination
Whether to ignore pagination filters.
Definition: gmp.h:95
int alterable
Whether the task is alterable.
Definition: gmp.h:195
const char * auth_algorithm
SNMP authentication algorithm.
Definition: gmp.h:261
int first_result
First result to get.
Definition: gmp.h:67
int gmp_delete_task(gnutls_session_t *, const char *)
Delete a task and read the manager response.
Definition: gmp.c:1280
static const gmp_delete_opts_t gmp_delete_opts_ultimate_defaults
Default values for gmp_get_report_opts_t for ultimate deletion.
Definition: gmp.h:290
int override_details
If overrides, whether to include details.
Definition: gmp.h:92
const char * actions
Actions argument.
Definition: gmp.h:142
char * min_qod
Minimum QoD filter.
Definition: gmp.h:87
char * delta_report_id
ID of report to compare single report to.
Definition: gmp.h:81
int host_max_results
Maximum number of results to return.
Definition: gmp.h:71
const char * comment
Comment on task.
Definition: gmp.h:184
char * min_cvss_base
Minimum CVSS base filter.
Definition: gmp.h:86
char ** pw_warning
[out] Password warning, NULL if password is okay.
Definition: gmp.h:48
array_t * alert_ids
Array of alert IDs.
Definition: gmp.h:177
char * pos
Position of report from end.
Definition: gmp.h:78
int gmp_create_lsc_credential(gnutls_session_t *, const char *, const char *, const char *, const char *, gchar **)
Create an LSC Credential.
Definition: gmp.c:1683
const char * filter
Filter argument.
Definition: gmp.h:140
Struct holding options for gmp create_task command.
Definition: gmp.h:175
Struct holding options for gmp get_tasks command.
Definition: gmp.h:138
const char * duration
Duration.
Definition: gmp.h:238
int gmp_create_target_ext(gnutls_session_t *, gmp_create_target_opts_t, gchar **)
Create a target.
Definition: gmp.c:1501
const char * snmp_credential_id
ID of SNMP credential.
Definition: gmp.h:214
int rcfile
Ignored. Removed since GMP 6.0.
Definition: gmp.h:163
int gmp_get_targets(gnutls_session_t *, const char *, int, int, entity_t *)
Get a target.
Definition: gmp.c:1308
int reverse_lookup_only
Scanner pref reverse_lookup_only.
Definition: gmp.h:222
Struct holding options for gmp create_lsc_credential command.
Definition: gmp.h:254
XML element.
Definition: xmlutils.h:65
Struct holding options for gmp get_report command.
Definition: gmp.h:60
int gmp_create_task_ext(gnutls_session_t *, gmp_create_task_opts_t, gchar **)
Create a task.
Definition: gmp.c:482
const char * name
Name of target.
Definition: gmp.h:216
int gmp_start_task_report_c(gvm_connection_t *, const char *, char **)
Start a task and read the manager response.
Definition: gmp.c:742
const char * sort_order
Definition: gmp.h:63
int brief
Brief flag.
Definition: gmp.h:242
int host_first_result
Skip over results before this result number.
Definition: gmp.h:70
const char * privacy_algorithm
SNMP privacy algorithm.
Definition: gmp.h:263
char * filt_id
ID of filter, to filter results.
Definition: gmp.h:76
Struct holding options for various gmp delete_[...] commands.
Definition: gmp.h:277
int gmp_create_task(gnutls_session_t *, const char *, const char *, const char *, const char *, gchar **)
Create a task given a config and target.
Definition: gmp.c:662
const char * slave_id
ID of the slave to get report from.
Definition: gmp.h:241
static const gmp_get_tasks_opts_t gmp_get_tasks_opts_defaults
Sensible default values for gmp_get_tasks_opts_t.
Definition: gmp.h:151
int gmp_delete_report(gnutls_session_t *, const char *)
Remove a report.
Definition: gmp.c:1471
int gmp_delete_config_ext(gnutls_session_t *, const char *, gmp_delete_opts_t)
Delete a config.
Definition: gmp.c:1651
const char * start_time
Time of first data point.
Definition: gmp.h:239
GPtrArray array_t
Definition: array.h:30
int gmp_stop_task_c(gvm_connection_t *, const char *)
Stop a task and read the manager response.
Definition: gmp.c:930
int gmp_delete_lsc_credential_ext(gnutls_session_t *, const char *, gmp_delete_opts_t)
Delete a LSC credential.
Definition: gmp.c:1896
static const gmp_get_task_opts_t gmp_get_task_opts_defaults
Sensible default values for gmp_get_tasks_opts_t.
Definition: gmp.h:169
int gmp_stop_task(gnutls_session_t *, const char *)
Stop a task and read the manager response.
Definition: gmp.c:906
int gmp_authenticate_info_ext(gnutls_session_t *, gmp_authenticate_info_opts_t)
Authenticate with the manager.
Definition: gmp.c:303
const char * report_id
ID of single report to get.
Definition: gmp.h:66
char * timezone
Timezone.
Definition: gmp.h:79
int gmp_get_tasks_ext(gnutls_session_t *, gmp_get_tasks_opts_t, entity_t *)
Get all tasks (generic version).
Definition: gmp.c:1156
const char * username
Password.
Definition: gmp.h:43
int notes
Whether to include associated notes.
Definition: gmp.h:89
int timeout
Timeout for GMP response.
Definition: gmp.h:141
const char * esxi_credential_id
ID of ESXi credential.
Definition: gmp.h:213
static const gmp_create_lsc_credential_opts_t gmp_create_lsc_credential_opts_defaults
Sensible default values for gmp_create_lsc_credential_opts_t.
Definition: gmp.h:271
const char * name
Name of LSC credential.
Definition: gmp.h:256
Struct holding options for gmp get_tasks command.
Definition: gmp.h:157
int gmp_delete_task_ext(gnutls_session_t *, const char *, gmp_delete_opts_t)
Delete a task and read the manager response.
Definition: gmp.c:1052
char * alert_id
ID of alert.
Definition: gmp.h:80
const char * scanner_id
ID of task scanner.
Definition: gmp.h:179
int result_hosts_only
Whether to include only hosts that have results.
Definition: gmp.h:94
int gmp_create_lsc_credential_key(gnutls_session_t *, const char *, const char *, const char *, const char *, const char *, gchar **)
Create an LSC Credential with a key.
Definition: gmp.c:1751
const char * observers
Comma-separated string of observer users.
Definition: gmp.h:186
static const gmp_delete_opts_t gmp_delete_opts_defaults
Sensible default values for gmp_get_report_opts_t.
Definition: gmp.h:285
const char * format_id
ID of required report format.
Definition: gmp.h:64
int gmp_resume_task_report(gnutls_session_t *, const char *, char **)
Resume a task and read the manager response.
Definition: gmp.c:949
static const gmp_create_task_opts_t gmp_create_task_opts_defaults
Sensible default values for gmp_get_report_opts_t.
Definition: gmp.h:201
const char * comment
Comment on target.
Definition: gmp.h:217
int gmp_delete_port_list_ext(gnutls_session_t *, const char *, gmp_delete_opts_t)
Delete a port list.
Definition: gmp.c:1443
const char * in_assets
In assets preference.
Definition: gmp.h:190
int gmp_start_task_report(gnutls_session_t *, const char *, char **)
Start a task and read the manager response.
Definition: gmp.c:697
int gmp_read_create_response(gnutls_session_t *, gchar **)
Read response status and resource UUID.
Definition: gmp.c:848
const char * hosts_ordering
Order for scanning target hosts.
Definition: gmp.h:185
int gmp_get_system_reports(gnutls_session_t *, const char *, int, entity_t *)
Get system reports.
Definition: gmp.c:1928
const char * sort_field
Definition: gmp.h:62
int gmp_get_task_ext(gnutls_session_t *, gmp_get_task_opts_t, entity_t *)
Get a task (generic version).
Definition: gmp.c:1119
char * host_levels
Letter encoded threat level filter, for hosts.
Definition: gmp.h:83
static const gmp_authenticate_info_opts_t gmp_authenticate_info_opts_defaults
Sensible default values for gmp_authenticate_info_opts_t.
Definition: gmp.h:54
char ** severity
[out] Severity class setting.
Definition: gmp.h:46
int apply_overrides
Whether overrides are applied.
Definition: gmp.h:93
int gmp_create_lsc_credential_ext(gnutls_session_t *, gmp_create_lsc_credential_opts_t, gchar **)
Create an LSC credential.
Definition: gmp.c:1804
const char * task_id
ID of single task to get.
Definition: gmp.h:160
int timeout
Timeout for GMP response.
Definition: gmp.h:69
const char * password
Username.
Definition: gmp.h:44
static const gmp_get_system_reports_opts_t gmp_get_system_reports_opts_defaults
Sensible default values for gmp_get_report_opts_t.
Definition: gmp.h:249
Struct holding options for gmp get_system_reports command.
Definition: gmp.h:235
char ** role
[out] Role.
Definition: gmp.h:45
const char * privacy_password
SNMP privacy password.
Definition: gmp.h:262
const char * name
Name of report.
Definition: gmp.h:237
int details
Whether to include overrides in the tasks.
Definition: gmp.h:144
Struct holding options for gmp create_target command.
Definition: gmp.h:208
const char * comment
Comment on LSC credential.
Definition: gmp.h:264
const char * passphrase
Passphrase.
Definition: gmp.h:259
const char * slave_id
ID of task schedule.
Definition: gmp.h:181
const char * alive_tests
Alive tests.
Definition: gmp.h:220
char * search_phrase
Search phrase result filter.
Definition: gmp.h:84
int max_results
Maximum number of results to return.
Definition: gmp.h:68
const char * login
Login.
Definition: gmp.h:258
const char * private_key
Private key.
Definition: gmp.h:260
const char * max_hosts
Max hosts preference.
Definition: gmp.h:191
char * delta_states
Delta states (Changed Gone New Same) to include.
Definition: gmp.h:82
Connection.
Definition: serverutils.h:43
int gmp_ping_c(gvm_connection_t *, int, gchar **)
"Ping" the manager.
Definition: gmp.c:188
char * filter
Term to filter results.
Definition: gmp.h:75
int reverse_lookup_unify
Scanner pref reverse_lookup_unify.
Definition: gmp.h:223
const char * schedule_id
ID of task schedule.
Definition: gmp.h:180
int gmp_resume_task_report_c(gvm_connection_t *, const char *, char **)
Resume a task and read the manager response.
Definition: gmp.c:994
const char * port_range
Port range.
Definition: gmp.h:215
array_t * observer_groups
IDs of observer groups.
Definition: gmp.h:187
int timeout
Timeout for authentication.
Definition: gmp.h:42
char * host
Host for asset report.
Definition: gmp.h:77
int ssh_credential_port
Port for SSH access.
Definition: gmp.h:210
int notes_details
Whether to include details of above.
Definition: gmp.h:90
Struct holding options for authentication.
Definition: gmp.h:40
int gmp_get_report_ext(gnutls_session_t *, gmp_get_report_opts_t, entity_t *)
Get a report (generic version).
Definition: gmp.c:1346
const char * name
Name of task.
Definition: gmp.h:183
int gmp_authenticate(gnutls_session_t *session, const char *username, const char *password)
Authenticate with the manager.
Definition: gmp.c:260
const char * levels
Result levels to include.
Definition: gmp.h:65
static const gmp_get_report_opts_t gmp_get_report_opts_defaults
Sensible default values for gmp_get_report_opts_t.
Definition: gmp.h:101
const char * end_time
Time of last data point.
Definition: gmp.h:240
const char * max_checks
Max checks preference.
Definition: gmp.h:192
const char * ssh_credential_id
ID of SSH credential.
Definition: gmp.h:211
int schedule_periods
Number of periods the schedule must run for.
Definition: gmp.h:188
int gmp_delete_target_ext(gnutls_session_t *, const char *, gmp_delete_opts_t)
Delete a target.
Definition: gmp.c:1622
const char * config_id
ID of config.
Definition: gmp.h:178
int gmp_authenticate_info_ext_c(gvm_connection_t *, gmp_authenticate_info_opts_t)
Authenticate with the manager.
Definition: gmp.c:387
const char * gmp_task_status(entity_t status_response)
Get the task status from a GMP GET_TASKS response.
Definition: gmp.c:62
int rcfile
Ignored. Removed since GMP 6.0.
Definition: gmp.h:145
int ultimate
Definition: gmp.h:279
int gmp_get_tasks(gnutls_session_t *, const char *, int, int, entity_t *)
Get the status of a task.
Definition: gmp.c:1084