Greenbone Vulnerability Manager 22.5.2
manage_sql_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_SQL_PORT_LISTS_H
20#define _GVMD_MANAGE_SQL_PORT_LISTS_H
21
22#include "manage.h"
23#include "manage_sql.h"
24
27
28const char**
30
31int
32create_port_list_no_acl (const char *, const char *, const char *,
33 const char *, array_t *, port_list_t *);
34
35int
36create_port_list_unique (const char *, const char *, const char *,
37 port_list_t *);
38
39gboolean
40find_port_list_no_acl (const char *, port_list_t *);
41
42gboolean
43find_trash_port_list_no_acl (const char *, port_list_t *);
44
45int
46port_list_is_predefined (port_list_t);
47
48port_protocol_t
50
51int
52restore_port_list (const char *);
53
54void
56
57void
58inherit_port_lists (user_t, user_t);
59
60void
62
63void
65
66int
67port_list_updated_in_feed (port_list_t, const gchar *);
68
69void
70update_port_list (port_list_t, const gchar *, const gchar *, array_t *);
71
72void
74
75#endif /* not _GVMD_MANAGE_SQL_PORT_LISTS_H */
void migrate_predefined_port_lists()
Migrate old ownerless port lists to the Feed Owner.
Definition: manage_sql_port_lists.c:2503
port_protocol_t port_range_iterator_type_int(iterator_t *iterator)
Get the type from a port range iterator.
Definition: manage_sql_port_lists.c:2294
column_t * port_list_select_columns()
Get select columns.
Definition: manage_sql_port_lists.c:1936
int create_port_list_no_acl(const char *id, const char *name, const char *comment, const char *port_ranges, array_t *ranges, port_list_t *port_list_return)
Create a port list.
Definition: manage_sql_port_lists.c:1359
const char ** port_list_filter_columns()
Get filter columns.
Definition: manage_sql_port_lists.c:1924
void update_port_list(port_list_t port_list, const gchar *name, const gchar *comment, array_t *ranges)
Update a port list from an XML file.
Definition: manage_sql_port_lists.c:2557
int restore_port_list(const char *port_list_id)
Try restore a port list.
Definition: manage_sql_port_lists.c:2384
gboolean find_trash_port_list_no_acl(const char *uuid, port_list_t *port_list)
Find a trash port list given a UUID.
Definition: manage_sql_port_lists.c:821
int port_list_updated_in_feed(port_list_t port_list, const gchar *path)
Check if a port list has been updated in the feed.
Definition: manage_sql_port_lists.c:2525
void check_db_port_lists()
Check port lists, for startup.
Definition: manage_sql_port_lists.c:2595
gboolean find_port_list_no_acl(const char *uuid, port_list_t *port_list)
Find a port list given a UUID.
Definition: manage_sql_port_lists.c:765
void inherit_port_lists(user_t user, user_t inheritor)
Change ownership of port lists, for user deletion.
Definition: manage_sql_port_lists.c:2471
void delete_port_lists_user(user_t user)
Delete all port lists owned by a user.
Definition: manage_sql_port_lists.c:2486
void empty_trashcan_port_lists()
Empty trashcan.
Definition: manage_sql_port_lists.c:2451
int create_port_list_unique(const char *name, const char *comment, const char *port_range, port_list_t *port_list)
Create a port list having a unique name.
Definition: manage_sql_port_lists.c:1121
Iterator column.
Definition: manage_sql.h:217
A generic SQL iterator structure.
Definition: iterator.h:50