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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Dec 9 09:42:30 CET 2009


Author: felix
Date: 2009-12-09 09:42:28 +0100 (Wed, 09 Dec 2009)
New Revision: 6106

Modified:
   trunk/openvas-libraries/ChangeLog
   trunk/openvas-libraries/nasl/nasl_host.c
   trunk/openvas-libraries/nasl/nasl_host.h
Log:
* nasl/nasl_host.c, nasl/nasl_host.h: Cosmetics, added missing
includes.


Modified: trunk/openvas-libraries/ChangeLog
===================================================================
--- trunk/openvas-libraries/ChangeLog	2009-12-09 06:52:52 UTC (rev 6105)
+++ trunk/openvas-libraries/ChangeLog	2009-12-09 08:42:28 UTC (rev 6106)
@@ -1,3 +1,8 @@
+2009-12-09  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
+	* nasl/nasl_host.c, nasl/nasl_host.h: Cosmetics, added missing
+	includes.
+
 2009-12-09  Tim Brown <timb at openvas.org>
 
 	* misc/network.c: Fixed a potential resource leak.
@@ -4,6 +9,10 @@
 
 2009-12-07  Felix Wolfsteller <felix.wolfsteller at intevation.de>
 
+	* base/pidfile.c: Added missing include.
+
+2009-12-07  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
 	* misc/pcap.c: Cosmetics and docs.
 
 2009-12-07  Tim Brown <timb at openvas.org>

Modified: trunk/openvas-libraries/nasl/nasl_host.c
===================================================================
--- trunk/openvas-libraries/nasl/nasl_host.c	2009-12-09 06:52:52 UTC (rev 6105)
+++ trunk/openvas-libraries/nasl/nasl_host.c	2009-12-09 08:42:28 UTC (rev 6106)
@@ -32,6 +32,7 @@
 #include "plugutils.h" /* for plug_get_host_fqdn */
 #include "resolve.h" /* for nn_resolve */
 #include "system.h" /* for estrdup */
+#include "pcap_openvas.h" /* for v6_is_local_ip */
 
 #include "nasl_tree.h"
 #include "nasl_global_ctxt.h"
@@ -39,7 +40,7 @@
 #include "nasl_var.h"
 #include "nasl_lex_ctxt.h"
 #include "nasl_debug.h"
-#include "exec.h"  
+#include "exec.h"
 
 #include "nasl_host.h"
 
@@ -50,7 +51,8 @@
 extern char *v6_routethrough (struct in6_addr *dest, struct in6_addr *source);
 extern int v6_islocalhost(struct in6_addr *);
 
-tree_cell * get_hostname(lex_ctxt * lexic)
+tree_cell *
+get_hostname (lex_ctxt * lexic)
 {
  struct arglist *  script_infos = lexic->script_infos;
  char * hostname = (char*)plug_get_host_fqdn(script_infos);
@@ -66,7 +68,8 @@
  return retc;
 }
 
-tree_cell * get_host_ip(lex_ctxt * lexic)
+tree_cell *
+get_host_ip (lex_ctxt * lexic)
 {
  struct arglist *  script_infos = lexic->script_infos;
  struct in6_addr * ip = plug_get_host_ip(script_infos);
@@ -95,7 +98,8 @@
  return retc;
 }
 
-tree_cell * get_host_open_port(lex_ctxt * lexic)
+tree_cell *
+get_host_open_port (lex_ctxt * lexic)
 {
  struct arglist *  script_infos = lexic->script_infos;
  unsigned int port = plug_get_host_open_port(script_infos);
@@ -108,7 +112,8 @@
  return retc;
 }
 
-tree_cell * get_port_state(lex_ctxt * lexic)
+tree_cell *
+get_port_state (lex_ctxt * lexic)
 {
  int open;
  struct arglist *  script_infos = lexic->script_infos;
@@ -146,7 +151,8 @@
 }
 
 
-tree_cell * nasl_islocalhost(lex_ctxt * lexic)
+tree_cell *
+nasl_islocalhost (lex_ctxt * lexic)
 {
   struct arglist * script_infos = lexic->script_infos;
   struct in6_addr * dst = plug_get_host_ip(script_infos);
@@ -161,7 +167,8 @@
 }
 
 
-tree_cell * nasl_islocalnet(lex_ctxt * lexic)
+tree_cell *
+nasl_islocalnet (lex_ctxt * lexic)
 {
  struct arglist *  script_infos = lexic->script_infos;
  struct in6_addr * ip = plug_get_host_ip(script_infos);
@@ -176,7 +183,8 @@
 }
 
 
-tree_cell * nasl_this_host(lex_ctxt * lexic)
+tree_cell *
+nasl_this_host (lex_ctxt * lexic)
 {
   struct arglist * script_infos = lexic->script_infos;
   tree_cell * retc;
@@ -258,17 +266,18 @@
 }
 
 
-tree_cell * nasl_this_host_name(lex_ctxt * lexic)
+tree_cell *
+nasl_this_host_name (lex_ctxt * lexic)
 {
  char * hostname;
  tree_cell * retc;
- 
+
  retc = alloc_tree_cell(0, NULL);
  retc->type = CONST_DATA;
- 
+
  hostname = emalloc(256);
  gethostname(hostname, 255);
- 
+
  retc->x.str_val = hostname;
  retc->size = strlen(hostname);
  return retc;

Modified: trunk/openvas-libraries/nasl/nasl_host.h
===================================================================
--- trunk/openvas-libraries/nasl/nasl_host.h	2009-12-09 06:52:52 UTC (rev 6105)
+++ trunk/openvas-libraries/nasl/nasl_host.h	2009-12-09 08:42:28 UTC (rev 6106)
@@ -19,6 +19,9 @@
 #ifndef NASL_HOST_H
 #define NASL_HOST_H
 
+#include "nasl_lex_ctxt.h" /* for lex_ctxt */
+#include "nasl_tree.h"     /* for tree_cell */
+
 tree_cell * get_hostname(lex_ctxt * );
 tree_cell * get_host_ip(lex_ctxt * );
 tree_cell * get_host_open_port(lex_ctxt * );



More information about the Openvas-commits mailing list