OpenVAS Scanner 21.4.1
Macros | Functions
nasl.h File Reference
#include "../misc/scanneraux.h"
#include <glib.h>

Go to the source code of this file.

Macros

#define NASL_EXEC_DESCR   (1 << 0)
 
#define NASL_EXEC_PARSE_ONLY   (1 << 1)
 
#define NASL_ALWAYS_SIGNED   (1 << 2)
 
#define NASL_COMMAND_LINE   (1 << 3)
 
#define NASL_LINT   (1 << 4)
 
#define NASL_ERR_NOERR   0
 
#define NASL_ERR_ETIMEDOUT   1
 
#define NASL_ERR_ECONNRESET   2
 
#define NASL_ERR_EUNREACH   3
 
#define NASL_ERR_EUNKNOWN   99
 

Functions

int nasl_verify_signature (const char *filename)
 
char * nasl_extract_signature_fprs (const char *filename)
 
GSList * nasl_get_all_certificates (void)
 
int add_nasl_inc_dir (const char *)
 Adds the given string as directory for searching for includes. More...
 
void nasl_clean_inc (void)
 
int exec_nasl_script (struct script_infos *, int)
 Execute a NASL script. More...
 
char * nasl_version (void)
 
pid_t nasl_server_start (char *, char *)
 
void nasl_server_recompile (char *, char *)
 

Macro Definition Documentation

◆ NASL_ALWAYS_SIGNED

#define NASL_ALWAYS_SIGNED   (1 << 2)

◆ NASL_COMMAND_LINE

#define NASL_COMMAND_LINE   (1 << 3)

◆ NASL_ERR_ECONNRESET

#define NASL_ERR_ECONNRESET   2

◆ NASL_ERR_ETIMEDOUT

#define NASL_ERR_ETIMEDOUT   1

◆ NASL_ERR_EUNKNOWN

#define NASL_ERR_EUNKNOWN   99

◆ NASL_ERR_EUNREACH

#define NASL_ERR_EUNREACH   3

◆ NASL_ERR_NOERR

#define NASL_ERR_NOERR   0

◆ NASL_EXEC_DESCR

#define NASL_EXEC_DESCR   (1 << 0)

◆ NASL_EXEC_PARSE_ONLY

#define NASL_EXEC_PARSE_ONLY   (1 << 1)

◆ NASL_LINT

#define NASL_LINT   (1 << 4)

Function Documentation

◆ add_nasl_inc_dir()

int add_nasl_inc_dir ( const char *  dir)

Adds the given string as directory for searching for includes.

Parameters
dirA directory path. This function will add a copy of this parameter to the list of include folders. This means the parameter can be freed elsewhere without affecting the list.
Returns
0 in case of success. -1 if the stat on the given directory path was unsuccessful. -2 if the given directory path was not a directory.

◆ exec_nasl_script()

int exec_nasl_script ( struct script_infos script_infos,
int  mode 
)

Execute a NASL script.

"mode" is a bit field: bit #0 (1) is "description" Bit #1 (2) is "parse only"

Parameters
script_infosThe plugin script_infos. #param mode Flags for different execution modes (Description, parse-only, always-signed, command-line, lint)
Returns
0 if the script was executed successfully, negative values if an error occurred. Return number of errors if mode is NASL_LINT and no none linting errors occurred.

◆ nasl_clean_inc()

void nasl_clean_inc ( void  )

◆ nasl_extract_signature_fprs()

char * nasl_extract_signature_fprs ( const char *  filename)

◆ nasl_get_all_certificates()

GSList * nasl_get_all_certificates ( void  )

◆ nasl_server_recompile()

void nasl_server_recompile ( char *  ,
char *   
)

◆ nasl_server_start()

pid_t nasl_server_start ( char *  ,
char *   
)

◆ nasl_verify_signature()

int nasl_verify_signature ( const char *  filename)

◆ nasl_version()

char * nasl_version ( void  )