|
OpenVAS Scanner 23.40.3
|

Go to the source code of this file.
Functions | |
| tree_cell * | forge_ip_v6_packet (lex_ctxt *) |
| Forge an IPv6 packet. | |
| tree_cell * | set_ip_v6_elements (lex_ctxt *) |
| Set IPv6 header element. | |
| tree_cell * | get_ip_v6_element (lex_ctxt *) |
| Obtain IPv6 header element. | |
| tree_cell * | dump_ip_v6_packet (lex_ctxt *) |
| Print IPv6 Header. | |
| tree_cell * | insert_ip_v6_options (lex_ctxt *) |
| Adds an IPv6 option to the datagram. | |
| tree_cell * | forge_tcp_v6_packet (lex_ctxt *) |
| Forge TCP packet. | |
| tree_cell * | get_tcp_v6_element (lex_ctxt *) |
| Get TCP Header element. | |
| tree_cell * | get_tcp_v6_option (lex_ctxt *) |
| Get a TCP option from an IP datagram if present. Possible options are: TCPOPT_MAXSEG (2), values between 536 and 65535 TCPOPT_WINDOW (3), with values between 0 and 14 TCPOPT_SACK_PERMITTED (4), no value required. TCPOPT_TIMESTAMP (8), 8 bytes value for timestamp and echo timestamp, 4 bytes each one. | |
| tree_cell * | set_tcp_v6_elements (lex_ctxt *) |
| Set TCP Header element. | |
| tree_cell * | insert_tcp_v6_options (lex_ctxt *) |
| Add options to a TCP segment header. Possible options are: TCPOPT_MAXSEG (2), values between 536 and 65535 TCPOPT_WINDOW (3), with values between 0 and 14 TCPOPT_SACK_PERMITTED (4), no value required. TCPOPT_TIMESTAMP (8), 8 bytes value for timestamp and echo timestamp, 4 bytes each one. | |
| tree_cell * | dump_tcp_v6_packet (lex_ctxt *) |
| Dump TCP part of an IPv6 Datagram. | |
| tree_cell * | forge_udp_v6_packet (lex_ctxt *) |
| tree_cell * | set_udp_v6_elements (lex_ctxt *) |
| tree_cell * | dump_udp_v6_packet (lex_ctxt *) |
| tree_cell * | get_udp_v6_element (lex_ctxt *) |
| tree_cell * | forge_icmp_v6_packet (lex_ctxt *) |
| tree_cell * | get_icmp_v6_element (lex_ctxt *) |
| tree_cell * | dump_icmp_v6_packet (lex_ctxt *) |
| Dump the ICMP part of a IP Datagram. | |
| tree_cell * | forge_igmp_v6_packet (lex_ctxt *) |
| tree_cell * | nasl_tcp_v6_ping (lex_ctxt *) |
| Performs TCP Connect to test if host is alive. | |
| tree_cell * | nasl_send_v6packet (lex_ctxt *) |
| Send forged IPv6 Packets. | |
Dump the ICMP part of a IP Datagram.
| [in] | lexic | Lexical context of NASL interpreter. |
| [in] | ... | IP datagrams to dump the ICMP part from. |
Definition at line 2054 of file nasl_packet_forgery_v6.c.
References get_str_var_by_num(), get_var_size_by_num(), and UNFIX.

Print IPv6 Header.
| [in] | lexic | Lexical context of NASL interpreter. |
| [in] | ... | IPv6 datagrams to dump. |
Definition at line 337 of file nasl_packet_forgery_v6.c.
References FAKE_CELL, get_str_var_by_num(), and UNFIX.

Dump TCP part of an IPv6 Datagram.
| [in] | lexic | Lexical context of NASL interpreter. |
| [in] | ... | IPv6 datagrams to dump. |
Definition at line 1250 of file nasl_packet_forgery_v6.c.
References tcp_opt_tstamp::e_tstamp, get_str_var_by_num(), get_tcp_options(), get_var_size_by_num(), tcp_opt_sack_perm::kind, tcp_opt_mss::mss, tcp_options::mss, tcp_options::sack_perm, tcp_opt_tstamp::tstamp, tcp_options::tstamp, UNFIX, tcp_opt_wscale::wscale, and tcp_options::wscale.

Definition at line 1662 of file nasl_packet_forgery_v6.c.
References get_str_var_by_num(), and get_var_size_by_num().

Definition at line 1726 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), CONST_DATA, FIX, get_int_var_by_name(), get_str_var_by_name(), get_var_size_by_name(), len, nasl_perror(), np_in_cksum(), TC::size, TC::str_val, UNFIX, and TC::x.

Definition at line 2111 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), igmp::cksum, igmp::code, CONST_DATA, FIX, get_int_var_by_name(), get_str_var_by_name(), get_var_size_by_name(), igmp::group, len, nasl_perror(), np_in_cksum(), TC::size, TC::str_val, igmp::type, UNFIX, and TC::x.

