Greenbone Vulnerability Manager  8.0.1~git
scanner.h
Go to the documentation of this file.
1 /* Copyright (C) 2014-2018 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 _GVMD_SCANNER_H
26 #define _GVMD_SCANNER_H
27 
28 #include <gnutls/gnutls.h>
29 
30 int
32 
33 int
35 
36 int
38 
39 void
41 
42 int
44 
45 void
47 
48 int
49 openvas_scanner_fd_isset (fd_set *);
50 
51 void
52 openvas_scanner_fd_set (fd_set *);
53 
54 int
56 
57 int
59 
60 int
62 
63 int
65 
66 int
68 
69 int
71 
72 int
74 
75 int
77 
78 int
79 openvas_scanner_set_address (const char *, int);
80 
81 int
82 openvas_scanner_set_unix (const char *);
83 
84 void
85 openvas_scanner_set_certs (const char *, const char *, const char *);
86 
87 #endif /* not _GVMD_SCANNER_H */
int openvas_scanner_get_nfds(int)
Get the nfds value to use for a select() call.
Definition: scanner.c:787
int openvas_scanner_read()
Read as much from the server as the from_scanner buffer will.
Definition: scanner.c:265
int openvas_scanner_set_unix(const char *)
Set the scanner's unix socket path.
Definition: scanner.c:888
int openvas_scanner_peek()
Check if there is any data to receive from connected Scanner socket.
Definition: scanner.c:770
int openvas_scanner_connected()
Whether we have started a connection to the Scanner using openvas_scanner_connect().
Definition: scanner.c:819
int openvas_scanner_write(int)
Write as much as possible from the to_scanner buffer to the scanner.
Definition: scanner.c:376
int openvas_scanner_close()
Finish the connection to the Scanner and free internal buffers.
Definition: scanner.c:592
void openvas_scanner_set_certs(const char *, const char *, const char *)
Set the scanner's CA Certificate, and public/private key pair.
Definition: scanner.c:908
int openvas_scanner_connect()
Create a new connection to the scanner and set it as current scanner.
Definition: scanner.c:671
int openvas_scanner_full()
Check whether the buffer for data from Scanner is full.
Definition: scanner.c:346
int openvas_scanner_realloc()
Reallocates the from_scanner buffer to a higher size.
Definition: scanner.c:357
int openvas_scanner_session_peek()
Check if there is any data to receive from connected Scanner session.
Definition: scanner.c:802
void openvas_scanner_fd_set(fd_set *)
Add connected to Scanner's socket to an fd_set.
Definition: scanner.c:756
void openvas_scanner_free()
Free the scanner allocated data. Doesn't close socket and terminate the session.
Definition: scanner.c:714
int openvas_scanner_is_loading()
Checks whether the connected to OpenVAS Scanner is still loading plugins. To be called right after op...
Definition: scanner.c:932
void openvas_scanner_fork()
Reset Scanner variables after a fork.
Definition: scanner.c:617
int openvas_scanner_fd_isset(fd_set *)
Check if connected to Scanner is set in an fd_set.
Definition: scanner.c:743
int openvas_scanner_set_address(const char *, int)
Set the scanner's address and port. Will try to resolve addr if it is a hostname.
Definition: scanner.c:862
int openvas_scanner_init(int)
Initializes the already setup connection with the Scanner.
Definition: scanner.c:833