Greenbone Vulnerability Manager 22.5.2
manage_port_lists.h
1/* Copyright (C) 2020-2022 Greenbone AG
2 *
3 * SPDX-License-Identifier: AGPL-3.0-or-later
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Affero General Public License as
7 * published by the Free Software Foundation, either version 3 of the
8 * 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 Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef _GVMD_MANAGE_PORT_LISTS_H
20#define _GVMD_MANAGE_PORT_LISTS_H
21
22#include "manage.h"
23
24#include <glib.h>
25
26gboolean
27find_port_list (const char*, port_list_t*);
28
29gboolean
30find_port_list_with_permission (const char *, port_list_t *, const char *);
31
32gboolean
33find_port_range (const char*, port_list_t*);
34
35int
36trash_port_list_predefined (port_list_t);
37
38int
39port_list_predefined (port_list_t);
40
41int
42create_port_list (const char *, const char *, const char *, const char *,
43 array_t *, port_list_t *);
44
45int
46copy_port_list (const char *, const char *, const char *, port_list_t *);
47
48int
49modify_port_list (const char *, const char *, const char *);
50
51int
52create_port_range (const char *, const char *, const char *, const char *,
53 const char *, port_range_t *);
54
55int
56delete_port_list (const char *, int);
57
58int
59delete_port_range (const char *, int);
60
61int
62port_list_count (const get_data_t *);
63
64int
65init_port_list_iterator (iterator_t *, const get_data_t *);
66
67int
68port_list_iterator_count_all (iterator_t *);
69
70int
71port_list_iterator_count_tcp (iterator_t *);
72
73int
74port_list_iterator_count_udp (iterator_t *);
75
76int
77port_list_iterator_predefined (iterator_t *);
78
79char*
80port_list_uuid (port_list_t);
81
82char*
83port_range_uuid (port_range_t);
84
85int
86port_list_in_use (port_list_t);
87
88int
89trash_port_list_in_use (port_list_t);
90
91int
92trash_port_list_writable (port_list_t);
93
94int
95port_list_writable (port_list_t);
96
97int
98trash_port_list_readable_uuid (const gchar *);
99
100void
101init_port_range_iterator (iterator_t *, port_range_t, int, int, const char *);
102
103const char*
104port_range_iterator_uuid (iterator_t *);
105
106const char*
107port_range_iterator_comment (iterator_t*);
108
109const char*
110port_range_iterator_start (iterator_t *);
111
112const char*
113port_range_iterator_end (iterator_t *);
114
115const char*
116port_range_iterator_type (iterator_t *);
117
118void
119init_port_list_target_iterator (iterator_t *, port_list_t, int);
120
121const char*
122port_list_target_iterator_uuid (iterator_t *);
123
124const char*
125port_list_target_iterator_name (iterator_t *);
126
127int
128port_list_target_iterator_readable (iterator_t *);
129
130gboolean
131port_lists_feed_dir_exists ();
132
133void
134manage_sync_port_lists ();
135
136int
137manage_rebuild_port_lists ();
138
139gboolean
140should_sync_port_lists ();
141
142#endif /* not _GVMD_MANAGE_PORT_LISTS_H */
Command data for a get command.
Definition: manage_get.h:35
A generic SQL iterator structure.
Definition: iterator.h:50