OpenVAS Scanner 23.23.1
user_agent.h File Reference

Header file: user agent functions prototypes. More...

#include "ipc.h"
#include <glib.h>

Go to the source code of this file.

Functions

int user_agent_get (struct ipc_context *, char **)
 Get user-agent.
gchar * user_agent_set (const gchar *)
 Set user-agent.

Detailed Description

Header file: user agent functions prototypes.

Function Documentation

◆ user_agent_get()

int user_agent_get ( struct ipc_context * ipc_context,
char ** useragent )

Get user-agent.

param[in] ipc_context IPC context for sending data to the parent process param[out] useragent the user agent if any set or an empty string.

Returns
0 on success, -1 on error when sending the message, -2 if the context does not exists

◆ user_agent_set()

gchar * user_agent_set ( const gchar * ua)

Set user-agent.

Set the global user agent. This function overwrite the existing UA. Null or empty string are not allowed.

Parameters
[in]uauser-agent to be set.

Return the old User-Agent. It must be free by the caller