OpenVAS Libraries
6.0+beta5
|
The NASL socket API. More...
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <string.h>
#include <unistd.h>
#include <gnutls/gnutls.h>
#include "network.h"
#include "plugutils.h"
#include "system.h"
#include "nasl.h"
#include "nasl_tree.h"
#include "nasl_global_ctxt.h"
#include "nasl_func.h"
#include "nasl_var.h"
#include "nasl_lex_ctxt.h"
#include "exec.h"
#include "strutils.h"
#include "nasl_packet_forgery.h"
#include "nasl_debug.h"
Data Structures | |
struct | udp_record |
struct | jmg |
Macros | |
#define | EADDRNOTAVAIL EADDRINUSE |
Functions | |
tree_cell * | nasl_open_priv_sock_tcp (lex_ctxt *lexic) |
tree_cell * | nasl_open_priv_sock_udp (lex_ctxt *lexic) |
tree_cell * | nasl_open_sock_tcp_bufsz (lex_ctxt *lexic, int bufsz) |
tree_cell * | nasl_open_sock_tcp (lex_ctxt *lexic) |
Open a TCP socket to the target host. More... | |
tree_cell * | nasl_open_sock_udp (lex_ctxt *lexic) |
tree_cell * | nasl_recv (lex_ctxt *lexic) |
tree_cell * | nasl_recv_line (lex_ctxt *lexic) |
tree_cell * | nasl_send (lex_ctxt *lexic) |
tree_cell * | nasl_close_socket (lex_ctxt *lexic) |
tree_cell * | nasl_join_multicast_group (lex_ctxt *lexic) |
tree_cell * | nasl_leave_multicast_group (lex_ctxt *lexic) |
tree_cell * | nasl_get_source_port (lex_ctxt *lexic) |
tree_cell * | nasl_socket_get_error (lex_ctxt *lexic) |
tree_cell * | nasl_get_sock_info (lex_ctxt *lexic) |
Get info pertaining to a socket. More... | |
The NASL socket API.
This file contains all the functions related to the handling of the sockets within a NASL script - for example the implementation of the NASL built-ins open_sock_tcp, send, recv, recv_line, and close.
#define EADDRNOTAVAIL EADDRINUSE |
Get info pertaining to a socket.
This function is used to retrieve various information about an active socket. It requires the NASL socket number and a string to select the information to retrieve.
Supported keywords are:
[in] | lexic | Lexical context of the NASL interpreter. |
Open a TCP socket to the target host.
This function is used to create a TCP connection to the target host. It requires the port number as its argument and has various optional named arguments to control encapsulation, timeout and buffering.
[in] | lexic | Lexical context of the NASL interpreter. |