Forge an IPv6 packet.
| [in] | lexic | Lexical context of NASL interpreter. |
| [in] | data | Data payload |
| [in] | ip6_v | Version. 6 by default. |
| [in] | ip6_tc | Traffic class. 0 by default. |
| [in] | ip6_fl | Flow label. 0 by default. |
| [in] | ip6_p | IP protocol. 0 by default. |
| [in] | ip6_hlim | Hop limit. Max. 255. 64 by default. |
| [in] | ip6_src | Source address. |
| [in] | ip6_dst | Destination address. |
Definition at line 119 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), CONST_DATA, FIX, get_int_var_by_name(), get_str_var_by_name(), get_var_size_by_name(), plug_get_host_ip(), struct_lex_ctxt::script_infos, TC::size, TC::str_val, and TC::x.

Forge TCP packet.
| [in] | lexic | Lexical context of NASL interpreter. |
| [in] | ip6 | IPv6 packet. |
| [in] | data | Data. |
| [in] | th_sport | Source port. 0 by default. |
| [in] | th_dport | Destination port. 0 by default. |
| [in] | th_seq | Sequence number. Random by default. |
| [in] | th_ack | Acknowledgement number. 0 by default. |
| [in] | th_x2 | 0 by default. |
| [in] | th_off | Data offset. 5 by default. |
| [in] | th_flags | Flags. 0 by default. |
| [in] | th_win | Window. 0 by default. |
| [in] | th_sum | Checksum. Is filled in automatically by default |
| [in] | th_urp | Urgent pointer. 0 by default. |
Definition at line 531 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), CONST_DATA, v6pseudohdr::d6addr, FIX, get_int_var_by_name(), get_str_var_by_name(), get_var_size_by_name(), len, v6pseudohdr::length, nasl_perror(), np_in_cksum(), v6pseudohdr::protocol, v6pseudohdr::s6addr, TC::size, TC::str_val, v6pseudohdr::tcpheader, and TC::x.

Definition at line 1396 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), CONST_DATA, FIX, get_int_var_by_name(), get_str_var_by_name(), get_var_size_by_name(), nasl_perror(), np_in_cksum(), TC::size, TC::str_val, UNFIX, and TC::x.

Definition at line 1985 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), CONST_DATA, CONST_INT, get_str_var_by_name(), get_var_size_by_name(), TC::i_val, nasl_perror(), TC::size, TC::str_val, and TC::x.

Obtain IPv6 header element.
| [in] | lexic | Lexical context of NASL interpreter. |
| [in] | ipv6 | IPv6 header. TODO: Once versions older than 20.08 are no longer in use the parameter name can be changed to 'ip6'. |
| [in] | element | Element to extract from the header. |
Definition at line 191 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), CONST_DATA, CONST_INT, get_str_var_by_name(), TC::i_val, nasl_perror(), TC::size, TC::str_val, UNFIX, and TC::x.

Get TCP Header element.
| [in] | lexic | Lexical context of NASL interpreter. |
| [in] | tcp | IPv6 packet |
| [in] | element | Element to extract from the header (see forge_tcp_v6_packet()). |
Definition at line 619 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), CONST_DATA, CONST_INT, deref_cell(), get_str_var_by_name(), get_var_size_by_name(), TC::i_val, nasl_perror(), TC::size, TC::str_val, UNFIX, and TC::x.

Get a TCP option from an IP datagram if present. Possible options are: TCPOPT_MAXSEG (2), values between 536 and 65535 TCPOPT_WINDOW (3), with values between 0 and 14 TCPOPT_SACK_PERMITTED (4), no value required. TCPOPT_TIMESTAMP (8), 8 bytes value for timestamp and echo timestamp, 4 bytes each one.
| [in] | lexic | Lexical context of NASL interpreter. |
| [in] | tcp | The full IP datagram (IP + TCP). |
| [in] | option | Option to get. |
Definition at line 776 of file nasl_packet_forgery_v6.c.
References add_var_to_array(), alloc_typed_cell(), CONST_INT, DYN_ARRAY, tcp_opt_tstamp::e_tstamp, get_int_var_by_name(), get_str_var_by_name(), get_tcp_options(), get_var_size_by_name(), TC::i_val, tcp_opt_sack_perm::kind, tcp_opt_mss::mss, tcp_options::mss, nasl_perror(), TC::ref_val, tcp_options::sack_perm, tcp_opt_tstamp::tstamp, tcp_options::tstamp, UNFIX, st_a_nasl_var::v, st_a_nasl_var::v_int, VAR2_INT, st_a_nasl_var::var_type, tcp_opt_wscale::wscale, tcp_options::wscale, and TC::x.

Definition at line 1480 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), CONST_DATA, CONST_INT, get_str_var_by_name(), get_var_size_by_name(), TC::i_val, nasl_perror(), TC::size, TC::str_val, and TC::x.

