Restructuring and work on parameter setting. Debuglevel can now be updated dynamicall...
authorAndreas Tonnesen <andreto@olsr.org>
Tue, 8 Feb 2005 23:29:59 +0000 (23:29 +0000)
committerAndreas Tonnesen <andreto@olsr.org>
Tue, 8 Feb 2005 23:29:59 +0000 (23:29 +0000)
lib/httpinfo/Makefile
lib/httpinfo/src/admin_html.h [new file with mode: 0644]
lib/httpinfo/src/admin_interface.c [new file with mode: 0644]
lib/httpinfo/src/admin_interface.h [new file with mode: 0644]
lib/httpinfo/src/html.h
lib/httpinfo/src/olsrd_httpinfo.c

index 0ebf2bb..faf5e57 100644 (file)
@@ -47,19 +47,19 @@ endif
 endif
 
 ifneq ($(INCLUDE_SETTINGS), )
-       @echo '\nWARNING - BUILDING WITH ADMIN INTERFACE!\n\n'
+       @echo 'WARNING - BUILDING WITH ADMIN INTERFACE!'
 CFLAGS += -DINCLUDE_SETTINGS
 endif
 
 #Sourcefiles
-SRCS=  src/olsrd_plugin.c src/olsrd_httpinfo.c
+SRCS=  src/olsrd_plugin.c src/olsrd_httpinfo.c src/admin_interface.c
 
 #Objectfiles
-OBJS=  src/olsrd_plugin.o src/olsrd_httpinfo.o
+OBJS=  src/olsrd_plugin.o src/olsrd_httpinfo.o src/admin_interface.o
 
 #Headerfiles
 HDRS=  src/olsrd_plugin.h src/olsrd_httpinfo.h src/olsr_plugin_io.h\
-       src/gfx.h src/html.h
+       src/gfx.h src/html.h src/admin_interface.h src/admin_html.h
 
 
 plugin: $(OBJS)
@@ -94,3 +94,5 @@ clean:
 src/olsrd_plugin.o: $(HDRS)
 
 src/olsrd_httpinfo.o: $(HDRS)
