OpenVAS Manager  7.0.3~git
scanner.h
Go to the documentation of this file.
1 /* OpenVAS Manager
2  * $Id$
3  * Description: Module for OpenVAS Manager: Scanner Connection API.
4  *
5  * Authors:
6  * Hani Benhabiles <hani.benhabiles@greenbone.net>
7  *
8  * Copyright:
9  * Copyright (C) 2014 Greenbone Networks GmbH
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25 
26 #ifndef OPENVAS_MANAGER_SCANNER_H
27 #define OPENVAS_MANAGER_SCANNER_H
28 
29 #include <gnutls/gnutls.h>
30 
31 int
33 
34 int
36 
37 int
39 
40 int
42 
43 void
45 
46 int
48 
49 void
51 
52 int
53 openvas_scanner_fd_isset (fd_set *);
54 
55 void
56 openvas_scanner_fd_set (fd_set *);
57 
58 int
60 
61 int
63 
64 int
66 
67 int
69 
70 int
72 
73 int
75 
76 int
78 
79 int
81 
82 int
83 openvas_scanner_set_address (const char *, int);
84 
85 int
86 openvas_scanner_set_unix (const char *);
87 
88 void
89 openvas_scanner_set_certs (const char *, const char *, const char *);
90 
91 #endif /* not OPENVAS_MANAGER_SCANNER_H */
int openvas_scanner_get_nfds(int)
Get the nfds value to use for a select() call.
Definition: scanner.c:732
int openvas_scanner_read()
Read as much from the server as the from_scanner buffer will.
Definition: scanner.c:233
int openvas_scanner_set_unix(const char *)
Set the scanner's unix socket path.
Definition: scanner.c:833
int openvas_scanner_peek()
Check if there is any data to receive from connected Scanner socket.
Definition: scanner.c:715
int openvas_scanner_connected()
Whether we have started a connection to the Scanner using openvas_scanner_connect().
Definition: scanner.c:764
int openvas_scanner_write(int)
Write as much as possible from the to_scanner buffer to the scanner.
Definition: scanner.c:338
int openvas_scanner_close()
Finish the connection to the Scanner and free internal buffers.
Definition: scanner.c:551
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:853
int openvas_scanner_connect()
Create a new connection to the scanner and set it as current scanner.
Definition: scanner.c:619
int openvas_scanner_wait()
Wait for the scanner socket to be writable.
Definition: scanner.c:463
int openvas_scanner_full()
Check whether the buffer for data from Scanner is full.
Definition: scanner.c:310
int openvas_scanner_realloc()
Reallocates the from_scanner buffer to a higher size.
Definition: scanner.c:321
int openvas_scanner_session_peek()
Check if there is any data to receive from connected Scanner session.
Definition: scanner.c:747
void openvas_scanner_fd_set(fd_set *)
Add connected to Scanner's socket to an fd_set.
Definition: scanner.c:701
void openvas_scanner_free()
Free the scanner allocated data. Doesn't close socket and terminate the session.
Definition: scanner.c:659
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:876
void openvas_scanner_fork()
Reset Scanner variables after a fork.
Definition: scanner.c:575
int openvas_scanner_fd_isset(fd_set *)
Check if connected to Scanner is set in an fd_set.
Definition: scanner.c:688
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:807
int openvas_scanner_init(int)
Initializes the already setup connection with the Scanner.
Definition: scanner.c:778