OpenVAS Libraries  4.0+rc3.SVN
nasl.h
1 /* Nessus Attack Scripting Language
2  *
3  * Copyright (C) 2002 - 2005 Tenable Network Security
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 #ifndef __LIB_NASL_H__
20 #define __LIB_NASL_H__
21 
109 /* NASL_LEVEL is deprecated: can be removed once openvas-plugins < 1.0.6 is deprecated */
110 #define NASL_LEVEL 2205
111 
112 #define OPENVAS_NASL_LEVEL 2320
113 
114 #include <glib.h>
115 
116 #include "../misc/arglists.h" /* for struct arglist */
117 
118 /* Signature information extraction and verification (not nasl- specific
119  anymore, thus likely to be moved to openvas-libraries): */
120 int nasl_verify_signature (const char *filename);
121 char *nasl_extract_signature_fprs (const char *filename);
122 GSList *nasl_get_all_certificates ();
123 /* End of Signature information extraction */
124 
125 int add_nasl_inc_dir (const char *);
126 
127 /* These can be removed with the next major release after 2.0: */
128 __attribute__ ((__deprecated__))
129 int
130 execute_nasl_script (struct arglist *, const char *, const char *, int);
131 
132 int
133 exec_nasl_script (struct arglist *, const char *, int);
134 int
135 execute_preparsed_nasl_script (struct arglist *, char *, char *, int, int);
136 char *
137 nasl_version ();
138 pid_t
139 nasl_server_start (char *, char *);
140 void
141 nasl_server_recompile (char *, char *);
142 
143 /* exec_nasl_script modes */
144 #define NASL_EXEC_DESCR (1 << 0)
145 #define NASL_EXEC_PARSE_ONLY (1 << 1)
146 #define NASL_EXEC_DONT_CLEANUP (1 << 2)
147 #define NASL_ALWAYS_SIGNED (1 << 3)
148 #define NASL_COMMAND_LINE (1 << 4)
149 #define NASL_LINT (1 << 5)
150 
151 
152 #define NASL_ERR_NOERR 0
153 #define NASL_ERR_ETIMEDOUT 1
154 #define NASL_ERR_ECONNRESET 2
155 #define NASL_ERR_EUNREACH 3
156 #define NASL_ERR_EUNKNOWN 99
157 #endif