OpenVAS Scanner  5.1.3
otp.c File Reference
#include <string.h>
#include <openvas/misc/network.h>
#include "otp.h"
#include <glib.h>
Include dependency graph for otp.c:

Go to the source code of this file.

Functions

client_request_t otp_get_client_request (char *str)
 Find the enum identifier for the client request which is given. More...
 

Function Documentation

◆ otp_get_client_request()

client_request_t otp_get_client_request ( char *  str)

Find the enum identifier for the client request which is given.

as string.

Parameters
strEnum identifier of OTP command (a client_request_t).
See also
client_request_t

Definition at line 42 of file otp.c.

References CREQ_ATTACHED_FILE, CREQ_LONG_ATTACK, CREQ_NVT_INFO, CREQ_PREFERENCES, CREQ_STOP_WHOLE_TEST, and CREQ_UNKNOWN.

Referenced by ntp_parse_input().

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 }
Here is the caller graph for this function: