OpenVAS Libraries  4.0+rc3.SVN
nasl_socket.h
1 /* Nessus Attack Scripting Language
2  *
3  * Copyright (C) 2002 - 2003 Michel Arboi and Renaud Deraison
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2,
7  * as published by the Free Software Foundation
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19  /* -------------------------------------------------------------------- *
20  * This file contains all the functions related to the handling of the *
21  * sockets within a NASL script - namely, this is the implementation *
22  * of open_(priv_)?sock_(udp|tcp)(), send(), recv(), recv_line() and *
23  * close(). *
24  *----------------------------------------------------------------------*/
25 
26 
27 
28 /*--------------------------------------------------------------------------*/
29 #ifndef NASL_SOCKET_H
30 #define NASL_SOCKET_H
31 
32 tree_cell *nasl_open_sock_tcp (lex_ctxt *);
33 tree_cell *nasl_open_sock_udp (lex_ctxt *);
34 /* private func */
35 tree_cell *nasl_open_sock_tcp_bufsz (lex_ctxt *, int);
36 tree_cell *nasl_socket_get_error (lex_ctxt *);
37 
38 tree_cell *nasl_open_priv_sock_tcp (lex_ctxt *);
39 tree_cell *nasl_open_priv_sock_udp (lex_ctxt *);
40 
41 tree_cell *nasl_send (lex_ctxt *);
42 
43 tree_cell *nasl_recv (lex_ctxt *);
44 tree_cell *nasl_recv_line (lex_ctxt *);
45 
46 tree_cell *nasl_close_socket (lex_ctxt *);
47 
48 tree_cell *nasl_join_multicast_group (lex_ctxt *);
49 tree_cell *nasl_leave_multicast_group (lex_ctxt *);
50 
51 tree_cell *nasl_get_source_port (lex_ctxt *);
52 
53 #endif