Adds an IPv6 option to the datagram.
| [in] | lexic | Lexical context of NASL interpreter. |
| [in] | ip6 | IPv6 packet. |
| [in] | data | Data payload. |
| [in] | code | Code of option. |
| [in] | length | Length of value. |
| [in] | value | Value of the option. |
Definition at line 395 of file nasl_packet_forgery_v6.c.
Add options to a TCP segment header. Possible options are: TCPOPT_MAXSEG (2), values between 536 and 65535 TCPOPT_WINDOW (3), with values between 0 and 14 TCPOPT_SACK_PERMITTED (4), no value required. TCPOPT_TIMESTAMP (8), 8 bytes value for timestamp and echo timestamp, 4 bytes each one.
| [in] | lexic | Lexical context of NASL interpreter. |
| [in] | tcp | IP datagram. |
| [in] | data | (optional) TCP data payload. |
| [in] | unnamed | option. |
| [in] | Value | for unnamed option if required. |
Definition at line 1000 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), CONST_DATA, v6pseudohdr::d6addr, tcp_opt_tstamp::e_tstamp, FIX, get_int_var_by_num(), get_str_var_by_name(), get_var_size_by_name(), tcp_opt_mss::kind, tcp_opt_sack_perm::kind, tcp_opt_tstamp::kind, tcp_opt_wscale::kind, tcp_opt_mss::len, tcp_opt_sack_perm::len, tcp_opt_tstamp::len, tcp_opt_wscale::len, v6pseudohdr::length, tcp_opt_mss::mss, nasl_perror(), np_in_cksum(), v6pseudohdr::protocol, v6pseudohdr::s6addr, TC::size, TC::str_val, v6pseudohdr::tcpheader, tcp_opt_tstamp::tstamp, UNFIX, tcp_opt_wscale::wscale, and TC::x.

Send forged IPv6 Packets.
| [in] | lexic | Lexical context of NASL interpreter. |
| [in] | ... | IPv6 packets to send. |
| [in] | length | Length of each packet by default. |
| [in] | pcap_active | TRUE by default. Otherwise, NASL does not listen for the answers. |
| [in] | pcap_filter | BPF filter. |
| [in] | pcap_timeout | Capture timeout. 5 by default. |
| [in] | allow_multicast | Default 0. |
Definition at line 2324 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), bpf_close(), capture_next_v6_packet(), CONST_DATA, FAKE_CELL, get_int_var_by_name(), get_str_var_by_name(), get_str_var_by_num(), get_var_size_by_num(), init_v6_capture_device(), len, name, nasl_perror(), plug_get_host_ip(), struct_lex_ctxt::script_infos, TC::size, TC::str_val, v6_islocalhost(), and TC::x.

Performs TCP Connect to test if host is alive.
| [in] | lexic | Lexical context of NASL interpreter. |
| [in] | port | Port to ping. Internal list of common ports is used as default. |
Definition at line 2178 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), bpf_close(), bpf_next_tv(), CONST_INT, v6pseudohdr::d6addr, FIX, get_int_var_by_name(), TC::i_val, init_v6_capture_device(), len, v6pseudohdr::length, np_in_cksum(), plug_get_host_ip(), plug_get_host_open_port(), v6pseudohdr::protocol, rnd_tcp_port, v6pseudohdr::s6addr, struct_lex_ctxt::script_infos, v6pseudohdr::tcpheader, timeval(), v6_islocalhost(), v6_routethrough(), and TC::x.
Referenced by nasl_tcp_ping().


Set IPv6 header element.
| [in] | lexic | Lexical context of NASL interpreter. |
| [in] | ip6 | IP v6 header. |
| [in] | ip6_plen | Payload length. |
| [in] | ip6_hlim | Hop limit. Max. 255 |
| [in] | ip6_nxt | Next packet. |
| [in] | ip6_src | Source address |
Definition at line 296 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), CONST_DATA, get_int_var_by_name(), get_str_var_by_name(), get_var_size_by_name(), nasl_perror(), TC::size, TC::str_val, and TC::x.

Set TCP Header element.
| [in] | lexic | Lexical context of NASL interpreter. |
| [in] | tcp | IPv6 packet to modify. |
| [in] | data | Data. |
| [in] | th_sport | Source port. |
| [in] | th_dport | Destination port. |
| [in] | th_seq | Sequence number. |
| [in] | th_ack | Acknowledgement number. |
| [in] | th_x2 | |
| [in] | th_off | Data offset. |
| [in] | th_flags | Flags. |
| [in] | th_win | Window. |
| [in] | th_sum | Checksum. |
| [in] | th_urp | Urgent pointer. |
| [in] | update_ip_len | Flag (TRUE by default). If set, NASL will recompute the size field of the IP datagram. |
Definition at line 895 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), CONST_DATA, v6pseudohdr::d6addr, FIX, get_int_var_by_name(), get_str_var_by_name(), get_var_size_by_name(), v6pseudohdr::length, nasl_perror(), np_in_cksum(), v6pseudohdr::protocol, v6pseudohdr::s6addr, TC::size, TC::str_val, v6pseudohdr::tcpheader, UNFIX, and TC::x.

Definition at line 1552 of file nasl_packet_forgery_v6.c.
References alloc_typed_cell(), CONST_DATA, FIX, get_int_var_by_name(), get_str_var_by_name(), get_var_size_by_name(), len, nasl_perror(), np_in_cksum(), TC::size, TC::str_val, and TC::x.
