|
OpenVAS Scanner 23.40.3
|
#include "nasl_tree.h"#include "nasl_debug.h"#include "nasl_var.h"#include <glib.h>#include <regex.h>#include <stdio.h>#include <stdlib.h>#include <string.h>
Go to the source code of this file.
Functions | |
| static tree_cell * | alloc_tree_cell () |
| tree_cell * | alloc_typed_cell (int typ) |
| tree_cell * | alloc_RE_cell (int lnb, int t, tree_cell *l, char *re_str, int *err_c) |
| tree_cell * | alloc_expr_cell (int lnb, int t, tree_cell *l, tree_cell *r) |
| tree_cell * | dup_cell (const tree_cell *tc) |
| static void | free_tree (tree_cell *c) |
| void | ref_cell (tree_cell *c) |
| void | deref_cell (tree_cell *c) |
| static void | prefix (int n, int i) |
| char * | dump_cell_val (const tree_cell *c) |
| static void | dump_tree (const tree_cell *c, int n, int idx) |
| const char * | nasl_type_name (int t) |
| void | nasl_dump_tree (const tree_cell *c) |
| char * | get_line_nb (const tree_cell *c) |
| int | nasl_is_leaf (const tree_cell *pc) |
| int | cell_type (const tree_cell *c) |
Variables | |
| static char * | node_names [] |
Definition at line 60 of file nasl_tree.c.
References alloc_tree_cell(), TC::line_nb, TC::link, and TC::type.
Referenced by get_array_elem(), int2cell(), nasl_exec(), and yyparse().


Definition at line 33 of file nasl_tree.c.
References alloc_tree_cell(), FAKE_CELL, TC::line_nb, TC::link, nasl_perror(), TC::ref_val, TC::type, and TC::x.
Referenced by yyparse().


|
static |
Definition at line 19 of file nasl_tree.c.
Referenced by alloc_expr_cell(), alloc_RE_cell(), alloc_typed_cell(), and dup_cell().

