18#include <gvm/base/prefs.h>
24#define G_LOG_DOMAIN "lib misc"
35 const char *json = NULL;
43 g_warning (
"Unable to send %s to host process",
user_agent);
63 if (!ua || strlen (g_strstrip (ua)) == 0)
67 ua = g_strdup_printf (
"Mozilla/5.0 [en] (X11, U; OpenVAS-VT %s)",
68 OPENVAS_MISC_VERSION);
70 ua = g_strdup_printf (
"Mozilla/5.0 [en] (X11, U; %s)",
95 if (ua != NULL && ua[0] !=
'\0')
int ipc_send(struct ipc_context *context, enum ipc_relation to, const char *msg, size_t len)
sends given msg to the target based on the given context
void ipc_data_destroy(ipc_data_t **data)
destroys ipc_data.
const char * ipc_data_to_json(ipc_data_t *data)
transforms ipc_data to a json string
ipc_data_t * ipc_data_type_from_user_agent(const char *user_agent, size_t user_agent_len)
initializes ipc_data for the User-Agent.
char * get_plugin_preference(const char *oid, const char *name, int pref_id)
Get the a plugins preference.
Header file for module plugutils.
static int send_user_agent_via_ipc(struct ipc_context *ipc_context)
int user_agent_get(struct ipc_context *ipc_context, char **useragent)
Get user-agent.
gchar * user_agent_set(const gchar *ua)
Set user-agent.
static void user_agent_create(void)
Create and set the global User-Agent variable.
static gchar * user_agent
user-agent, or NULL.
Header file: user agent functions prototypes.
const gchar * vendor_version_get()
Get vendor version.
Header file: vendor version functions prototypes.