OpenVAS Scanner
5.1.3
otp.c
Go to the documentation of this file.
1
/* OpenVAS
2
* $Id$
3
* Description: Implements OpenVAS Transfer Protocol.
4
*
5
* Authors:
6
* Jan-Oliver Wagner <jan-oliver.wagner@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
#include <string.h>
27
28
#include <openvas/misc/network.h>
29
30
#include "
otp.h
"
31
32
#include <glib.h>
33
41
client_request_t
42
otp_get_client_request
(
char
*str)
43
{
44
if
(!strcmp (str,
"ATTACHED_FILE"
))
45
return
(
CREQ_ATTACHED_FILE
);
46
if
(!strcmp (str,
"LONG_ATTACK"
))
47
return
(
CREQ_LONG_ATTACK
);
48
if
(!strcmp (str,
"PREFERENCES"
))
49
return
(
CREQ_PREFERENCES
);
50
if
(!strcmp (str,
"STOP_WHOLE_TEST"
))
51
return
(
CREQ_STOP_WHOLE_TEST
);
52
if
(!strcmp (str,
"NVT_INFO"
))
53
return
(
CREQ_NVT_INFO
);
54
55
return
(
CREQ_UNKNOWN
);
56
}
CREQ_UNKNOWN
Definition:
otp.h:32
CREQ_STOP_WHOLE_TEST
Definition:
otp.h:36
client_request_t
client_request_t
Definition:
otp.h:30
CREQ_ATTACHED_FILE
Definition:
otp.h:33
CREQ_NVT_INFO
Definition:
otp.h:37
otp.h
CREQ_LONG_ATTACK
Definition:
otp.h:34
otp_get_client_request
client_request_t otp_get_client_request(char *str)
Find the enum identifier for the client request which is given.
Definition:
otp.c:42
CREQ_PREFERENCES
Definition:
otp.h:35
src
otp.c
Generated on Tue Feb 26 2019 15:16:28 for OpenVAS Scanner by
1.8.14