| tree_cell * alloc_typed_cell | ( | int | typ | ) |
Definition at line 25 of file nasl_tree.c.
References alloc_tree_cell(), and TC::type.
Referenced by __attribute__(), _http2_req(), _http_req(), array_from_snmp_error(), array_from_snmp_result(), cgibin(), copy_ref_array(), crypt_data(), encrypt_stream_data(), forge_icmp_packet(), forge_icmp_v6_packet(), forge_igmp_packet(), forge_igmp_v6_packet(), forge_ip_packet(), forge_ip_v6_packet(), forge_tcp_packet(), forge_tcp_v6_packet(), forge_udp_packet(), forge_udp_v6_packet(), get_host_ip(), get_host_kb_index(), get_host_open_port(), get_hostname(), get_hostname_source(), get_hostnames(), get_icmp_element(), get_icmp_v6_element(), get_ip_element(), get_ip_v6_element(), get_kb_item(), get_kb_list(), get_port_state(), get_port_transport(), get_script_oid(), get_tcp_element(), get_tcp_option(), get_tcp_v6_element(), get_tcp_v6_option(), get_udp_element(), get_udp_port_state(), get_udp_v6_element(), get_variable_by_name(), host_reverse_lookup(), insert_ip_options(), insert_tcp_options(), insert_tcp_v6_options(), make_array_from_elems(), nasl_bf_cbc(), nasl_bn_random(), nasl_chomp(), nasl_cipher(), nasl_close_stream_cipher(), nasl_crap(), nasl_dec2str(), nasl_defined_func(), nasl_dh_compute_key(), nasl_dh_generate_key(), nasl_display(), nasl_do_exit(), nasl_egrep(), nasl_end_denial(), nasl_ereg(), nasl_ereg_replace(), nasl_eregmatch(), nasl_exec(), nasl_file_close(), nasl_file_open(), nasl_file_read(), nasl_file_seek(), nasl_file_stat(), nasl_file_write(), nasl_find_in_path(), nasl_forge_frame(), nasl_fread(), nasl_ftp_get_pasv_address(), nasl_ftp_log_in(), nasl_fwrite(), nasl_gcrypt_hash(), nasl_get_byte_order(), nasl_get_local_mac_address_from_ip(), nasl_get_mtu(), nasl_get_preference(), nasl_get_sign(), nasl_get_sock_info(), nasl_get_source_port(), nasl_get_tmp_dir(), nasl_gettimeofday(), nasl_gunzip(), nasl_gzip(), nasl_hex(), nasl_hexstr(), nasl_hmac_sha256(), nasl_http2_close_handle(), nasl_http2_get_response_code(), nasl_http2_handle(), nasl_http2_set_custom_header(), nasl_incr_variable(), nasl_insert_hexzeros(), nasl_insstr(), nasl_int(), nasl_islocalhost(), nasl_islocalnet(), nasl_isnull(), nasl_isotime_add(), nasl_isotime_is_valid(), nasl_isotime_now(), nasl_isotime_print(), nasl_isotime_scan(), nasl_join_multicast_group(), nasl_keyexchg(), nasl_keys(), nasl_lint(), nasl_lm_owf_gen(), nasl_localtime(), nasl_mac(), nasl_make_array(), nasl_make_list(), nasl_match(), nasl_max_index(), nasl_mktime(), nasl_notus_error(), nasl_notus_type(), nasl_ntlm2_response(), nasl_ntlm_response(), nasl_ntlmv1_hash(), nasl_ntlmv2_hash(), nasl_ntlmv2_response(), nasl_ntv2_owf_gen(), nasl_okrb5_add_realm(), nasl_okrb5_error_code_to_string(), nasl_okrb5_find_kdc(), nasl_okrb5_gss_init(), nasl_okrb5_gss_prepare_context(), nasl_okrb5_gss_update_context(), nasl_okrb5_gss_update_context_needs_more(), nasl_okrb5_is_failure(), nasl_okrb5_is_success(), nasl_open_privileged_socket(), nasl_open_sock_kdc(), nasl_open_sock_tcp_bufsz(), nasl_open_sock_udp(), nasl_open_stream_cipher(), nasl_ord(), nasl_pcap_next(), nasl_pem_to(), nasl_pread(), nasl_prf(), nasl_rand(), nasl_rawstring(), nasl_read_var_ref(), nasl_recv(), nasl_recv_line(), nasl_rsa_private_decrypt(), nasl_rsa_public_decrypt(), nasl_rsa_public_encrypt(), nasl_rsa_sign(), nasl_same_host(), nasl_scanner_get_port(), nasl_send(), nasl_send_arp_request(), nasl_send_capture(), nasl_send_frame(), nasl_send_packet(), nasl_send_v6packet(), nasl_sftp_enabled_check(), nasl_smb3kdf(), nasl_smb_close(), nasl_smb_connect(), nasl_smb_file_group_sid(), nasl_smb_file_owner_sid(), nasl_smb_file_SDDL(), nasl_smb_file_trustee_rights(), nasl_smb_sign(), nasl_smb_versioninfo(), nasl_socket_cert_verify(), nasl_socket_check_ssl_safe_renegotiation(), nasl_socket_get_cert(), nasl_socket_get_error(), nasl_socket_get_ssl_ciphersuite(), nasl_socket_get_ssl_session_id(), nasl_socket_get_ssl_version(), nasl_socket_negotiate_ssl(), nasl_socket_ssl_do_handshake(), nasl_split(), nasl_ssh_connect(), nasl_ssh_execute_netconf_subsystem(), nasl_ssh_get_auth_methods(), nasl_ssh_get_host_key(), nasl_ssh_get_issue_banner(), nasl_ssh_get_server_banner(), nasl_ssh_get_sock(), nasl_ssh_login_interactive(), nasl_ssh_login_interactive_pass(), nasl_ssh_request_exec(), nasl_ssh_session_id_from_sock(), nasl_ssh_shell_open(), nasl_ssh_shell_read(), nasl_ssh_shell_write(), nasl_ssh_userauth(), nasl_str_replace(), nasl_strcat(), nasl_stridx(), nasl_string(), nasl_strlen(), nasl_strstr(), nasl_substr(), nasl_target_is_ipv6(), nasl_tcp_ping(), nasl_tcp_v6_ping(), nasl_telnet_init(), nasl_this_host(), nasl_this_host_name(), nasl_tolower(), nasl_toupper(), nasl_typeof(), nasl_unixtime(), nasl_vendor_version(), nasl_win_cmd_exec(), nasl_wmi_close(), nasl_wmi_connect(), nasl_wmi_connect_reg(), nasl_wmi_connect_rsop(), nasl_wmi_query(), nasl_wmi_query_rsop(), nasl_wmi_reg_create_key(), nasl_wmi_reg_delete_key(), nasl_wmi_reg_enum_key(), nasl_wmi_reg_enum_value(), nasl_wmi_reg_get_bin_val(), nasl_wmi_reg_get_dword_val(), nasl_wmi_reg_get_ex_string_val(), nasl_wmi_reg_get_mul_string_val(), nasl_wmi_reg_get_qword_val(), nasl_wmi_reg_get_sz(), nasl_wmi_reg_set_dword_val(), nasl_wmi_reg_set_ex_string_val(), nasl_wmi_reg_set_qword_val(), nasl_wmi_reg_set_string_val(), nasl_wmi_versioninfo(), okrb5_slice_to_tree_cell(), parse_notus(), parse_skiron(), resolve_hostname(), resolve_hostname_to_multiple_ips(), safe_checks(), script_get_preference(), script_get_preference_file_content(), script_get_preference_file_location(), set_ip_elements(), set_ip_v6_elements(), set_tcp_elements(), set_tcp_v6_elements(), set_udp_elements(), set_udp_v6_elements(), var2cell(), and yyparse().

