|
OpenVAS Scanner 23.23.1
|
#include <ctype.h>#include <pcap.h>#include <string.h>#include <sys/stat.h>#include <glib.h>#include "../misc/plugutils.h"#include "nasl_tree.h"#include "nasl_global_ctxt.h"#include "nasl_func.h"#include "nasl_var.h"#include "nasl_lex_ctxt.h"#include "nasl_debug.h"#include "nasl_signature.h"#include "nasl_grammar.tab.h"#include <limits.h>#include <stdio.h>#include <stdlib.h>#include <gvm/base/logging.h>#include <gvm/base/prefs.h>#include <libgen.h>#include <gcrypt.h>Data Structures | |
| union | yyalloc |
Macros | |
| #define | YYBISON 30802 |
| #define | YYBISON_VERSION "3.8.2" |
| #define | YYSKELETON_NAME "yacc.c" |
| #define | YYPURE 1 |
| #define | YYPUSH 0 |
| #define | YYPULL 1 |
| #define | yyparse naslparse |
| #define | yylex nasllex |
| #define | yyerror naslerror |
| #define | yydebug nasldebug |
| #define | yynerrs naslnerrs |
| #define | YYPARSE_PARAM parm |
| #define | YYLEX_PARAM parm |
| #define | YYPARSE_ERRC err_c |
| #define | YYLEX_ERRC err_c |
| #define | LNB (((naslctxt*)parm)->line_nb) |
| #define | LN (((naslctxt*)parm)->name) |
| #define | ERRC err_c |
| #define | G_LOG_DOMAIN "lib nasl" |
| GLib logging domain. | |
| #define | YYERROR_VERBOSE |
| #define | YY_CAST(Type, Val) |
| #define | YY_REINTERPRET_CAST(Type, Val) |
| #define | YY_NULLPTR ((void*)0) |
| #define | YYPTRDIFF_T long |
| #define | YYPTRDIFF_MAXIMUM LONG_MAX |
| #define | YYSIZE_T unsigned |
| #define | YYSIZE_MAXIMUM |
| #define | YYSIZEOF(X) |
| #define | YY_(Msgid) |
| #define | YY_ATTRIBUTE_PURE |
| #define | YY_ATTRIBUTE_UNUSED |
| #define | YY_USE(E) |
| #define | YY_INITIAL_VALUE(Value) |
| #define | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| #define | YY_IGNORE_MAYBE_UNINITIALIZED_END |
| #define | YY_IGNORE_USELESS_CAST_BEGIN |
| #define | YY_IGNORE_USELESS_CAST_END |
| #define | YY_ASSERT(E) |
| #define | YYSTACK_ALLOC YYMALLOC |
| #define | YYSTACK_FREE YYFREE |
| #define | YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| #define | YYMALLOC malloc |
| #define | YYFREE free |
| #define | YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) |
| #define | YYSTACK_BYTES(N) |
| #define | YYCOPY_NEEDED 1 |
| #define | YYSTACK_RELOCATE(Stack_alloc, Stack) |
| #define | YYCOPY(Dst, Src, Count) |
| #define | YYFINAL 80 |
| #define | YYLAST 1009 |
| #define | YYNTOKENS 73 |
| #define | YYNNTS 43 |
| #define | YYNRULES 127 |
| #define | YYNSTATES 229 |
| #define | YYMAXUTOK 304 |
| #define | YYTRANSLATE(YYX) |
| #define | YY_ACCESSING_SYMBOL(State) |
| #define | YYPACT_NINF (-77) |
| #define | yypact_value_is_default(Yyn) |
| #define | YYTABLE_NINF (-70) |
| #define | yytable_value_is_error(Yyn) |
| #define | yyerrok (yyerrstatus = 0) |
| #define | yyclearin (yychar = YYEMPTY) |
| #define | YYACCEPT goto yyacceptlab |
| #define | YYABORT goto yyabortlab |
| #define | YYERROR goto yyerrorlab |
| #define | YYNOMEM goto yyexhaustedlab |
| #define | YYRECOVERING() |
| #define | YYBACKUP(Token, Value) |
| #define | YYERRCODE YYUNDEF |
| #define | YYFPRINTF fprintf |
| #define | YYDPRINTF(Args) |
| #define | YY_SYMBOL_PRINT(Title, Kind, Value, Location) |
| #define | YY_STACK_PRINT(Bottom, Top) |
| #define | YY_REDUCE_PRINT(Rule) |
| #define | YYINITDEPTH 200 |
| #define | YYMAXDEPTH 10000 |
| #define | YYPOPSTACK(N) |
Typedefs | |
| typedef enum yysymbol_kind_t | yysymbol_kind_t |
| typedef signed char | yytype_int8 |
| typedef short | yytype_int16 |
| typedef unsigned char | yytype_uint8 |
| typedef unsigned short | yytype_uint16 |
| typedef yytype_uint8 | yy_state_t |
| typedef int | yy_state_fast_t |
Functions | |
| static void | naslerror (naslctxt *, int *, const char *) |
| static int | nasllex (YYSTYPE *lvalp, void *parm, int *err_c) |
| void * | malloc (YYSIZE_T) |
| void | free (void *) |
| static const char * | yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED |
| static void | yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, naslctxt *parm, int *err_c) |
| static void | yy_symbol_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, naslctxt *parm, int *err_c) |
| static void | yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) |
| static void | yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule, naslctxt *parm, int *err_c) |
| static void | yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, naslctxt *parm, int *err_c) |
| int | yyparse (naslctxt *parm, int *err_c) |
| int | add_nasl_inc_dir (const char *dir) |
| Adds the given string as directory for searching for includes. | |
| static void | load_checksums (kb_t kb) |
| static char * | file_checksum (const char *filename, int algorithm) |
| Get the checksum of a file. | |
| int | init_nasl_ctx (naslctxt *pc, const char *name) |
| Initialize a NASL context for a NASL file. | |
| void | nasl_clean_ctx (naslctxt *c) |
| void | nasl_clean_inc (void) |
| int | nasl_get_include_order (const char *c) |
| static int | mylex (YYSTYPE *lvalp, void *parm) |
Variables | |
| static char * | parse_buffer = NULL |
| static int | parse_len = 0 |
| static int | include_order = 0 |
| GHashTable * | includes_hash = NULL |
| static const yytype_int8 | yytranslate [] |
| static const yytype_int16 | yyrline [] |
| static const char *const | yytname [] |
| static const yytype_int16 | yypact [] |
| static const yytype_int8 | yydefact [] |
| static const yytype_int16 | yypgoto [] |
| static const yytype_uint8 | yydefgoto [] |
| static const yytype_int16 | yytable [] |
| static const yytype_int16 | yycheck [] |
| static const yytype_int8 | yystos [] |
| static const yytype_int8 | yyr1 [] |
| static const yytype_int8 | yyr2 [] |
| int | yydebug |
| static GSList * | inc_dirs = NULL |
| static int | checksum_algorithm = GCRY_MD_NONE |
| #define ERRC err_c |
| #define G_LOG_DOMAIN "lib nasl" |
GLib logging domain.
| #define LNB (((naslctxt*)parm)->line_nb) |
| #define YY_ | ( | Msgid | ) |
| #define YY_ACCESSING_SYMBOL | ( | State | ) |
Accessing symbol of state STATE.
| #define YY_ASSERT | ( | E | ) |
| #define YY_ATTRIBUTE_PURE |
| #define YY_ATTRIBUTE_UNUSED |
| #define YY_CAST | ( | Type, | |
| Val ) |
| #define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| #define YY_IGNORE_MAYBE_UNINITIALIZED_END |
| #define YY_IGNORE_USELESS_CAST_BEGIN |
| #define YY_IGNORE_USELESS_CAST_END |
| #define YY_INITIAL_VALUE | ( | Value | ) |
| #define YY_NULLPTR ((void*)0) |
| #define YY_REDUCE_PRINT | ( | Rule | ) |
| #define YY_REINTERPRET_CAST | ( | Type, | |
| Val ) |
| #define YY_STACK_PRINT | ( | Bottom, | |
| Top ) |
| #define YY_SYMBOL_PRINT | ( | Title, | |
| Kind, | |||
| Value, | |||
| Location ) |
| #define YY_USE | ( | E | ) |
| #define YYABORT goto yyabortlab |
| #define YYACCEPT goto yyacceptlab |
| #define YYBACKUP | ( | Token, | |
| Value ) |
| #define YYBISON 30802 |
| #define YYBISON_VERSION "3.8.2" |
| #define yyclearin (yychar = YYEMPTY) |
| #define YYCOPY | ( | Dst, | |
| Src, | |||
| Count ) |
| #define YYCOPY_NEEDED 1 |
| #define yydebug nasldebug |
| #define YYDPRINTF | ( | Args | ) |
| #define YYERRCODE YYUNDEF |
| #define yyerrok (yyerrstatus = 0) |
| #define YYERROR goto yyerrorlab |
| #define yyerror naslerror |
| #define YYERROR_VERBOSE |
| #define YYFINAL 80 |
| #define YYFPRINTF fprintf |
| #define YYFREE free |
| #define YYINITDEPTH 200 |
| #define YYLAST 1009 |
| #define yylex nasllex |
| #define YYLEX_ERRC err_c |
| #define YYLEX_PARAM parm |
| #define YYMALLOC malloc |
| #define YYMAXDEPTH 10000 |
| #define YYMAXUTOK 304 |
| #define yynerrs naslnerrs |
| #define YYNNTS 43 |
| #define YYNOMEM goto yyexhaustedlab |
| #define YYNRULES 127 |
| #define YYNSTATES 229 |
| #define YYNTOKENS 73 |
| #define YYPACT_NINF (-77) |
| #define yypact_value_is_default | ( | Yyn | ) |
| #define yyparse naslparse |
| #define YYPARSE_ERRC err_c |
| #define YYPARSE_PARAM parm |
| #define YYPOPSTACK | ( | N | ) |
| #define YYPTRDIFF_MAXIMUM LONG_MAX |
| #define YYPTRDIFF_T long |
| #define YYPULL 1 |
| #define YYPURE 1 |
| #define YYPUSH 0 |
| #define YYRECOVERING | ( | ) |
| #define YYSIZE_MAXIMUM |
| #define YYSIZE_T unsigned |
| #define YYSIZEOF | ( | X | ) |
| #define YYSKELETON_NAME "yacc.c" |
| #define YYSTACK_ALLOC YYMALLOC |
| #define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| #define YYSTACK_BYTES | ( | N | ) |
| #define YYSTACK_FREE YYFREE |
| #define YYSTACK_RELOCATE | ( | Stack_alloc, | |
| Stack ) |
| #define YYTABLE_NINF (-70) |
| #define yytable_value_is_error | ( | Yyn | ) |
| #define YYTRANSLATE | ( | YYX | ) |
| typedef int yy_state_fast_t |
| typedef yytype_uint8 yy_state_t |
| typedef enum yysymbol_kind_t yysymbol_kind_t |
| typedef short yytype_int16 |
| typedef signed char yytype_int8 |
| typedef unsigned short yytype_uint16 |
| typedef unsigned char yytype_uint8 |
| enum lex_state |
| enum yysymbol_kind_t |
| int add_nasl_inc_dir | ( | const char * | dir | ) |
Adds the given string as directory for searching for includes.
| dir | A 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. |
|
static |
Get the checksum of a file.
| [in] | filename | Path to file. |
| [in] | algorithm | Libgcrypt hash algorithm to use for generating the checksum. |
| void free | ( | void * | ) |
| int init_nasl_ctx | ( | naslctxt * | pc, |
| const char * | name ) |
Initialize a NASL context for a NASL file.
| pc | The NASL context handler. |
| name | The filename of the NASL script. |
|
static |
| void * malloc | ( | YYSIZE_T | ) |
|
static |
| void nasl_clean_ctx | ( | naslctxt * | c | ) |
| void nasl_clean_inc | ( | void | ) |
| int nasl_get_include_order | ( | const char * | c | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| int yyparse | ( | naslctxt * | parm, |
| int * | err_c ) |
|
static |
|
static |
|
static |
|
static |
| GHashTable* includes_hash = NULL |
|
static |
|
static |
|
static |
| int yydebug |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |