[Openvas-commits] r1247 - in trunk/openvas-server: . doc openvasd

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Aug 30 00:21:35 CEST 2008


Author: jan
Date: 2008-08-30 00:21:34 +0200 (Sat, 30 Aug 2008)
New Revision: 1247

Added:
   trunk/openvas-server/openvasd/otp_1_0.c
   trunk/openvas-server/openvasd/otp_1_0.h
Modified:
   trunk/openvas-server/ChangeLog
   trunk/openvas-server/MANIFEST
   trunk/openvas-server/doc/otp_specification_10.txt
   trunk/openvas-server/openvasd/Makefile
   trunk/openvas-server/openvasd/ntp_11.c
Log:
Start the otp 1.0 module with a first simple method.

* doc/otp_specification_10.txt: Added documentation
of OPENVAS_VERSION command.

* openvasd/otp_1_0.h, openvasd/otp_1_0.c: New. This module will
implements OTP 1.0 and initially contains
otp_1_0_server_openvas_version().

* openvasd/Makefile: Handle module otp_1_0.

* openvasd/ntp_11.c (ntp_11_parse_input): Call
otp_1_0_server_openvas_version() instead of sending
text on its own.

* MANIFEST: updated.


Modified: trunk/openvas-server/ChangeLog
===================================================================
--- trunk/openvas-server/ChangeLog	2008-08-29 14:56:30 UTC (rev 1246)
+++ trunk/openvas-server/ChangeLog	2008-08-29 22:21:34 UTC (rev 1247)
@@ -1,3 +1,22 @@
+2008-08-30  Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
+
+	Start the otp 1.0 module with a first simple method.
+
+	* doc/otp_specification_10.txt: Added documentation
+	of OPENVAS_VERSION command.
+
+	* openvasd/otp_1_0.h, openvasd/otp_1_0.c: New. This module will
+	implements OTP 1.0 and initially contains
+	otp_1_0_server_openvas_version().
+
+	* openvasd/Makefile: Handle module otp_1_0.
+
+	* openvasd/ntp_11.c (ntp_11_parse_input): Call
+	otp_1_0_server_openvas_version() instead of sending
+	text on its own.
+
+	* MANIFEST: updated.
+
 2008-08-29  Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
 
 	* doc/kb_entries.txt: Removed those entries that could be

Modified: trunk/openvas-server/MANIFEST
===================================================================
--- trunk/openvas-server/MANIFEST	2008-08-29 14:56:30 UTC (rev 1246)
+++ trunk/openvas-server/MANIFEST	2008-08-29 22:21:34 UTC (rev 1247)
@@ -61,6 +61,8 @@
 openvasd/ntp_11.h
 openvasd/openvas-check-signature.c
 openvasd/openvasd.c
+openvasd/otp_1_0.c
+openvasd/otp_1_0.h
 openvasd/oval_plugins.c
 openvasd/parser.c
 openvasd/parser.h

Modified: trunk/openvas-server/doc/otp_specification_10.txt
===================================================================
--- trunk/openvas-server/doc/otp_specification_10.txt	2008-08-29 14:56:30 UTC (rev 1246)
+++ trunk/openvas-server/doc/otp_specification_10.txt	2008-08-29 22:21:34 UTC (rev 1247)
@@ -273,6 +273,21 @@
                    replaced by semicolons.
       oid: the OID of the NVT that identified the problem.
 
+  OPENVAS_VERSION
+
+    Description:
+
+      With this command the client asks the server to send
+      its version.
+
+      The server will answer as shown in the syntax.
+
+    Syntax:
+
+      CLIENT <|> OPENVAS_VERSION <|> CLIENT
+
+      SERVER <|> OPENVAS_VERSION <|> version <|> SERVER
+
   PLUGINS_DEPENDENCIES
 
     Description:

