[Openvas-commits] r5365 - in trunk/openvas-libraries: . include nasl

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Oct 5 11:25:54 CEST 2009


Author: felix
Date: 2009-10-05 11:25:52 +0200 (Mon, 05 Oct 2009)
New Revision: 5365

Added:
   trunk/openvas-libraries/include/nvt_categories.h
Modified:
   trunk/openvas-libraries/ChangeLog
   trunk/openvas-libraries/Makefile
   trunk/openvas-libraries/include/libopenvas.h
   trunk/openvas-libraries/nasl/nasl_init.c
Log:
* includes/nvt_categories.h: New file, contains categories previously
declared in libopenvas.h and a todo.

* Makefile: Install nvt_categories.h

* include/libopenvas.h: Removed definitions now contained in
nvti_categories (ACT_*) and in openvas-scanner/pluginscheduler.h
(LAUNCH_*).

* nasl/nasl_init.c: Include nvt_categories instead of libopenvas.


Modified: trunk/openvas-libraries/ChangeLog
===================================================================
--- trunk/openvas-libraries/ChangeLog	2009-10-05 09:19:22 UTC (rev 5364)
+++ trunk/openvas-libraries/ChangeLog	2009-10-05 09:25:52 UTC (rev 5365)
@@ -1,3 +1,16 @@
+2009-10-05  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
+	* includes/nvt_categories.h: New file, contains categories previously
+	declared in libopenvas.h and a todo.
+
+	* Makefile: Install nvt_categories.h
+
+	* include/libopenvas.h: Removed definitions now contained in
+	nvti_categories (ACT_*) and in openvas-scanner/pluginscheduler.h
+	(LAUNCH_*).
+
+	* nasl/nasl_init.c: Include nvt_categories instead of libopenvas.
+
 2009-10-03  Matthew Mundell <matthew.mundell at intevation.de>
 
 	* omp.c (omp_get_preferences_503): New function.

Modified: trunk/openvas-libraries/Makefile
===================================================================
--- trunk/openvas-libraries/Makefile	2009-10-05 09:19:22 UTC (rev 5364)
+++ trunk/openvas-libraries/Makefile	2009-10-05 09:25:52 UTC (rev 5365)
@@ -54,6 +54,7 @@
 	cd omp  && ${MAKE} install
 
 	$(INSTALL) -m 0444 include/libopenvas.h $(DESTDIR)${includedir}/openvas
+	$(INSTALL) -m 0444 include/nvt_categories.h $(DESTDIR)${includedir}/openvas
 	$(INSTALL) -m 0444 include/libvers.h   $(DESTDIR)${includedir}/openvas
 	$(INSTALL) -m 0444 misc/arglists.h $(DESTDIR)${includedir}/openvas
 	$(INSTALL) -m 0444 misc/bpf_share.h $(DESTDIR)${includedir}/openvas

Modified: trunk/openvas-libraries/include/libopenvas.h
===================================================================
--- trunk/openvas-libraries/include/libopenvas.h	2009-10-05 09:19:22 UTC (rev 5364)
+++ trunk/openvas-libraries/include/libopenvas.h	2009-10-05 09:25:52 UTC (rev 5365)
@@ -110,32 +110,4 @@
  */
 #include <pcap.h>
 
-/**
- * 'Categories', influence execution order of NVTs.
- */
-
-/** Last plugins actions type. */
-#define ACT_LAST                ACT_END
-/** First plugins actions type. */
-#define ACT_FIRST               ACT_INIT
-
-#define ACT_END                 10
-#define ACT_FLOOD               9
-#define ACT_KILL_HOST           8
-#define ACT_DENIAL              7
-#define ACT_DESTRUCTIVE_ATTACK  6
-#define ACT_MIXED_ATTACK        5
-#define ACT_ATTACK              4
-#define ACT_GATHER_INFO         3
-#define ACT_SETTINGS            2
-#define ACT_SCANNER             1
-#define ACT_INIT                0
-
-/**
- * States of scheduler_plugin.
- */
-#define LAUNCH_DISABLED 0
-#define LAUNCH_RUN      1
-#define LAUNCH_SILENT   2
-
 #endif /* _LIBOPENVAS_H */

Added: trunk/openvas-libraries/include/nvt_categories.h
===================================================================
--- trunk/openvas-libraries/include/nvt_categories.h	2009-10-05 09:19:22 UTC (rev 5364)
+++ trunk/openvas-libraries/include/nvt_categories.h	2009-10-05 09:25:52 UTC (rev 5365)
@@ -0,0 +1,59 @@
+/* OpenVAS
+ * $Id$
+ * Description: Category (ACT_*) definitions.
+ *
+ * Authors:
+ * Renaud Deraison <deraison at nessus.org> (Original pre-fork development)
+ *
+ * Copyright:
+ * Based on work Copyright (C) 1998 - 2007 Tenable Network Security, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/**
+ * @file
+ * This file contains defines for the categories of NVTs.
+ * Categories influence the execution order of NVTs (e.g. NVTs with category
+ * ACT_SCANNER are in principle executed first).
+ */
+
+#ifndef _NVT_CATEGORIES_H
+#define _NVT_CATEGORIES_H
+
+/**
+ * @brief NVT 'Categories', influence execution order of NVTs.
+ *
+ * @todo Consider creation of an enumeration.
+ */
+
+/** Last plugins actions type. */
+#define ACT_LAST                ACT_END
+/** First plugins actions type. */
+#define ACT_FIRST               ACT_INIT
+
+#define ACT_END                 10
+#define ACT_FLOOD               9
+#define ACT_KILL_HOST           8
+#define ACT_DENIAL              7
+#define ACT_DESTRUCTIVE_ATTACK  6
+#define ACT_MIXED_ATTACK        5
+#define ACT_ATTACK              4
+#define ACT_GATHER_INFO         3
+#define ACT_SETTINGS            2
+#define ACT_SCANNER             1
+#define ACT_INIT                0
+
+#endif /* _NVT_CATEGORIES_H */

Modified: trunk/openvas-libraries/nasl/nasl_init.c
===================================================================
--- trunk/openvas-libraries/nasl/nasl_init.c	2009-10-05 09:19:22 UTC (rev 5364)
+++ trunk/openvas-libraries/nasl/nasl_init.c	2009-10-05 09:25:52 UTC (rev 5365)
@@ -20,7 +20,7 @@
 
 #include <string.h> /* for memset */
 
-#include "libopenvas.h" /* for ACT_INIT */
+#include "nvt_categories.h" /* for ACT_INIT */
 #include "plugutils.h" /* for OPENVAS_ENCAPS_IP */
 
 #include "nasl_tcp.h"



More information about the Openvas-commits mailing list