|
OpenVAS Scanner 23.23.1
|
Functions to set and get the User-Agent. More...
#include "user_agent.h"#include "ipc_openvas.h"#include "plugutils.h"#include "vendorversion.h"#include <glib.h>#include <gvm/base/prefs.h>Macros | |
| #define | G_LOG_DOMAIN "lib misc" |
| GLib logging domain. | |
Functions | |
| static int | send_user_agent_via_ipc (struct ipc_context *ipc_context) |
| static void | user_agent_create (void) |
| Create and set the global User-Agent variable. | |
| gchar * | user_agent_set (const gchar *ua) |
| Set user-agent. | |
| int | user_agent_get (struct ipc_context *ipc_context, char **useragent) |
| Get user-agent. | |
Variables | |
| static gchar * | user_agent = NULL |
| user-agent, or NULL. | |
Functions to set and get the User-Agent.
| #define G_LOG_DOMAIN "lib misc" |
GLib logging domain.
|
static |
|
static |
Create and set the global User-Agent variable.
@description Gets the User-Agent from the globals_settings.nasl script preferences. If it is not set, it uses the Vendor version. In case that there is no Vendor version, it creates one with a fix string and the nasl library version.
| 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.
| 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.
| [in] | ua | user-agent to be set. |
Return the old User-Agent. It must be free by the caller
|
static |
user-agent, or NULL.