Modified: trunk/openvas-server/openvasd/Makefile
===================================================================
--- trunk/openvas-server/openvasd/Makefile	2008-08-29 14:56:30 UTC (rev 1246)
+++ trunk/openvas-server/openvasd/Makefile	2008-08-29 22:21:34 UTC (rev 1247)
@@ -17,6 +17,7 @@
        utils.o \
        ntp_10.o \
        ntp_11.o \
+       otp_1_0.o \
        parser.o \
        hosts.o \
        preferences.o \
@@ -89,6 +90,9 @@
 ntp_11.o  : ntp_11.c ntp_11.h
 	$(CC) $(OPENVAS_CFLAGS) $(OPENVAS_INCLUDE) -c ntp_11.c 
 
+otp_1_0.o: otp_1_0.c otp_1_0.h
+	$(CC) $(OPENVAS_CFLAGS) $(OPENVAS_INCLUDE) -c otp_1_0.c
+
 parser.o : parser.c parser.h
 	$(CC) $(OPENVAS_CFLAGS) $(OPENVAS_INCLUDE) -c parser.c 
 

Modified: trunk/openvas-server/openvasd/ntp_11.c
===================================================================
--- trunk/openvas-server/openvasd/ntp_11.c	2008-08-29 14:56:30 UTC (rev 1246)
+++ trunk/openvas-server/openvasd/ntp_11.c	2008-08-29 22:21:34 UTC (rev 1247)
@@ -34,6 +34,7 @@
 
 #include "ntp.h"
 #include "ntp_11.h"
+#include "otp_1_0.h"
 #include "comm.h"
 #include "auth.h"
 #include "rules.h"
@@ -119,9 +120,10 @@
 #endif
 
   if(!strcmp(input, "OPENVAS_VERSION")) {
-	auth_printf(globals, "SERVER <|> OPENVAS_VERSION <|> %s <|> SERVER\n", OPENVAS_VERSION);
-	return 1;
-	}
+    otp_1_0_server_openvas_version(globals);
+    return 1;
+  }
+
   if(!strcmp(input, "ATTACHED_FILE")) {
   	ntp_11_recv_file(globals);
 	efree(&orig);

Added: trunk/openvas-server/openvasd/otp_1_0.c
===================================================================
--- trunk/openvas-server/openvasd/otp_1_0.c	2008-08-29 14:56:30 UTC (rev 1246)
+++ trunk/openvas-server/openvasd/otp_1_0.c	2008-08-29 22:21:34 UTC (rev 1247)
@@ -0,0 +1,36 @@
+/* OpenVAS
+* $Id$
+* Description: Implements OpenVAS Transfer Protocol 1.0.
+*
+* Authors:
+* Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
+*
+* Copyright:
+* Copyright (C) 2008 Intevation GmbH
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License version 2 or later,
+* as published by the Free Software Foundation
+*
+* This program 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+*
+*/
+
+#include <corevers.h>
+
+/* Send server response OPENVAS_VERSION
+ */
+void otp_1_0_server_openvas_version(globals)
+  struct arglist * globals;
+{
+  auth_printf(globals,
+              "SERVER <|> OPENVAS_VERSION <|> %s <|> SERVER\n",
+              OPENVAS_VERSION);
+}

Added: trunk/openvas-server/openvasd/otp_1_0.h
===================================================================
--- trunk/openvas-server/openvasd/otp_1_0.h	2008-08-29 14:56:30 UTC (rev 1246)
+++ trunk/openvas-server/openvasd/otp_1_0.h	2008-08-29 22:21:34 UTC (rev 1247)
@@ -0,0 +1,31 @@
+/* OpenVAS
+* $Id$
+* Description: Protos for OpenVAS Transfer Protocol 1.0.
+*
+* Authors:
+* Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
+*
+* Copyright:
+* Copyright (C) 2008 Intevation GmbH
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License version 2 or later,
+* as published by the Free Software Foundation
+*
+* This program 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 General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+*
+*/
+
+#ifndef _OTP_1_0_H
+#define _OTP_1_0_H
+
+void otp_1_0_server_openvas_version(struct arglist *);
+
+#endif



More information about the Openvas-commits mailing list