Greenbone Vulnerability Management Libraries  11.0.0
gmp.h
Go to the documentation of this file.
1 /* Copyright (C) 2009-2019 Greenbone Networks GmbH
2  *
3  * SPDX-License-Identifier: GPL-2.0-or-later
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
25 #ifndef _GVM_GMP_H
26 #define _GVM_GMP_H
27 
28 #include "../base/array.h" /* for array_t */
29 #include "../util/serverutils.h" /* for gvm_connection_t */
30 #include "../util/xmlutils.h" /* for entity_t */
31 
32 #include <glib.h> /* for gchar */
33 #include <glib/gtypes.h> /* for gsize */
34 #include <gnutls/gnutls.h> /* for gnutls_session_t */
35 #include <stddef.h> /* for NULL */
36 
40 typedef struct
41 {
42  int timeout;
43  const char *username;
44  const char *password;
45  char **role;
46  char **severity;
47  char **timezone;
48  char **pw_warning;
50 
55  {0, NULL, NULL, NULL, NULL, NULL, NULL};
56 
60 typedef struct
61 {
62  const char *sort_field;
63  const char *sort_order;
64  const char *format_id;
65  const char *levels;
66  const char *report_id;
69  int timeout;
72  int autofp;
73  char *type;
75  char *filter;
76  char *filt_id;
77  char *host;
78  char *pos;
79  char *timezone;
80  char *alert_id;
82  char *delta_states;
83  char *host_levels;
84  char *search_phrase;
86  char *min_cvss_base;
87  char *min_qod;
88  /* Boolean flags: */
89  int notes;
91  int overrides;
97 
102  "ROWID",
103  "ascending",
104  "a994b278-1f62-11e1-96ac-406186ea4fc5",
105  "hmlgd",
106  NULL,
107  1,
108  -1,
109  0,
110  0,
111  0,
112  0,
113  NULL,
114  NULL,
115  NULL,
116  NULL,
117  NULL,
118  NULL,
119  NULL,
120  NULL,
121  NULL,
122  NULL,
123  NULL,
124  NULL,
125  NULL,
126  NULL,
127  0,
128  0,
129  0,
130  0,
131  0,
132  0,
133  0};
134 
138 typedef struct
139 {
140  const char *filter;
141  int timeout;
142  const char *actions;
143  /* Boolean flags: */
144  int details;
145  int rcfile;
147 
151 static const gmp_get_tasks_opts_t gmp_get_tasks_opts_defaults = {"", 0, NULL, 0,
152  0};
153 
157 typedef struct
158 {
159  const char *actions;
160  const char *task_id;
161  /* Boolean flags: */
162  int details;
163  int rcfile;
165 
169 static const gmp_get_task_opts_t gmp_get_task_opts_defaults = {NULL, NULL, 0,
170  0};
171 
175 typedef struct
176 {
178  const char *config_id;
179  const char *scanner_id;
180  const char *schedule_id;
181  const char *slave_id;
182  const char *target_id;
183  const char *name;
184  const char *comment;
185  const char *hosts_ordering;
186  const char *observers;
189  /* Preferences */
190  const char *in_assets;
191  const char *max_hosts;
192  const char *max_checks;
193  const char *source_iface;
194  /* Boolean flags: */
195  int alterable;
197 
202  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
203  NULL, NULL, 0, NULL, NULL, NULL, NULL, 0};
204 
208 typedef struct
209 {
211  const char *ssh_credential_id;
212  const char *smb_credential_id;
213  const char *esxi_credential_id;
214  const char *snmp_credential_id;
215  const char *port_range;
216  const char *name;
217  const char *comment;
218  const char *hosts;
219  const char *exclude_hosts;
220  const char *alive_tests;
221  /* Boolean flags: */
225 
230  0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0};
231 
235 typedef struct
236 {
237  const char *name;
238  const char *duration;
239  const char *start_time;
240  const char *end_time;
241  const char *slave_id;
242  int brief;
244 
249  gmp_get_system_reports_opts_defaults = {NULL, NULL, NULL, NULL, NULL, 0};
250 
254 typedef struct
255 {
256  const char *name;
257  const char *community;
258  const char *login;
259  const char *passphrase;
260  const char *private_key;
261  const char *auth_algorithm;
262  const char *privacy_password;
263  const char *privacy_algorithm;
264  const char *comment;
266 
271  gmp_create_lsc_credential_opts_defaults = {NULL, NULL, NULL, NULL, NULL,
272  NULL, NULL, NULL, NULL};
273 
277 typedef struct
278 {
279  int ultimate;
281 
286 
291 
292 int
293 gmp_read_create_response (gnutls_session_t *, gchar **);
294 
295 const char *
296 gmp_task_status (entity_t status_response);
297 
298 int
299 gmp_ping (gnutls_session_t *, int);
300 
301 int
302 gmp_ping_c (gvm_connection_t *, int, gchar **);
303 
304 int
305 gmp_authenticate (gnutls_session_t *session, const char *username,
306  const char *password);
307 
308 int
310 
311 int
313 
314 int
315 gmp_create_task (gnutls_session_t *, const char *, const char *, const char *,
316  const char *, gchar **);
317 
318 int
319 gmp_create_task_ext (gnutls_session_t *, gmp_create_task_opts_t, gchar **);
320 
321 int
322 gmp_start_task_report (gnutls_session_t *, const char *, char **);
323 
324 int
325 gmp_start_task_report_c (gvm_connection_t *, const char *, char **);
326 
327 int
328 gmp_stop_task (gnutls_session_t *, const char *);
329 
330 int
331 gmp_stop_task_c (gvm_connection_t *, const char *);
332 
333 int
334 gmp_resume_task_report (gnutls_session_t *, const char *, char **);
335 
336 int
337 gmp_resume_task_report_c (gvm_connection_t *, const char *, char **);
338 
339 int
340 gmp_get_tasks (gnutls_session_t *, const char *, int, int, entity_t *);
341 
342 int
343 gmp_get_tasks_ext (gnutls_session_t *, gmp_get_tasks_opts_t, entity_t *);
344 
345 int
346 gmp_get_task_ext (gnutls_session_t *, gmp_get_task_opts_t, entity_t *);
347 
348 int
349 gmp_get_targets (gnutls_session_t *, const char *, int, int, entity_t *);
350 
351 int
352 gmp_get_report_ext (gnutls_session_t *, gmp_get_report_opts_t, entity_t *);
353 
354 int
355 gmp_delete_port_list_ext (gnutls_session_t *, const char *, gmp_delete_opts_t);
356 
357 int
358 gmp_delete_task (gnutls_session_t *, const char *);
359 
360 int
361 gmp_delete_task_ext (gnutls_session_t *, const char *, gmp_delete_opts_t);
362 
363 int
364 gmp_modify_task_file (gnutls_session_t *, const char *, const char *,
365  const void *, gsize);
366 
367 int
368 gmp_delete_report (gnutls_session_t *, const char *);
369 
370 int
371 gmp_create_target_ext (gnutls_session_t *, gmp_create_target_opts_t, gchar **);
372 
373 int
374 gmp_delete_target_ext (gnutls_session_t *, const char *, gmp_delete_opts_t);
375 
376 int
377 gmp_delete_config_ext (gnutls_session_t *, const char *, gmp_delete_opts_t);
378 
379 int
380 gmp_create_lsc_credential_ext (gnutls_session_t *,
382 
383 int
384 gmp_create_lsc_credential (gnutls_session_t *, const char *, const char *,
385  const char *, const char *, gchar **);
386 
387 int
388 gmp_create_lsc_credential_key (gnutls_session_t *, const char *, const char *,
389  const char *, const char *, const char *,
390  gchar **);
391 
392 int
393 gmp_delete_lsc_credential_ext (gnutls_session_t *, const char *,
395 
396 int
397 gmp_get_system_reports (gnutls_session_t *, const char *, int, entity_t *);
398 
399 int
401  entity_t *);
402 
403 #endif /* not _GVM_GMP_H */
gmp_create_target_opts_t::ssh_credential_id
const char * ssh_credential_id
ID of SSH credential.
Definition: gmp.h:211
gmp_get_task_ext
int gmp_get_task_ext(gnutls_session_t *, gmp_get_task_opts_t, entity_t *)
Get a task (generic version).
Definition: gmp.c:1119
gmp_modify_task_file
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
gmp_get_report_opts_t::host_first_result
int host_first_result
Skip over results before this result number.
Definition: gmp.h:70
gmp_create_task_opts_t::slave_id
const char * slave_id
ID of task schedule.
Definition: gmp.h:181
gmp_delete_opts_defaults
static const gmp_delete_opts_t gmp_delete_opts_defaults
Sensible default values for gmp_get_report_opts_t.
Definition: gmp.h:285
gmp_get_task_opts_t::details
int details
Whether to include overrides in the tasks.
Definition: gmp.h:162
gmp_get_report_opts_t::override_details
int override_details
If overrides, whether to include details.
Definition: gmp.h:92
gmp_create_lsc_credential_opts_t::privacy_algorithm
const char * privacy_algorithm
SNMP privacy algorithm.
Definition: gmp.h:263
gmp_create_lsc_credential_opts_t::private_key
const char * private_key
Private key.
Definition: gmp.h:260
gmp_get_task_opts_t::task_id
const char * task_id
ID of single task to get.
Definition: gmp.h:160
gmp_get_task_opts_t::rcfile
int rcfile
Ignored. Removed since GMP 6.0.
Definition: gmp.h:163
gmp_create_task_ext
int gmp_create_task_ext(gnutls_session_t *, gmp_create_task_opts_t, gchar **)
Create a task.
Definition: gmp.c:482
gmp_delete_task
int gmp_delete_task(gnutls_session_t *, const char *)
Delete a task and read the manager response.
Definition: gmp.c:1280
gmp_get_report_opts_t::format_id
const char * format_id
ID of required report format.
Definition: gmp.h:64
gmp_create_target_opts_t::hosts
const char * hosts
Name of target.
Definition: gmp.h:218
gmp_create_lsc_credential_opts_t::auth_algorithm
const char * auth_algorithm
SNMP authentication algorithm.
Definition: gmp.h:261
gmp_get_report_opts_t::sort_order
const char * sort_order
Definition: gmp.h:63
gmp_create_target_opts_defaults
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
gmp_authenticate_info_opts_t::username
const char * username
Password.
Definition: gmp.h:43
gmp_authenticate_info_opts_defaults
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
gmp_get_task_opts_t::actions
const char * actions
Actions argument.
Definition: gmp.h:159
gmp_resume_task_report
int gmp_resume_task_report(gnutls_session_t *, const char *, char **)
Resume a task and read the manager response.
Definition: gmp.c:949
gmp_delete_opts_ultimate_defaults
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
gmp_create_target_opts_t::exclude_hosts
const char * exclude_hosts
Hosts to exclude.
Definition: gmp.h:219
gmp_read_create_response
int gmp_read_create_response(gnutls_session_t *, gchar **)
Read response status and resource UUID.
Definition: gmp.c:848
gmp_get_report_opts_t::result_hosts_only
int result_hosts_only
Whether to include only hosts that have results.
Definition: gmp.h:94
gmp_create_lsc_credential_opts_t::login
const char * login
Login.
Definition: gmp.h:258
gmp_create_task_opts_t::target_id
const char * target_id
ID of target.
Definition: gmp.h:182
gmp_delete_config_ext
int gmp_delete_config_ext(gnutls_session_t *, const char *, gmp_delete_opts_t)
Delete a config.
Definition: gmp.c:1651
array_t
GPtrArray array_t
Definition: array.h:30
gmp_authenticate
int gmp_authenticate(gnutls_session_t *session, const char *username, const char *password)
Authenticate with the manager.
Definition: gmp.c:260
gmp_create_task_opts_t::max_checks
const char * max_checks
Max checks preference.
Definition: gmp.h:192
gmp_get_report_opts_defaults
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
gmp_create_lsc_credential_ext
int gmp_create_lsc_credential_ext(gnutls_session_t *, gmp_create_lsc_credential_opts_t, gchar **)
Create an LSC credential.
Definition: gmp.c:1804
gmp_get_tasks_opts_t::details
int details
Whether to include overrides in the tasks.
Definition: gmp.h:144
gmp_authenticate_info_opts_t::severity
char ** severity
[out] Severity class setting.
Definition: gmp.h:46
gmp_get_tasks_opts_defaults
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
gmp_get_report_opts_t::apply_overrides
int apply_overrides
Whether overrides are applied.
Definition: gmp.h:93
gmp_get_tasks_opts_t::rcfile
int rcfile
Ignored. Removed since GMP 6.0.
Definition: gmp.h:145
gmp_create_target_opts_t::snmp_credential_id
const char * snmp_credential_id
ID of SNMP credential.
Definition: gmp.h:214
gmp_get_task_opts_defaults
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
gmp_delete_port_list_ext
int gmp_delete_port_list_ext(gnutls_session_t *, const char *, gmp_delete_opts_t)
Delete a port list.
Definition: gmp.c:1443
gmp_get_report_opts_t::filter
char * filter
Term to filter results.
Definition: gmp.h:75
gmp_get_report_opts_t::report_id
const char * report_id
ID of single report to get.
Definition: gmp.h:66
gmp_stop_task_c
int gmp_stop_task_c(gvm_connection_t *, const char *)
Stop a task and read the manager response.
Definition: gmp.c:930
gmp_create_task_opts_t::hosts_ordering
const char * hosts_ordering
Order for scanning target hosts.
Definition: gmp.h:185
gmp_get_report_opts_t
Struct holding options for gmp get_report command.
Definition: gmp.h:60
gmp_create_target_opts_t::name
const char * name
Name of target.
Definition: gmp.h:216
gmp_get_report_opts_t::search_phrase
char * search_phrase
Search phrase result filter.
Definition: gmp.h:84
gmp_get_system_reports_ext
int gmp_get_system_reports_ext(gnutls_session_t *, gmp_get_system_reports_opts_t, entity_t *)
Get system reports.
Definition: gmp.c:1959
gmp_authenticate_info_ext
int gmp_authenticate_info_ext(gnutls_session_t *, gmp_authenticate_info_opts_t)
Authenticate with the manager.
Definition: gmp.c:303
gmp_get_task_opts_t
Struct holding options for gmp get_tasks command.
Definition: gmp.h:157
gmp_create_task_opts_t::in_assets
const char * in_assets
In assets preference.
Definition: gmp.h:190
gmp_get_system_reports_opts_t::duration
const char * duration
Duration.
Definition: gmp.h:238
gmp_create_task_opts_t
Struct holding options for gmp create_task command.
Definition: gmp.h:175
gmp_get_report_opts_t::timeout
int timeout
Timeout for GMP response.
Definition: gmp.h:69
gmp_create_target_opts_t::reverse_lookup_only
int reverse_lookup_only
Scanner pref reverse_lookup_only.
Definition: gmp.h:222
gmp_get_system_reports_opts_t::slave_id
const char * slave_id
ID of the slave to get report from.
Definition: gmp.h:241
gmp_get_system_reports_opts_t::start_time
const char * start_time
Time of first data point.
Definition: gmp.h:239
gmp_delete_report
int gmp_delete_report(gnutls_session_t *, const char *)
Remove a report.
Definition: gmp.c:1471
gmp_create_lsc_credential_opts_t::name
const char * name
Name of LSC credential.
Definition: gmp.h:256
gmp_create_lsc_credential_opts_t
Struct holding options for gmp create_lsc_credential command.
Definition: gmp.h:254
gmp_create_lsc_credential_opts_t::passphrase
const char * passphrase
Passphrase.
Definition: gmp.h:259
gmp_get_system_reports_opts_t::brief
int brief
Brief flag.
Definition: gmp.h:242
gmp_authenticate_info_ext_c
int gmp_authenticate_info_ext_c(gvm_connection_t *, gmp_authenticate_info_opts_t)
Authenticate with the manager.
Definition: gmp.c:387
gmp_authenticate_info_opts_t::timeout
int timeout
Timeout for authentication.
Definition: gmp.h:42
gmp_ping
int gmp_ping(gnutls_session_t *, int)
"Ping" the manager.
Definition: gmp.c:129
gmp_create_target_opts_t::esxi_credential_id
const char * esxi_credential_id
ID of ESXi credential.
Definition: gmp.h:213
gmp_delete_opts_t
Struct holding options for various gmp delete_[...] commands.
Definition: gmp.h:277
gmp_authenticate_info_opts_t::password
const char * password
Username.
Definition: gmp.h:44
gmp_get_report_opts_t::filt_id
char * filt_id
ID of filter, to filter results.
Definition: gmp.h:76
gmp_ping_c
int gmp_ping_c(gvm_connection_t *, int, gchar **)
"Ping" the manager.
Definition: gmp.c:188
gmp_authenticate_info_opts_t::timezone
char ** timezone
[out] Timezone if any, else NULL.
Definition: gmp.h:47
gmp_get_report_opts_t::delta_states
char * delta_states
Delta states (Changed Gone New Same) to include.
Definition: gmp.h:82
gmp_create_lsc_credential_opts_t::community
const char * community
SNMP community.
Definition: gmp.h:257
gmp_create_task_opts_t::comment
const char * comment
Comment on task.
Definition: gmp.h:184
gmp_create_task_opts_t::alterable
int alterable
Whether the task is alterable.
Definition: gmp.h:195
gmp_create_task_opts_t::alert_ids
array_t * alert_ids
Array of alert IDs.
Definition: gmp.h:177
gmp_get_tasks_opts_t::actions
const char * actions
Actions argument.
Definition: gmp.h:142
gmp_get_report_opts_t::sort_field
const char * sort_field
Definition: gmp.h:62
gmp_create_lsc_credential_opts_defaults
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
gmp_get_report_opts_t::notes_details
int notes_details
Whether to include details of above.
Definition: gmp.h:90
gmp_get_report_opts_t::pos
char * pos
Position of report from end.
Definition: gmp.h:78
gmp_get_report_opts_t::levels
const char * levels
Result levels to include.
Definition: gmp.h:65
gmp_start_task_report
int gmp_start_task_report(gnutls_session_t *, const char *, char **)
Start a task and read the manager response.
Definition: gmp.c:697
gmp_get_system_reports_opts_t
Struct holding options for gmp get_system_reports command.
Definition: gmp.h:235
gmp_get_report_opts_t::timezone
char * timezone
Timezone.
Definition: gmp.h:79
gmp_get_report_opts_t::autofp
int autofp
Definition: gmp.h:72
gmp_create_lsc_credential_opts_t::comment
const char * comment
Comment on LSC credential.
Definition: gmp.h:264
gmp_create_task_opts_t::schedule_id
const char * schedule_id
ID of task schedule.
Definition: gmp.h:180
gmp_create_task_opts_t::max_hosts
const char * max_hosts
Max hosts preference.
Definition: gmp.h:191
gmp_get_tasks_opts_t::filter
const char * filter
Filter argument.
Definition: gmp.h:140
gmp_delete_lsc_credential_ext
int gmp_delete_lsc_credential_ext(gnutls_session_t *, const char *, gmp_delete_opts_t)
Delete a LSC credential.
Definition: gmp.c:1896
gmp_create_task_opts_t::observer_groups
array_t * observer_groups
IDs of observer groups.
Definition: gmp.h:187
gmp_task_status
const char * gmp_task_status(entity_t status_response)
Get the task status from a GMP GET_TASKS response.
Definition: gmp.c:62
gmp_create_target_opts_t::comment
const char * comment
Comment on target.
Definition: gmp.h:217
gmp_create_task_opts_t::schedule_periods
int schedule_periods
Number of periods the schedule must run for.
Definition: gmp.h:188
gmp_get_system_reports_opts_defaults
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
gmp_get_targets
int gmp_get_targets(gnutls_session_t *, const char *, int, int, entity_t *)
Get a target.
Definition: gmp.c:1308
gmp_get_report_opts_t::host_max_results
int host_max_results
Maximum number of results to return.
Definition: gmp.h:71
gmp_get_system_reports_opts_t::name
const char * name
Name of report.
Definition: gmp.h:237
gmp_authenticate_info_opts_t::role
char ** role
[out] Role.
Definition: gmp.h:45
gmp_get_report_opts_t::host_search_phrase
char * host_search_phrase
Search phrase result filter.
Definition: gmp.h:85
gmp_get_report_opts_t::host_levels
char * host_levels
Letter encoded threat level filter, for hosts.
Definition: gmp.h:83
gmp_delete_target_ext
int gmp_delete_target_ext(gnutls_session_t *, const char *, gmp_delete_opts_t)
Delete a target.
Definition: gmp.c:1622
gmp_get_report_opts_t::notes
int notes
Whether to include associated notes.
Definition: gmp.h:89
entity_s
XML element.
Definition: xmlutils.h:65
gmp_get_report_opts_t::alert_id
char * alert_id
ID of alert.
Definition: gmp.h:80
gmp_create_task_opts_t::name
const char * name
Name of task.
Definition: gmp.h:183
gmp_create_task_opts_t::observers
const char * observers
Comma-separated string of observer users.
Definition: gmp.h:186
gmp_resume_task_report_c
int gmp_resume_task_report_c(gvm_connection_t *, const char *, char **)
Resume a task and read the manager response.
Definition: gmp.c:994
gmp_create_task_opts_t::scanner_id
const char * scanner_id
ID of task scanner.
Definition: gmp.h:179
gmp_get_report_ext
int gmp_get_report_ext(gnutls_session_t *, gmp_get_report_opts_t, entity_t *)
Get a report (generic version).
Definition: gmp.c:1346
gmp_create_task_opts_t::config_id
const char * config_id
ID of config.
Definition: gmp.h:178
gmp_get_tasks_opts_t
Struct holding options for gmp get_tasks command.
Definition: gmp.h:138
gmp_get_tasks_opts_t::timeout
int timeout
Timeout for GMP response.
Definition: gmp.h:141
gmp_authenticate_info_opts_t::pw_warning
char ** pw_warning
[out] Password warning, NULL if password is okay.
Definition: gmp.h:48
gmp_stop_task
int gmp_stop_task(gnutls_session_t *, const char *)
Stop a task and read the manager response.
Definition: gmp.c:906
gmp_get_report_opts_t::min_qod
char * min_qod
Minimum QoD filter.
Definition: gmp.h:87
gmp_create_task
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
gmp_create_task_opts_t::source_iface
const char * source_iface
Source iface preference.
Definition: gmp.h:193
gmp_create_target_opts_t::alive_tests
const char * alive_tests
Alive tests.
Definition: gmp.h:220
gmp_delete_task_ext
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
gmp_get_system_reports_opts_t::end_time
const char * end_time
Time of last data point.
Definition: gmp.h:240
gmp_get_tasks_ext
int gmp_get_tasks_ext(gnutls_session_t *, gmp_get_tasks_opts_t, entity_t *)
Get all tasks (generic version).
Definition: gmp.c:1156
gmp_create_target_opts_t::reverse_lookup_unify
int reverse_lookup_unify
Scanner pref reverse_lookup_unify.
Definition: gmp.h:223
gmp_get_report_opts_t::host
char * host
Host for asset report.
Definition: gmp.h:77
gmp_get_report_opts_t::min_cvss_base
char * min_cvss_base
Minimum CVSS base filter.
Definition: gmp.h:86
gmp_start_task_report_c
int gmp_start_task_report_c(gvm_connection_t *, const char *, char **)
Start a task and read the manager response.
Definition: gmp.c:742
gmp_get_report_opts_t::first_result
int first_result
First result to get.
Definition: gmp.h:67
gmp_create_target_opts_t::port_range
const char * port_range
Port range.
Definition: gmp.h:215
gmp_create_target_opts_t::ssh_credential_port
int ssh_credential_port
Port for SSH access.
Definition: gmp.h:210
gmp_authenticate_info_opts_t
Struct holding options for authentication.
Definition: gmp.h:40
gmp_create_lsc_credential_key
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
gmp_create_target_ext
int gmp_create_target_ext(gnutls_session_t *, gmp_create_target_opts_t, gchar **)
Create a target.
Definition: gmp.c:1501
gmp_get_report_opts_t::ignore_pagination
int ignore_pagination
Whether to ignore pagination filters.
Definition: gmp.h:95
gmp_get_report_opts_t::overrides
int overrides
Whether to include overrides in the report.
Definition: gmp.h:91
gmp_create_task_opts_defaults
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
gmp_get_report_opts_t::delta_report_id
char * delta_report_id
ID of report to compare single report to.
Definition: gmp.h:81
gmp_delete_opts_t::ultimate
int ultimate
Definition: gmp.h:279
gmp_get_tasks
int gmp_get_tasks(gnutls_session_t *, const char *, int, int, entity_t *)
Get the status of a task.
Definition: gmp.c:1084
gvm_connection_t
Connection.
Definition: serverutils.h:43
gmp_create_lsc_credential_opts_t::privacy_password
const char * privacy_password
SNMP privacy password.
Definition: gmp.h:262
gmp_create_target_opts_t::smb_credential_id
const char * smb_credential_id
ID of SMB credential.
Definition: gmp.h:212
gmp_create_lsc_credential
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
gmp_create_target_opts_t
Struct holding options for gmp create_target command.
Definition: gmp.h:208
gmp_get_system_reports
int gmp_get_system_reports(gnutls_session_t *, const char *, int, entity_t *)
Get system reports.
Definition: gmp.c:1928
gmp_get_report_opts_t::max_results
int max_results
Maximum number of results to return.
Definition: gmp.h:68