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 
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 }
client_request_t
Definition: otp.h:30
client_request_t otp_get_client_request(char *str)
Find the enum identifier for the client request which is given.
Definition: otp.c:42