+
+src/admin_interface.o: $(HDRS)
diff --git a/lib/httpinfo/src/admin_html.h b/lib/httpinfo/src/admin_html.h
new file mode 100644 (file)
index 0000000..200c303
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * HTTP Info plugin for the olsr.org OLSR daemon
+ * Copyright (c) 2004, Andreas Tønnesen(andreto@olsr.org)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions 
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright 
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright 
+ *   notice, this list of conditions and the following disclaimer in 
+ *   the documentation and/or other materials provided with the 
+ *   distribution.
+ * * Neither the name of olsr.org, olsrd nor the names of its 
+ *   contributors may be used to endorse or promote products derived 
+ *   from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Visit http://www.olsr.org for more information.
+ *
+ * If you find this software useful feel free to make a donation
+ * to the project. For more information see the website or contact
+ * the copyright holders.
+ *
+ * $Id: admin_html.h,v 1.1 2005/02/08 23:29:38 kattemat Exp $
+ */
+
+/*
+ * Dynamic linked library for the olsr.org olsr daemon
+ */
+
+
+
+#ifndef ADMIN_HTML_H
+#define ADMIN_HTML_H
+
+#ifdef INCLUDE_SETTINGS
+static const char *admin_frame[] =
+  {
+    "<b>Administrator interface</b><hr>\n"
+    "<h2>Change basic settings</h2>\n",
+    "<form action=\"set_values\" method=\"post\">\n",
+    "<table width=\"100%%\">\n",
+    "<!-- BASICSETTINGS -->\n",
+    "</table>\n<br>\n",
+    "<center><input type=\"submit\" value=\"Submit\" class=\"input_button\">\n",
+    "<input type=\"reset\" value=\"Reset\" class=\"input_button\"></center>\n",
+    "</form>\n",
+    "<h2>Add/remove local HNA entries</h2>\n",
+    "<form action=\"set_values\" method=\"post\">\n",
+    "<table width=\"100%%\"><tr><td><b>Network:</b></td>\n",
+    "<td><input type=\"text\" name=\"foo\" maxlength=\"100\" class=\"input_text\"></td>\n",
+    "<td><b>Netmask/Prefix:</b></td>\n",
+    "<td><input type=\"text\" name=\"foo\" maxlength=\"16\" class=\"input_text\"></td>\n",
+    "<td><input type=\"submit\" value=\"Add entry\" class=\"input_button\"></td>\n",
+    "</table><hr>\n",
+    "<form action=\"set_values\" method=\"post\">\n",
+    "<table width=\"100%%\">\n",
+    "<tr><th width=50 halign=\"middle\">Delete</th><th>Network</th><th>Netmask</th></tr>\n",
+    "<!-- HNAENTRIES -->\n",
+    "<tr><td halign=\"middle\"><input type=\"checkbox\" name=\"foo\" class=\"input_checkbox\"></td><td>%s</td><td>%s</td></tr>\n",
+    "</table>\n<br>\n",
+    "<center><input type=\"submit\" value=\"Delete selected\" class=\"input_button\"></center>\n",
+    "</form>\n",
+
+    NULL
+};
+
+
+static char admin_basic_setting_int[] = "<td><b>%s</b></td>\n<td> <input type=\"text\" name=\"%s\" maxlength=\"%d\" class=\"input_text\" value=\"%d\"></td>\n";
+static char admin_basic_setting_float[] = "<td><b>%s</b></td>\n<td> <input type=\"text\" name=\"%s\" maxlength=\"%d\" class=\"input_text\" value=\"%0.2f\"></td>\n";
+static char admin_basic_setting_string[] = "<td><b>%s</b></td>\n<td> <input type=\"text\" name=\"%s\" maxlength=\"%d\" class=\"input_text\" value=\"%s\"></td>\n";
+
+#endif
+
+#endif
diff --git a/lib/httpinfo/src/admin_interface.c b/lib/httpinfo/src/admin_interface.c
new file mode 100644 (file)
index 0000000..0c6058c
--- /dev/null
@@ -0,0 +1,249 @@
+
+/*
+ * HTTP Info plugin for the olsr.org OLSR daemon
+ * Copyright (c) 2004, Andreas Tønnesen(andreto@olsr.org)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions 
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright 
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright 
+ *   notice, this list of conditions and the following disclaimer in 
+ *   the documentation and/or other materials provided with the 
+ *   distribution.
+ * * Neither the name of olsr.org, olsrd nor the names of its 
+ *   contributors may be used to endorse or promote products derived 
+ *   from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Visit http://www.olsr.org for more information.
+ *
+ * If you find this software useful feel free to make a donation
+ * to the project. For more information see the website or contact
+ * the copyright holders.
+ *
+ * $Id: admin_interface.c,v 1.1 2005/02/08 23:29:40 kattemat Exp $
+ */
+
+/*
+ * Dynamic linked library for the olsr.org olsr daemon
+ */
+
+
+#include "olsrd_httpinfo.h"
+#include "olsr_cfg.h"
+#include "admin_html.h"
+#include "admin_interface.h"
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+
+
+#ifdef INCLUDE_SETTINGS
+
+int
+build_admin_body(char *buf, olsr_u32_t bufsize)
+{
+  int size = 0, i = 0;
+
+  while(admin_frame[i] && strcmp(admin_frame[i], "<!-- BASICSETTINGS -->\n"))
+    {
+      size += sprintf(&buf[size], admin_frame[i]);
+      i++;
+    }
+  
+  if(!admin_frame[i])
+    return size;
+
+
+  size += sprintf(&buf[size], "<tr>\n");
+
+  size += sprintf(&buf[size], admin_basic_setting_int,
+                 "Debug level:", "debug_level", 2, cfg->debug_level);
+  size += sprintf(&buf[size], admin_basic_setting_float,
+                 "Pollrate:", "pollrate", 4, cfg->pollrate);
+  size += sprintf(&buf[size], admin_basic_setting_string,
+                 "TOS:", "tos", 6, "TBD");
+
+  size += sprintf(&buf[size], "</tr>\n");
+  size += sprintf(&buf[size], "<tr>\n");
+
+  size += sprintf(&buf[size], admin_basic_setting_int,
+                 "TC redundancy:", "tc_redundancy", 1, cfg->tc_redundancy);
+  size += sprintf(&buf[size], admin_basic_setting_int,
+                 "MPR coverage:", "mpr_coverage", 1, cfg->mpr_coverage);
+  size += sprintf(&buf[size], admin_basic_setting_int,
+                 "Willingness:", "willingness", 1, cfg->willingness);
+
+  size += sprintf(&buf[size], "</tr>\n");
+  size += sprintf(&buf[size], "<tr>\n");
+
+  if(cfg->use_hysteresis)
+    {
+      size += sprintf(&buf[size], admin_basic_setting_float,
+                     "Hyst scaling:", "hyst_scaling", 4, cfg->hysteresis_param.scaling);
+
+      size += sprintf(&buf[size], admin_basic_setting_float,
+                     "Lower thr:", "hyst_lower", 4, cfg->hysteresis_param.thr_low);
+      size += sprintf(&buf[size], admin_basic_setting_float,
+                     "Upper thr:", "hyst_upper", 4, cfg->hysteresis_param.thr_high);
+    }
+  else
+    {
+      size += sprintf(&buf[size], "<td>Hysteresis disabled</td>\n");
+    }
+
+  size += sprintf(&buf[size], "</tr>\n");
+  size += sprintf(&buf[size], "<tr>\n");
+  
+  if(cfg->lq_level)
+    {
+      size += sprintf(&buf[size], admin_basic_setting_int,
+                     "LQ level:", "lq_level", 1, cfg->lq_level);
+      size += sprintf(&buf[size], admin_basic_setting_int,
+                     "LQ winsize:", "lq_wsize", 1, cfg->lq_wsize);
+    }
+  else
+    {
+      size += sprintf(&buf[size], "<td>LQ disabled</td>\n");
+    }
+
+
+  size += sprintf(&buf[size], "</tr>\n");
+  size += sprintf(&buf[size], "<tr>\n");
+
+  size += sprintf(&buf[size], "</tr>\n");
+  
+  i++;
+
+  while(admin_frame[i] && strcmp(admin_frame[i], "<!-- HNAENTRIES -->\n"))
+    {
+      size += sprintf(&buf[size], admin_frame[i]);
+      i++;
+    }
+
+  if(!admin_frame[i] || !admin_frame[i+1])
+    return size;
+
+  i++;
+
+  if((cfg->ip_version == AF_INET) && (cfg->hna4_entries))
+    {
+      struct hna4_entry *hna4;
+      
+      for(hna4 = cfg->hna4_entries; hna4; hna4 = hna4->next)
+       {
+         size += sprintf(&buf[size], admin_frame[i], 
+                         olsr_ip_to_string((union olsr_ip_addr *)&hna4->net),
+                         olsr_ip_to_string((union olsr_ip_addr *)&hna4->netmask));
+       }
+    }
+  else if((cfg->ip_version == AF_INET6) && (cfg->hna6_entries))
+    {
+      struct hna6_entry *hna6;
+       
+      for(hna6 = cfg->hna6_entries; hna6; hna6 = hna6->next)
+       {
+         size += sprintf(&buf[size], admin_frame[i], 
+                         olsr_ip_to_string((union olsr_ip_addr *)&hna6->net),
+                         "TBD"/*hna6->prefix_len*/);
+       }
+    }
+  
+  i++;
+
+  while(admin_frame[i])
+    {
+      size += sprintf(&buf[size], admin_frame[i]);
+      i++;
+    }
+  
+  return size;
+}
+
+
+int
+process_param(char *key, char *value)
+{
+
+  if(!strcmp(key, "debug_level"))
+    {
+      int dl = atoi(value);
+      if((dl < 0) || (dl > 9))
+       return -1;
+
+      cfg->debug_level = dl;
+    }
+
+  return 0;
+#if 0
+  { 1, admin_basic_setting_float, "Pollrate:", "pollrate", 4, &cfg->pollrate },
+  { 1, admin_basic_setting_string, "TOS:", "tos", 6, "TBD" },
+
+  { 1, admin_basic_setting_int, "TC redundancy:", "tc_redundancy", 1, &cfg->tc_redundancy},
+  { 1, admin_basic_setting_int, "MPR coverage:", "mpr_coverage", 1, &cfg->mpr_coverage },
+  { 1, admin_basic_setting_int, "Willingness:", "willingness", 1, &cfg->willingness },
+
+  { cfg->use_hysteresis, admin_basic_setting_float, "Hyst scaling:", "hyst_scaling", 4, &cfg->hysteresis_param.scaling },
+  { cfg->use_hysteresis, admin_basic_setting_float, "Lower thr:", "hyst_lower", 4, &cfg->hysteresis_param.thr_low },
+  { cfg->use_hysteresis, admin_basic_setting_float, "Upper thr:", "hyst_upper", 4, &cfg->hysteresis_param.thr_high },
+
+  { cfg->lq_level, admin_basic_setting_int, "LQ level:", "lq_level", 1, &cfg->lq_level},
+  { cfg->lq_level, admin_basic_setting_int, "LQ winsize:", "lq_wsize", 1, &cfg->lq_wsize},
+
+#endif
+}
+
+int
+process_set_values(char *data, olsr_u32_t data_size, char *buf, olsr_u32_t bufsize)
+{
+  int size = 0;
+  int i, val_start, key_start;
+
+  size += sprintf(buf, "<html>\n<head></head>\n<body>\nDATA:<br>\n%s\n", data);
+
+  key_start = 0;
+  val_start = 0;
+
+  for(i = 0; i < data_size; i++)
+    {
+      if(data[i] == '=')
+       {
+         data[i] = '\0';
+         val_start = i + 1;
+       }
+
+      if(data[i] == '&')
+       {
+         data[i] = '\0';
+         size += sprintf(&buf[size], "<b>Key:</b>%s<br>\n<b>Value:</b>%s<br>\n", 
+                         &data[key_start], &data[val_start]);
+         process_param(&data[key_start], &data[val_start]);
+         printf("Key: %s\nValue: %s\n", 
+                &data[key_start], &data[val_start]);
+         key_start = i + 1;
+       }
+    }  
+
+  size += sprintf(&buf[size], "\n</body>\n</html>\n");
+
+  printf("Dynamic Data: %s\n", data);
+  return size;
+}
+#endif
diff --git a/lib/httpinfo/src/admin_interface.h b/lib/httpinfo/src/admin_interface.h
new file mode 100644 (file)
index 0000000..197b3c8
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * HTTP Info plugin for the olsr.org OLSR daemon
+ * Copyright (c) 2004, Andreas Tønnesen(andreto@olsr.org)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions 
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright 
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright 
+ *   notice, this list of conditions and the following disclaimer in 
+ *   the documentation and/or other materials provided with the 
+ *   distribution.
+ * * Neither the name of olsr.org, olsrd nor the names of its 
+ *   contributors may be used to endorse or promote products derived 
+ *   from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Visit http://www.olsr.org for more information.
+ *
+ * If you find this software useful feel free to make a donation
+ * to the project. For more information see the website or contact
+ * the copyright holders.
+ *
+ * $Id: admin_interface.h,v 1.1 2005/02/08 23:29:40 kattemat Exp $
+ */
+
+/*
+ * Dynamic linked library for the olsr.org olsr daemon
+ */
+
+
+
+#ifndef ADMIN_INTERFACE_H
+#define ADMIN_INTERFACE_H
+
+#ifdef INCLUDE_SETTINGS
+int
+build_admin_body(char *, olsr_u32_t);
+
+int
+process_set_values(char*, olsr_u32_t, char *, olsr_u32_t);
+
+int
+process_param(char *, char *);
+#endif
+
+#endif
index 6447eeb..e2879f8 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: html.h,v 1.3 2005/01/06 21:27:22 kattemat Exp $
+ * $Id: html.h,v 1.4 2005/02/08 23:29:40 kattemat Exp $
  */
 
 /*
@@ -196,43 +196,4 @@ static const char *http_frame[] =
 };
 
 
-#ifdef INCLUDE_SETTINGS
-static const char *admin_frame[] =
-  {
-    "<b>Administrator interface</b><hr>\n"
-    "<h2>Change basic settings</h2>\n",
-    "<form action=\"set_values\" method=\"post\">\n",
-    "<table width=\"100%%\">\n",
-    "<!-- BASICSETTINGS -->\n",
-    "</table>\n<br>\n",
-    "<center><input type=\"submit\" value=\"Submit\" class=\"input_button\">\n",
-    "<input type=\"reset\" value=\"Reset\" class=\"input_button\"></center>\n",
-    "</form>\n",
-    "<h2>Add/remove local HNA entries</h2>\n",
-    "<form action=\"set_values\" method=\"post\">\n",
-    "<table width=\"100%%\"><tr><td><b>Network:</b></td>\n",
-    "<td><input type=\"text\" name=\"foo\" maxlength=\"100\" class=\"input_text\"></td>\n",
-    "<td><b>Netmask/Prefix:</b></td>\n",
-    "<td><input type=\"text\" name=\"foo\" maxlength=\"16\" class=\"input_text\"></td>\n",
-    "<td><input type=\"submit\" value=\"Add entry\" class=\"input_button\"></td>\n",
-    "</table><hr>\n",
-    "<form action=\"set_values\" method=\"post\">\n",
-    "<table width=\"100%%\">\n",
-    "<tr><th width=50 halign=\"middle\">Delete</th><th>Network</th><th>Netmask</th></tr>\n",
-    "<!-- HNAENTRIES -->\n",
-    "<tr><td halign=\"middle\"><input type=\"checkbox\" name=\"foo\" class=\"input_checkbox\"></td><td>%s</td><td>%s</td></tr>\n",
-    "</table>\n<br>\n",
-    "<center><input type=\"submit\" value=\"Delete selected\" class=\"input_button\"></center>\n",
-    "</form>\n",
-
-    NULL
-};
-
-
-static char admin_basic_setting_int[] = "<td><b>%s</b></td>\n<td> <input type=\"text\" name=\"%s\" maxlength=\"%d\" class=\"input_text\" value=\"%d\"></td>\n";
-static char admin_basic_setting_float[] = "<td><b>%s</b></td>\n<td> <input type=\"text\" name=\"%s\" maxlength=\"%d\" class=\"input_text\" value=\"%0.2f\"></td>\n";
-static char admin_basic_setting_string[] = "<td><b>%s</b></td>\n<td> <input type=\"text\" name=\"%s\" maxlength=\"%d\" class=\"input_text\" value=\"%s\"></td>\n";
-
-#endif
-
 #endif
index 11b8f4a..c6ad4bc 100644 (file)
@@ -36,7 +36,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: olsrd_httpinfo.c,v 1.42 2005/01/30 00:23:56 kattemat Exp $
+ * $Id: olsrd_httpinfo.c,v 1.43 2005/02/08 23:29:40 kattemat Exp $
  */
 
 /*
@@ -47,6 +47,7 @@
 #include "olsr_cfg.h"
 #include "gfx.h"
 #include "html.h"
+#include "admin_interface.h"
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -158,13 +159,7 @@ build_all_body(char *, olsr_u32_t);
 int
 build_about_body(char *, olsr_u32_t);
 
-#ifdef INCLUDE_SETTINGS
-int
-build_admin_body(char *, olsr_u32_t);
-#endif
 
-int
-process_set_values(char*, olsr_u32_t, char *, olsr_u32_t);
 
 char *
 sockaddr_to_string(struct sockaddr *);
@@ -213,7 +208,9 @@ struct static_txt_file_entry static_txt_files[] =
 
 struct dynamic_file_entry dynamic_files[] =
   {
+#ifdef INCLUDE_SETTINGS
     {"set_values", process_set_values},
+#endif
     {NULL, NULL}
   };
 
@@ -662,18 +659,6 @@ plugin_io(int cmd, void *data, size_t size)
 }
 
 
-int
-process_set_values(char *data, olsr_u32_t data_size, char *buf, olsr_u32_t bufsize)
-{
-  int size = 0;
-
-  size += sprintf(buf, "<html>\n<head></head>\n<body>\nDATA:<br>\n%s\n</body>\n</html>\n", data);
-
-  printf("Dynamic Data: %s\n", data);
-  return size;
-}
-
-
 static int
 build_frame(char *title, 
            char *link, 
@@ -1174,128 +1159,6 @@ build_about_body(char *buf, olsr_u32_t bufsize)
 }
 
 
-#ifdef INCLUDE_SETTINGS
-int
-build_admin_body(char *buf, olsr_u32_t bufsize)
-{
-  int size = 0, i = 0;
-
-  while(admin_frame[i] && strcmp(admin_frame[i], "<!-- BASICSETTINGS -->\n"))
-    {
-      size += sprintf(&buf[size], admin_frame[i]);
-      i++;
-    }
-  
-  if(!admin_frame[i])
-    return size;
-  
-  size += sprintf(&buf[size], "<tr>\n");
-
-  size += sprintf(&buf[size], admin_basic_setting_int,
-                 "Debug level:", "debug_level", 2, cfg->debug_level);
-  size += sprintf(&buf[size], admin_basic_setting_float,
-                 "Pollrate:", "pollrate", 4, cfg->pollrate);
-  size += sprintf(&buf[size], admin_basic_setting_string,
-                 "TOS:", "tos", 6, "TBD");
-
-  size += sprintf(&buf[size], "</tr>\n");
-  size += sprintf(&buf[size], "<tr>\n");
-
-  size += sprintf(&buf[size], admin_basic_setting_int,
-                 "TC redundancy:", "tc_redundancy", 1, cfg->tc_redundancy);
-  size += sprintf(&buf[size], admin_basic_setting_int,
-                 "MPR coverage:", "mpr_coverage", 1, cfg->mpr_coverage);
-  size += sprintf(&buf[size], admin_basic_setting_int,
-                 "Willingness:", "willingness", 1, cfg->willingness);
-
-  size += sprintf(&buf[size], "</tr>\n");
-  size += sprintf(&buf[size], "<tr>\n");
-
-  if(cfg->use_hysteresis)
-    {
-      size += sprintf(&buf[size], admin_basic_setting_float,
-                     "Hyst scaling:", "hyst_scaling", 4, cfg->hysteresis_param.scaling);
-
-      size += sprintf(&buf[size], admin_basic_setting_float,
-                     "Lower thr:", "hyst_lower", 4, cfg->hysteresis_param.thr_low);
-      size += sprintf(&buf[size], admin_basic_setting_float,
-                     "Upper thr:", "hyst_upper", 4, cfg->hysteresis_param.thr_high);
-    }
-  else
-    {
-      size += sprintf(&buf[size], "<td>Hysteresis disabled</td>\n");
-    }
-
-  size += sprintf(&buf[size], "</tr>\n");
-  size += sprintf(&buf[size], "<tr>\n");
-  
-  if(cfg->lq_level)
-    {
-      size += sprintf(&buf[size], admin_basic_setting_int,
-                     "LQ level:", "lq_level", 1, cfg->lq_level);
-      size += sprintf(&buf[size], admin_basic_setting_int,
-                     "LQ winsize:", "lq_wsize", 1, cfg->lq_wsize);
-    }
-  else
-    {
-      size += sprintf(&buf[size], "<td>LQ disabled</td>\n");
-    }
-
-
-  size += sprintf(&buf[size], "</tr>\n");
-  size += sprintf(&buf[size], "<tr>\n");
-
-  size += sprintf(&buf[size], "</tr>\n");
-  
-  i++;
-
-  while(admin_frame[i] && strcmp(admin_frame[i], "<!-- HNAENTRIES -->\n"))
-    {
-      size += sprintf(&buf[size], admin_frame[i]);
-      i++;
-    }
-
-  if(!admin_frame[i] || !admin_frame[i+1])
-    return size;
-
-  i++;
-
-  if((cfg->ip_version == AF_INET) && (cfg->hna4_entries))
-    {
-      struct hna4_entry *hna4;
-      
-      for(hna4 = cfg->hna4_entries; hna4; hna4 = hna4->next)
-       {
-         size += sprintf(&buf[size], admin_frame[i], 
-                         olsr_ip_to_string((union olsr_ip_addr *)&hna4->net),
-                         olsr_ip_to_string((union olsr_ip_addr *)&hna4->netmask));
-       }
-    }
-  else if((cfg->ip_version == AF_INET6) && (cfg->hna6_entries))
-    {
-      struct hna6_entry *hna6;
-       
-      for(hna6 = cfg->hna6_entries; hna6; hna6 = hna6->next)
-       {
-         size += sprintf(&buf[size], admin_frame[i], 
-                         olsr_ip_to_string((union olsr_ip_addr *)&hna6->net),
-                         "TBD"/*hna6->prefix_len*/);
-       }
-    }
-  
-  i++;
-
-  while(admin_frame[i])
-    {
-      size += sprintf(&buf[size], admin_frame[i]);
-      i++;
-    }
-  
-  return size;
-}
-#endif
-
-
 olsr_bool
 check_allowed_ip(union olsr_ip_addr *addr)
 {