#include "ipc_openvas.h"
#include <json-glib/json-glib.h>
Go to the source code of this file.
◆ G_LOG_DOMAIN
| #define G_LOG_DOMAIN "lib misc" |
◆ ipc_hostname_t
◆ ipc_lsc_t
◆ ipc_user_agent_t
◆ ipc_data_destroy()
◆ ipc_data_from_json()
| ipc_data_t * ipc_data_from_json |
( |
const char * | json, |
|
|
size_t | len ) |
transforms json string to a ipc_data struct
- Parameters
-
| json | the json representation to be transformed. |
| len | the length of the json representation |
- Returns
- a heap allocated ipc_data or NULL on failure.
◆ ipc_data_to_json()
| const char * ipc_data_to_json |
( |
ipc_data_t * | data | ) |
|
transforms ipc_data to a json string
- Parameters
-
- Returns
- a heap allocated achar array containing the json or NULL on failure.
◆ ipc_data_type_from_hostname()
| ipc_data_t * ipc_data_type_from_hostname |
( |
const char * | source, |
|
|
size_t | source_len, |
|
|
const char * | hostname, |
|
|
size_t | hostname_len ) |
initializes ipc_data for a hostname data.
- Parameters
-
| source | the source of the hostname |
| hostname | the name of the host |
- Returns
- a heap initialized ipc_data or NULL on failure.
◆ ipc_data_type_from_lsc()
| ipc_data_t * ipc_data_type_from_lsc |
( |
gboolean | data_ready | ) |
|
initializes ipc_data for the table driven LSC.
- Parameters
-
- Returns
- a heap initialized ipc_data or NULL on failure.
◆ ipc_data_type_from_user_agent()
| 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.
- Parameters
-
| user_agent | The User-Agent |
| user_agent_len | Length of the user agent string. |
- Returns
- a heap initialized ipc_data or NULL on failure.
◆ ipc_get_data_type_from_data()
Get the data type in data.
- Parameters
-
| data | Structure containing the data and data type |
@Return The corresponding ipc_data_type, IPC_DT_ERROR on error.
◆ ipc_get_hostname_from_data()
| gchar * ipc_get_hostname_from_data |
( |
ipc_data_t * | data | ) |
|
Get the hostname from IPC data.
- Parameters
-
| data | Data structure of IPC_DT_HOSNAME type. |
@Return a string containing the hostname, NULL on error.
◆ ipc_get_hostname_source_from_data()
| gchar * ipc_get_hostname_source_from_data |
( |
ipc_data_t * | data | ) |
|
Get the vhost hostname source from IPC data.
- Parameters
-
| data | Data structure of IPC_DT_HOSNAME type. |
@Return a string containing the vhost hostname source, NULL on error.
◆ ipc_get_lsc_data_ready_flag()
| gboolean ipc_get_lsc_data_ready_flag |
( |
ipc_data_t * | data | ) |
|
Get the package list from LSC IPC data.
- Parameters
-
| data | Data structure of IPC_DT_LSC type. |
@Return True if the data is ready for running with LSC, False otherwise.
◆ ipc_get_user_agent_from_data()
| gchar * ipc_get_user_agent_from_data |
( |
ipc_data_t * | data | ) |
|
Get the User-Agent from IPC data.
- Parameters
-
| data | Data structure of IPC_DT_USER_AGENT type. |
@Return a string containing the User-Agent, NULL on error.
◆ ipc_hostname_destroy()
◆ ipc_lsc_destroy()
Free a LSC data structure.
- Parameters
-
| data | The lsc data structure to be free()'ed |
◆ ipc_user_agent_destroy()
Free a user agent data structure.
- Parameters
-
| data | The user agent data structure to be free()'ed |