OpenVAS Libraries  4.0+rc3.SVN
nasl/nasl.h
00001 /* Nessus Attack Scripting Language 
00002  *
00003  * Copyright (C) 2002 - 2005 Tenable Network Security
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 #ifndef __LIB_NASL_H__
00020 #define __LIB_NASL_H__
00021 
00109 /* NASL_LEVEL is deprecated: can be removed once openvas-plugins < 1.0.6 is deprecated */
00110 #define NASL_LEVEL 2205
00111 
00112 #define OPENVAS_NASL_LEVEL 2320
00113 
00114 #include <glib.h>
00115 
00116 #include "../misc/arglists.h"           /* for struct arglist */
00117 
00118 /* Signature information extraction and verification (not nasl- specific 
00119   anymore, thus likely to be moved to openvas-libraries): */
00120 int nasl_verify_signature (const char *filename);
00121 char *nasl_extract_signature_fprs (const char *filename);
00122 GSList *nasl_get_all_certificates ();
00123 /* End of Signature information extraction */
00124 
00125 int add_nasl_inc_dir (const char *);
00126 
00127 /* These can be removed with the next major release after 2.0: */
00128 __attribute__ ((__deprecated__))
00129 int
00130 execute_nasl_script (struct arglist *, const char *, const char *, int);
00131 
00132 int
00133 exec_nasl_script (struct arglist *, const char *, int);
00134 int
00135 execute_preparsed_nasl_script (struct arglist *, char *, char *, int, int);
00136 char *
00137 nasl_version ();
00138 pid_t
00139 nasl_server_start (char *, char *);
00140 void
00141 nasl_server_recompile (char *, char *);
00142 
00143 /* exec_nasl_script modes */
00144 #define NASL_EXEC_DESCR        (1 << 0)
00145 #define NASL_EXEC_PARSE_ONLY       (1 << 1)
00146 #define NASL_EXEC_DONT_CLEANUP       (1 << 2)
00147 #define NASL_ALWAYS_SIGNED       (1 << 3)
00148 #define NASL_COMMAND_LINE      (1 << 4)
00149 #define NASL_LINT        (1 << 5)
00150 
00151 
00152 #define NASL_ERR_NOERR    0
00153 #define NASL_ERR_ETIMEDOUT  1
00154 #define NASL_ERR_ECONNRESET 2
00155 #define NASL_ERR_EUNREACH 3
00156 #define NASL_ERR_EUNKNOWN 99
00157 #endif