OpenVAS Libraries
4.0+rc3.SVN
|
00001 /* Nessus Attack Scripting Language 00002 * 00003 * Copyright (C) 2002 - 2003 Michel Arboi and Renaud Deraison 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License version 2, 00007 * as published by the Free Software Foundation 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00017 */ 00018 00019 /* -------------------------------------------------------------------- * 00020 * This file contains all the functions related to the handling of the * 00021 * sockets within a NASL script - namely, this is the implementation * 00022 * of open_(priv_)?sock_(udp|tcp)(), send(), recv(), recv_line() and * 00023 * close(). * 00024 *----------------------------------------------------------------------*/ 00025 00026 00027 00028 /*--------------------------------------------------------------------------*/ 00029 #ifndef NASL_SOCKET_H 00030 #define NASL_SOCKET_H 00031 00032 tree_cell *nasl_open_sock_tcp (lex_ctxt *); 00033 tree_cell *nasl_open_sock_udp (lex_ctxt *); 00034 /* private func */ 00035 tree_cell *nasl_open_sock_tcp_bufsz (lex_ctxt *, int); 00036 tree_cell *nasl_socket_get_error (lex_ctxt *); 00037 00038 tree_cell *nasl_open_priv_sock_tcp (lex_ctxt *); 00039 tree_cell *nasl_open_priv_sock_udp (lex_ctxt *); 00040 00041 tree_cell *nasl_send (lex_ctxt *); 00042 00043 tree_cell *nasl_recv (lex_ctxt *); 00044 tree_cell *nasl_recv_line (lex_ctxt *); 00045 00046 tree_cell *nasl_close_socket (lex_ctxt *); 00047 00048 tree_cell *nasl_join_multicast_group (lex_ctxt *); 00049 tree_cell *nasl_leave_multicast_group (lex_ctxt *); 00050 00051 tree_cell *nasl_get_source_port (lex_ctxt *); 00052 00053 #endif