OpenVAS Manager  7.0.3~git
ompd.h
Go to the documentation of this file.
1 /* OpenVAS Manager
2  * $Id$
3  * Description: Headers for OpenVAS Manager: the OMP daemon.
4  *
5  * Authors:
6  * Matthew Mundell <matthew.mundell@greenbone.net>
7  *
8  * Copyright:
9  * Copyright (C) 2009 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_OMPD_H
27 #define OPENVAS_MANAGER_OMPD_H
28 
29 #include "types.h"
30 #include <openvas/misc/openvas_server.h>
31 #include <glib.h>
32 #include <netinet/in.h>
33 #include <gnutls/gnutls.h>
34 
38 #ifndef READ_PROTOCOL_TIMEOUT
39 #define READ_PROTOCOL_TIMEOUT 300
40 #endif
41 
45 #define FROM_BUFFER_SIZE 1048576
46 
48 
49 extern char from_client[];
52 extern char *from_scanner;
55 
56 extern struct sockaddr_in scanner_address;
57 
58 int
59 init_ompd (GSList*, int, const gchar*, int, int, int, int, void (*) (),
60  int (*) (openvas_connection_t *, gchar *),
61  int);
62 
63 void
64 init_ompd_process (const gchar *, gchar **);
65 
66 int
67 serve_omp (openvas_connection_t*, const gchar*, gchar**, void (*progress) ());
68 
70 extern char to_client[];
73 
74 #endif
buffer_size_t to_client_end
The end of the data in the to_client buffer.
Definition: omp.c:4988
buffer_size_t from_scanner_end
The end of the data in the from_scanner buffer.
Definition: scanner.c:72
char from_client[]
Buffer of input from the client.
Definition: ompd.c:74
struct sockaddr_in scanner_address
buffer_size_t to_client_start
The start of the data in the to_client buffer.
Definition: omp.c:4984
void init_ompd_process(const gchar *, gchar **)
Initialise a process forked within the OMP daemon.
Definition: ompd.c:137
void(* progress)()
Function to mark progress.
Definition: manage_sql.c:352
buffer_size_t from_client_start
The start of the data in the from_client buffer.
Definition: ompd.c:84
int init_ompd(GSList *, int, const gchar *, int, int, int, int, void(*)(), int(*)(openvas_connection_t *, gchar *), int)
Initialise the OMP library for the OMP daemon.
Definition: ompd.c:117
char to_client[]
Buffer of output to the client.
Definition: omp.c:4979
int serve_omp(openvas_connection_t *, const gchar *, gchar **, void(*progress)())
Serve the OpenVAS Management Protocol (OMP).
Definition: ompd.c:493
char * from_scanner
Buffer of input from the scanner.
Definition: scanner.c:62
buffer_size_t from_scanner_start
The start of the data in the from_scanner buffer.
Definition: scanner.c:67
buffer_size_t from_client_end
The end of the data in the from_client buffer.
Definition: ompd.c:89
unsigned int buffer_size_t
Definition: types.h:31
buffer_size_t from_buffer_size
Size of from_client data buffer, in bytes.
Definition: ompd.c:79