| int cell_type | ( | const tree_cell * | c | ) |
Definition at line 404 of file nasl_tree.c.
References FAKE_CELL, and TC::type.
Referenced by cell_cmp().

| void deref_cell | ( | tree_cell * | c | ) |
Definition at line 178 of file nasl_tree.c.
References FAKE_CELL, free_tree(), and TC::ref_count.
Referenced by cell2atom(), cell2bool(), cell2int3(), cell2str(), cell_cmp(), create_anon_var(), create_named_var(), exec_nasl_script(), free_lex_ctxt(), free_tree(), get_kb_list(), get_tcp_v6_element(), make_array_from_elems(), nasl_clean_ctx(), nasl_display(), nasl_exec(), nasl_func_call(), nasl_pread(), nasl_read_var_ref(), nasl_return(), nasl_start_denial(), nasl_strcat(), parse_notus(), var_cmp(), and yyparse().


| char * dump_cell_val | ( | const tree_cell * | c | ) |
Definition at line 231 of file nasl_tree.c.
References CONST_DATA, CONST_INT, CONST_STR, FAKE_CELL, TC::i_val, nasl_type_name(), TC::size, TC::str_val, TC::type, and TC::x.
Referenced by nasl_func_call().


|
static |
Definition at line 263 of file nasl_tree.c.
References ARRAY_ELEM, CONST_DATA, CONST_INT, CONST_STR, dump_tree(), DYN_ARRAY, FAKE_CELL, TC::i_val, TC::line_nb, TC::link, NODE_ARG, NODE_ARRAY_EL, NODE_DECL, NODE_FUN_CALL, NODE_FUN_DEF, node_names, NODE_VAR, prefix(), REF_ARRAY, TC::ref_count, TC::ref_val, REF_VAR, TC::size, TC::str_val, TC::type, st_n_nasl_var::u, var2str(), st_n_nasl_var::var_name, st_a_nasl_var::var_type, and TC::x.
Referenced by dump_tree(), and nasl_dump_tree().


Definition at line 72 of file nasl_tree.c.
References alloc_tree_cell(), CONST_DATA, CONST_STR, dup_cell(), FAKE_CELL, TC::line_nb, TC::link, TC::size, TC::str_val, TC::type, and TC::x.
Referenced by dup_cell().


|
static |
Definition at line 105 of file nasl_tree.c.
References COMP_RE_MATCH, COMP_RE_NOMATCH, CONST_DATA, CONST_REGEX, CONST_STR, deref_cell(), DYN_ARRAY, FAKE_CELL, free_array(), TC::link, NODE_ARG, NODE_ARRAY_EL, NODE_DECL, NODE_FOREACH, NODE_FUN_CALL, NODE_FUN_DEF, NODE_VAR, TC::ref_val, TC::size, TC::str_val, TC::type, and TC::x.
Referenced by deref_cell().


| char * get_line_nb | ( | const tree_cell * | c | ) |
Definition at line 376 of file nasl_tree.c.
References FAKE_CELL, and TC::line_nb.
Referenced by get_array_elem(), nasl_incr_variable(), and nasl_read_var_ref().

| void nasl_dump_tree | ( | const tree_cell * | c | ) |
Definition at line 363 of file nasl_tree.c.
References dump_tree(), and FAKE_CELL.
Referenced by dump_ctxt(), nasl_func_call(), and ref_cell().


| int nasl_is_leaf | ( | const tree_cell * | pc | ) |
Definition at line 386 of file nasl_tree.c.
References CONST_DATA, CONST_INT, CONST_STR, DYN_ARRAY, FAKE_CELL, REF_ARRAY, and TC::type.
Referenced by nasl_func_call().

| const char * nasl_type_name | ( | int | t | ) |
Definition at line 343 of file nasl_tree.c.
References node_names.
Referenced by cell_cmp(), dump_cell_val(), make_array_from_elems(), and nasl_affect().

|
static |
Definition at line 219 of file nasl_tree.c.
Referenced by dump_tree(), get_plugin_preference(), ipv6_prefix_to_mask(), load_checksums(), o_krb5_write_trimmed(), and print_pcap_error().

| void ref_cell | ( | tree_cell * | c | ) |
Definition at line 164 of file nasl_tree.c.
References FAKE_CELL, nasl_dump_tree(), nasl_perror(), and TC::ref_count.
Referenced by cell2atom(), insert_nasl_func(), nasl_do_exit(), nasl_exec(), nasl_func_call(), nasl_return(), and yyparse().


|
static |
Definition at line 188 of file nasl_tree.c.
Referenced by dump_tree(), and nasl_type_name().