[Olsr-cvs] olsrd-current/lib/httpinfo/src gfx.h, 1.3, 1.4 olsrd_httpinfo.c, 1.85, 1.86 html.h, 1.11, NONE

Bernd Petrovitsch (spam-protected)
Thu Nov 15 01:35:34 CET 2007


Update of /cvsroot/olsrd/olsrd-current/lib/httpinfo/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24798/lib/httpinfo/src

Modified Files:
	gfx.h olsrd_httpinfo.c 
Removed Files:
	html.h 
Log Message:
cleanup: merged html.h into the places where it is used since it is much
         easier to see what's going on
cleanup: avoid hard-coded values and use sizeof()
fixed the generated html


Index: olsrd_httpinfo.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/olsrd_httpinfo.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -d -r1.85 -r1.86
*** olsrd_httpinfo.c	11 Nov 2007 22:00:39 -0000	1.85
--- olsrd_httpinfo.c	15 Nov 2007 00:35:32 -0000	1.86
***************
*** 66,70 ****
  #include "olsrd_httpinfo.h"
  #include "admin_interface.h"
- #include "html.h"
  #include "gfx.h"
  
--- 66,69 ----
***************
*** 98,102 ****
  #define HTML_BUFSIZE (1024 * 4000)
  
! #define FRAMEWIDTH 800
  
  #define FILENREQ_MATCH(req, filename) \
--- 97,101 ----
  #define HTML_BUFSIZE (1024 * 4000)
  
! #define FRAMEWIDTH (resolve_ip_addresses ? 900 : 800)
  
  #define FILENREQ_MATCH(req, filename) \
***************
*** 104,107 ****
--- 103,139 ----
          (strlen(req) && !strcmp(&req[1], filename))
  
+ static const char httpinfo_css[] =
+   "#A {text-decoration: none}\n"
+   "TH{text-align: left}\n"
+   "H1, H3, TD, TH {font-family: Helvetica; font-size: 80%}\n"
+   "h2\n {\nfont-family: Helvetica;\n font-size: 14px;text-align: center;\n"
+   "line-height: 16px;\ntext-decoration: none;\nborder: 1px solid #ccc;\n"
+   "margin: 5px;\nbackground: #ececec;\n}\n"
+   "hr\n{\nborder: none;\npadding: 1px;\nbackground: url(grayline.gif) repeat-x bottom;\n}\n"
+   "#maintable\n{\nmargin: 0px;\npadding: 5px;\nborder-left: 1px solid #ccc;\n"
+   "border-right: 1px solid #ccc;\nborder-bottom: 1px solid #ccc;\n}\n"
+   "#footer\n{\nfont-size: 10px;\nline-height: 14px;\ntext-decoration: none;\ncolor: #666;\n}\n"
+   "#hdr\n{\nfont-size: 14px;\ntext-align: center;\nline-height: 16px;\n"
+   "text-decoration: none;\nborder: 1px solid #ccc;\n"
+   "margin: 5px;\nbackground: #ececec;\n}\n"
+   "#container\n{\nwidth: 1000px;\npadding: 30px;\nborder: 1px solid #ccc;\nbackground: #fff;\n}\n"
+   "#tabnav\n{\nheight: 20px;\nmargin: 0;\npadding-left: 10px;\n"
+   "background: url(grayline.gif) repeat-x bottom;\n}\n"
+   "#tabnav li\n{\nmargin: 0;\npadding: 0;\ndisplay: inline;\nlist-style-type: none;\n}\n"
+   "#tabnav a:link, #tabnav a:visited\n{\nfloat: left;\nbackground: #ececec;\n"
+   "font-size: 12px;\nline-height: 14px;\nfont-weight: bold;\npadding: 2px 10px 2px 10px;\n"
+   "margin-right: 4px;\nborder: 1px solid #ccc;\ntext-decoration: none;\ncolor: #777;\n}\n"
+   "#tabnav a:link.active, #tabnav a:visited.active\n{\nborder-bottom: 1px solid #fff;\n"
+   "background: #ffffff;\ncolor: #000;\n}\n"
+   "#tabnav a:hover\n{\nbackground: #777777;\ncolor: #ffffff;\n}\n"
+   ".input_text\n{\nbackground: #E5E5E5;\nmargin-left: 5px; margin-top: 0px;\n"
+   "text-align: left;\n\nwidth: 100px;\npadding: 0px;\ncolor: #000000;\n"
+   "text-decoration: none;\nfont-family: verdana;\nfont-size: 12px;\n"
+   "border: 1px solid #ccc;\n}\n" 
+   ".input_button\n{\nbackground: #B5D1EE;\nmargin-left: 5px;\nmargin-top: 0px;\n"
+   "text-align: center;\nwidth: 120px;\npadding: 0px;\ncolor: #000000;\n"
+   "text-decoration: none;\nfont-family: verdana;\nfont-size: 12px;\n"
+   "border: 1px solid #000;\n}\n";
+ 
  struct tab_entry
  {
***************
*** 122,126 ****
  {
    char *filename;
!   const char **data;
  };
  
--- 154,158 ----
  {
    char *filename;
!   const char *data;
  };
  
***************
*** 199,205 ****
--- 231,243 ----
  
  static const struct static_bin_file_entry static_bin_files[] = {
+ #if 0
      {"favicon.ico", favicon_ico, 1406/*favicon_ico_len*/},
      {"logo.gif", logo_gif, 2801/*logo_gif_len*/},
      {"grayline.gif", grayline_gif, 43/*grayline_gif_len*/},
+ #else
+     {"favicon.ico", favicon_ico, sizeof(favicon_ico)},
+     {"logo.gif", logo_gif, sizeof(logo_gif)},
+     {"grayline.gif", grayline_gif, sizeof(grayline_gif)},
+ #endif
      {NULL, NULL, 0}
  };
***************
*** 385,395 ****
    } else if (!strcmp(req_type, "GET")) {
      int i = 0;
-     int y = 0;
  
!     while (static_bin_files[i].filename)	{
          if (FILENREQ_MATCH(filename, static_bin_files[i].filename)) {
  	    break;
          }
-         i++;
      }
        
--- 423,431 ----
    } else if (!strcmp(req_type, "GET")) {
      int i = 0;
  
!     for (i = 0; static_bin_files[i].filename; i++) {
          if (FILENREQ_MATCH(filename, static_bin_files[i].filename)) {
  	    break;
          }
      }
        
***************
*** 412,420 ****
      if (static_txt_files[i].filename) {
        stats.ok_hits++;
!       y = 0;
!       while (static_txt_files[i].data[y]) {
!         size += snprintf(&body[size], sizeof(body)-size, static_txt_files[i].data[y]);
!         y++;
!       }
        c = build_http_header(HTTP_OK, OLSR_FALSE, size, req, sizeof(req));  
        goto send_http_data;
--- 448,452 ----
      if (static_txt_files[i].filename) {
        stats.ok_hits++;
!       size += snprintf(&body[size], sizeof(body)-size, "%s", static_txt_files[i].data);
        c = build_http_header(HTTP_OK, OLSR_FALSE, size, req, sizeof(req));  
        goto send_http_data;
***************
*** 442,446 ****
        netsprintf_direct = 1;
  #endif
!       size += snprintf(&body[size], sizeof(body)-size, "%s", http_ok_head);
  	  
        size += build_tabs(&body[size], sizeof(body)-size, i);
--- 474,497 ----
        netsprintf_direct = 1;
  #endif
!       size += snprintf(&body[size], sizeof(body)-size,
!                        "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
!                        "<head>\n"
!                        "<meta http-equiv=\"Content-type\" content=\"text/html; charset=ISO-8859-1\">\n"
!                        "<title>olsr.org httpinfo plugin</title>\n"
!                        "<link rel=\"icon\" href=\"favicon.ico\" type=\"image/x-icon\">\n"
!                        "<link rel=\"shortcut icon\" href=\"favicon.ico\" type=\"image/x-icon\">\n"
!                        "<link rel=\"stylesheet\" type=\"text/css\" href=\"httpinfo.css\">\n"
!                        "</head>\n"
!                        "<body bgcolor=\"#ffffff\" text=\"#000000\">\n"
!                        "<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"%d\">\n"
!                        "<tbody><tr bgcolor=\"#ffffff\">\n"
!                        "<td align=\"left\" height=\"69\" valign=\"middle\" width=\"80%%\">\n"
!                        "<font color=\"black\" face=\"timesroman\" size=\"6\">   olsr.org OLSR daemon</font></td>\n"
!                        "<td align=\"right\" height=\"69\" valign=\"middle\" width=\"20%%\">\n"
!                        "<img src=\"/logo.gif\" alt=\"olsrd logo\"></td>\n"
!                        "</tr>\n"
!                        "</tbody>\n"
!                        "</table>\n",
!                        FRAMEWIDTH);
  	  
        size += build_tabs(&body[size], sizeof(body)-size, i);
***************
*** 454,458 ****
        stats.ok_hits++;
  
!       size += snprintf(&body[size], sizeof(body)-size, http_ok_tail);
  	  
  #ifdef NETDIRECT
--- 505,518 ----
        stats.ok_hits++;
  
!       size += snprintf(&body[size], sizeof(body)-size,
!                        "</table>\n"
!                        "<div id=\"footer\">\n"
!                        "<center>\n"
!                        "(C)2005 Andreas Tønnesen<br/>\n"
!                        "<a href=\"http://www.olsr.org/\">http://www.olsr.org</a>\n"
!                        "</center>\n"
!                        "</div>\n"
!                        "</body>\n"
!                        "</html>\n");
  	  
  #ifdef NETDIRECT
***************
*** 562,566 ****
    int size = 0, tabs = 0;
  
!   size += snprintf(&buf[size], bufsize-size, html_tabs_prolog);
    for (tabs = 0; tab_entries[tabs].tab_label; tabs++) {
      if (!tab_entries[tabs].display_tab) {
--- 622,630 ----
    int size = 0, tabs = 0;
  
!   size += snprintf(&buf[size], bufsize-size,
!                    "<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"%d\">\n"
!                    "<tr bgcolor=\"#ffffff\"><td>\n"
!                    "<ul id=\"tabnav\">\n",
!                    FRAMEWIDTH);
    for (tabs = 0; tab_entries[tabs].tab_label; tabs++) {
      if (!tab_entries[tabs].display_tab) {
***************
*** 573,577 ****
                       tab_entries[tabs].tab_label);
    }
!   size += snprintf(&buf[size], bufsize-size, html_tabs_epilog);
    return size;
  }
--- 637,644 ----
                       tab_entries[tabs].tab_label);
    }
!   size += snprintf(&buf[size], bufsize-size,
!                    "</ul>\n"
!                    "</td></tr>\n"
!                    "<tr><td>\n");
    return size;
  }
***************
*** 701,705 ****
                     rt->rt_best->rtp_metric.hops);
    size += snprintf(&buf[size], bufsize-size,
!                    "<td align=\"center\">%.3f</td>",
                     rt->rt_best->rtp_metric.etx);
    size += snprintf(&buf[size], bufsize-size,
--- 768,772 ----
                     rt->rt_best->rtp_metric.hops);
    size += snprintf(&buf[size], bufsize-size,
!                    "<td align=\"right\">%.3f</td>",
                     rt->rt_best->rtp_metric.etx);
    size += snprintf(&buf[size], bufsize-size,
***************
*** 713,722 ****
    int size = 0;
    struct rt_entry *rt;
!   const char *s = resolve_ip_addresses ? " colspan=\"2\"" : "";
    size += section_title(&buf[size], bufsize-size, "OLSR Routes in Kernel");
!   size += snprintf(&buf[size], bufsize-size,
!                    "<tr><th%s>Destination</th><th%s>Gateway</th><th>Metric</th><th>ETX</th><th>Interface</th></tr>\n",
!                    s,
!                    s);
  
    /* Walk the route table */
--- 780,786 ----
    int size = 0;
    struct rt_entry *rt;
!   const char *colspan = resolve_ip_addresses ? " colspan=\"2\"" : "";
    size += section_title(&buf[size], bufsize-size, "OLSR Routes in Kernel");
!   size += snprintf(&buf[size], bufsize-size, "<tr><th align=\"center\"%s>Destination</th><th align=\"center\"%s>Gateway</th><th>Metric</th><th align=\"right\">ETX</th><th>Interface</th></tr>\n", colspan, colspan);
  
    /* Walk the route table */
***************
*** 796,800 ****
      size += snprintf(&buf[size], bufsize-size, "<td>TOS: 0x%04x</td>\n", olsr_cnf->tos);
  
!     size += snprintf(&buf[size], bufsize-size, "<td>RtTable: 0x%04x</td>\n", olsr_cnf->rttable);
  
      size += snprintf(&buf[size], bufsize-size, "<td>Willingness: %d %s</td>\n", olsr_cnf->willingness, olsr_cnf->willingness_auto ? "(auto)" : "");
--- 860,864 ----
      size += snprintf(&buf[size], bufsize-size, "<td>TOS: 0x%04x</td>\n", olsr_cnf->tos);
  
!     size += snprintf(&buf[size], bufsize-size, "<td>RtTable: 0x%04x/%d</td>\n", olsr_cnf->rttable, olsr_cnf->rttable);
  
      size += snprintf(&buf[size], bufsize-size, "<td>Willingness: %d %s</td>\n", olsr_cnf->willingness, olsr_cnf->willingness_auto ? "(auto)" : "");
***************
*** 802,814 ****
      size += snprintf(&buf[size], bufsize-size, "</tr>\n<tr>\n");
  
!     if (olsr_cnf->lq_level == 0)
!       {
!         size += snprintf(&buf[size], bufsize-size, "<td>Hysteresis: %s</td>\n", olsr_cnf->use_hysteresis ? "Enabled" : "Disabled");
! 	if (olsr_cnf->use_hysteresis)
!           {
!             size += snprintf(&buf[size], bufsize-size, "<td>Hyst scaling: %0.2f</td>\n", olsr_cnf->hysteresis_param.scaling);
!             size += snprintf(&buf[size], bufsize-size, "<td>Hyst lower/upper: %0.2f/%0.2f</td>\n", olsr_cnf->hysteresis_param.thr_low, olsr_cnf->hysteresis_param.thr_high);
!           }
        }
  
      size += snprintf(&buf[size], bufsize-size, "</tr>\n<tr>\n");
--- 866,878 ----
      size += snprintf(&buf[size], bufsize-size, "</tr>\n<tr>\n");
  
!     if (olsr_cnf->lq_level == 0) {
!       size += snprintf(&buf[size], bufsize-size, "<td>Hysteresis: %s</td>\n", olsr_cnf->use_hysteresis ? "Enabled" : "Disabled");
!       if (olsr_cnf->use_hysteresis) {
!         size += snprintf(&buf[size], bufsize-size, "<td>Hyst scaling: %0.2f</td>\n", olsr_cnf->hysteresis_param.scaling);
!         size += snprintf(&buf[size], bufsize-size, "<td>Hyst lower/upper: %0.2f/%0.2f</td>\n", olsr_cnf->hysteresis_param.thr_low, olsr_cnf->hysteresis_param.thr_high);
        }
+     } else {
+       size += snprintf(&buf[size], bufsize-size, "<td></td>\n");
+     }
  
      size += snprintf(&buf[size], bufsize-size, "</tr>\n<tr>\n");
***************
*** 914,917 ****
--- 978,983 ----
          }
        }
+     } else {
+       size += snprintf(&buf[size], bufsize-size, "<tr><td></td></tr>\n");
      }
      size += snprintf(&buf[size], bufsize-size, "</table>\n");
***************
*** 926,937 ****
    struct link_entry *link = NULL;
    int size = 0, idx;
  
    size += section_title(&buf[size], bufsize-size, "Links");
  
    size += snprintf(&buf[size], bufsize-size,
!                    "<tr><th>Local IP</th><th>Remote IP</th><th>Hysteresis</th>\n");
    if (olsr_cnf->lq_level > 0) {
      size += snprintf(&buf[size], bufsize-size,
!                      "<th align=\"right\">LinkQuality</th><th>lost</th><th>total</th><th align=\"right\">NLQ</th><th align=\"right\">ETX</th>\n");
    }
    size += snprintf(&buf[size], bufsize-size, "</tr>\n");
--- 992,1004 ----
    struct link_entry *link = NULL;
    int size = 0, idx;
+   const char *colspan = resolve_ip_addresses ? " colspan=\"2\"" : "";
  
    size += section_title(&buf[size], bufsize-size, "Links");
  
    size += snprintf(&buf[size], bufsize-size,
!                    "<tr><th align=\"center\"%s>Local IP</th><th align=\"center\"%s>Remote IP</th><th align=\"right\">Hysteresis</th>", colspan, colspan);
    if (olsr_cnf->lq_level > 0) {
      size += snprintf(&buf[size], bufsize-size,
!                      "<th align=\"right\">LinkQuality</th><th>lost</th><th>total</th><th align=\"right\">NLQ</th><th align=\"right\">ETX</th>");
    }
    size += snprintf(&buf[size], bufsize-size, "</tr>\n");
***************
*** 949,953 ****
                         "<td>%d</td>"
                         "<td align=\"right\">%0.2f</td>"
!                        "<td align=\"right\">%0.2f</td></tr>\n",
                         link->loss_link_quality,
                         link->lost_packets, 
--- 1016,1020 ----
                         "<td>%d</td>"
                         "<td align=\"right\">%0.2f</td>"
!                        "<td align=\"right\">%0.2f</td>\n",
                         link->loss_link_quality,
                         link->lost_packets, 
***************
*** 963,967 ****
    size += section_title(&buf[size], bufsize-size, "Neighbors");
    size += snprintf(&buf[size], bufsize-size, 
!                    "<tr><th>IP address</th><th align=\"center\">SYM</th><th align=\"center\">MPR</th><th align=\"center\">MPRS</th><th align=\"center\">Willingness</th><th>2 Hop Neighbors</th></tr>\n");
    /* Neighbors */
    for (idx = 0; idx < HASHSIZE; idx++) {
--- 1030,1034 ----
    size += section_title(&buf[size], bufsize-size, "Neighbors");
    size += snprintf(&buf[size], bufsize-size, 
!                    "<tr><th align=\"center\"%s>IP Address</th><th align=\"center\">SYM</th><th align=\"center\">MPR</th><th align=\"center\">MPRS</th><th align=\"center\">Willingness</th><th>2 Hop Neighbors</th></tr>\n", colspan);
    /* Neighbors */
    for (idx = 0; idx < HASHSIZE; idx++) {
***************
*** 984,992 ****
                         "<option>IP ADDRESS</option>\n");
  
!       thop_cnt = 0;
!       for (list_2 = neigh->neighbor_2_list.next; list_2 != &neigh->neighbor_2_list; list_2 = list_2->next) {
          struct ipaddr_str strbuf;
          size += snprintf(&buf[size], bufsize-size, "<option>%s</option>\n", olsr_ip_to_string(&strbuf, &list_2->neighbor_2->neighbor_2_addr));
-         thop_cnt++;
        }
        size += snprintf(&buf[size], bufsize-size, "</select> (%d)</td></tr>\n", thop_cnt);
--- 1051,1058 ----
                         "<option>IP ADDRESS</option>\n");
  
!       
!       for (list_2 = neigh->neighbor_2_list.next, thop_cnt = 0; list_2 != &neigh->neighbor_2_list; list_2 = list_2->next, thop_cnt++) {
          struct ipaddr_str strbuf;
          size += snprintf(&buf[size], bufsize-size, "<option>%s</option>\n", olsr_ip_to_string(&strbuf, &list_2->neighbor_2->neighbor_2_addr));
        }
        size += snprintf(&buf[size], bufsize-size, "</select> (%d)</td></tr>\n", thop_cnt);
***************
*** 1001,1007 ****
    int size = 0;
    struct tc_entry *tc;
  
    size += section_title(&buf[size], bufsize-size, "Topology Entries");
!   size += snprintf(&buf[size], bufsize-size, "<tr><th>Destination IP</th><th>Last Hop IP</th>");
    if (olsr_cnf->lq_level > 0) {
      size += snprintf(&buf[size], bufsize-size, "<th align=\"right\">LQ</th><th align=\"right\">ILQ</th><th align=\"right\">ETX</th>");
--- 1067,1074 ----
    int size = 0;
    struct tc_entry *tc;
+   const char *colspan = resolve_ip_addresses ? " colspan=\"2\"" : "";
  
    size += section_title(&buf[size], bufsize-size, "Topology Entries");
!   size += snprintf(&buf[size], bufsize-size, "<tr><th align=\"center\"%s>Destination IP</th><th align=\"center\"%s>Last Hop IP</th>", colspan, colspan);
    if (olsr_cnf->lq_level > 0) {
      size += snprintf(&buf[size], bufsize-size, "<th align=\"right\">LQ</th><th align=\"right\">ILQ</th><th align=\"right\">ETX</th>");
***************
*** 1012,1016 ****
        struct tc_edge_entry *tc_edge;
        OLSR_FOR_ALL_TC_EDGE_ENTRIES(tc, tc_edge) {
- 
            size += snprintf(&buf[size], bufsize-size, "<tr>");
            size += build_ipaddr_with_link(&buf[size], bufsize, &tc_edge->T_dest_addr, -1);
--- 1079,1082 ----
***************
*** 1039,1046 ****
    int size = 0;
    int idx;
  
    size += section_title(&buf[size], bufsize-size, "MID Entries");
    size += snprintf(&buf[size], bufsize-size,
!                    "<tr><th>Main Address</th><th>Aliases</th></tr>\n");
    
    /* MID */  
--- 1105,1113 ----
    int size = 0;
    int idx;
+   const char *colspan = resolve_ip_addresses ? " colspan=\"2\"" : "";
  
    size += section_title(&buf[size], bufsize-size, "MID Entries");
    size += snprintf(&buf[size], bufsize-size,
!                    "<tr><th align=\"center\"%s>Main Address</th><th>Aliases</th></tr>\n", colspan);
    
    /* MID */  
***************
*** 1054,1062 ****
        size += snprintf(&buf[size], bufsize-size, "<td><select>\n<option>IP ADDRESS</option>\n");
        
!       mid_cnt = 0;
!       for (alias = entry->aliases; alias != NULL; alias = alias->next_alias) {
          struct ipaddr_str strbuf;
          size += snprintf(&buf[size], bufsize-size, "<option>%s</option>\n", olsr_ip_to_string(&strbuf, &alias->alias));
-         mid_cnt++;
        }
        size += snprintf(&buf[size], bufsize-size, "</select> (%d)</td></tr>\n", mid_cnt);
--- 1121,1127 ----
        size += snprintf(&buf[size], bufsize-size, "<td><select>\n<option>IP ADDRESS</option>\n");
        
!       for (mid_cnt = 0, alias = entry->aliases; alias != NULL; alias = alias->next_alias, mid_cnt++) {
          struct ipaddr_str strbuf;
          size += snprintf(&buf[size], bufsize-size, "<option>%s</option>\n", olsr_ip_to_string(&strbuf, &alias->alias));
        }
        size += snprintf(&buf[size], bufsize-size, "</select> (%d)</td></tr>\n", mid_cnt);
***************
*** 1096,1110 ****
  static int build_about_body(char *buf, olsr_u32_t bufsize)
  {
!   return snprintf(buf, bufsize, about_frame, build_date, build_host);
  }
  
  static int build_cfgfile_body(char *buf, olsr_u32_t bufsize)
  {
!   int size = 0, i = 0;
  
!   while (cfgfile_body[i] && strcmp(cfgfile_body[i], "<!-- CFGFILE -->")) {
!       size += snprintf(&buf[size], bufsize-size, cfgfile_body[i]);
!       i++;
!   }
  
  #ifdef NETDIRECT
--- 1161,1217 ----
  static int build_about_body(char *buf, olsr_u32_t bufsize)
  {
!   return snprintf(buf, bufsize,
!                   "<strong>" PLUGIN_NAME " version " PLUGIN_VERSION "</strong><br/>\n"
!                   "by Andreas Tønnesen (C)2005.<br/>\n"
!                   "Compiled "
! #ifdef ADMIN_INTERFACE
!                            "<em>with experimental admin interface</em> "
! #endif
!                                                                       "%s at %s<hr/>\n"
!                   "This plugin implements a HTTP server that supplies\n"
!                   "the client with various dynamic web pages representing\n"
!                   "the current olsrd status.<br/>The different pages include:\n"
!                   "<ul>\n<li><strong>Configuration</strong> - This page displays information\n"
!                   "about the current olsrd configuration. This includes various\n"
!                   "olsr settings such as IP version, MID/TC redundancy, hysteresis\n"
!                   "etc. Information about the current status of the interfaces on\n"
!                   "which olsrd is configured to run is also displayed. Loaded olsrd\n"
!                   "plugins are shown with their plugin parameters. Finally all local\n"
!                   "HNA entries are shown. These are the networks that the local host\n"
!                   "will anounce itself as a gateway to.</li>\n"
!                   "<li><strong>Routes</strong> - This page displays all routes currently set in\n"
!                   "the kernel <em>by olsrd</em>. The type of route is also displayed(host\n"
!                   "or HNA).</li>\n"
!                   "<li><strong>Links/Topology</strong> - This page displays all information about\n"
!                   "links, neighbors, topology, MID and HNA entries.</li>\n"
!                   "<li><strong>All</strong> - Here all the previous pages are displayed as one.\n"
!                   "This is to make all information available as easy as possible(for example\n"
!                   "for a script) and using as few resources as possible.</li>\n"
! #ifdef ADMIN_INTERFACE
!                   "<li><strong>Admin</strong> - This page is highly experimental(and unsecure)!\n"
!                   "As of now it is not working at all but it provides a impression of\n"
!                   "the future possibilities of httpinfo. This is to be a interface to\n"
!                   "changing olsrd settings in realtime. These settings include various\n"
!                   "\"basic\" settings and local HNA settings.</li>\n"
! #endif
!                   "<li><strong>About</strong> - this help page.</li>\n</ul>"
!                   "<hr/>\n"
!                   "Send questions or comments to\n"
!                   "<a href=\"mailto:(spam-protected)\">(spam-protected)</a> or\n"
!                   "<a href=\"mailto:andreto-at-olsr.org\">andreto-at-olsr.org</a><br/>\n"
!                   "Official olsrd homepage: <a href=\"http://www.olsr.org/\">http://www.olsr.org</a><br/>\n",
!                   build_date, build_host);
  }
  
  static int build_cfgfile_body(char *buf, olsr_u32_t bufsize)
  {
!   int size = 0;
  
!   size += snprintf(&buf[size], bufsize-size,
!                    "\n\n"
!                    "<strong>This is a automatically generated configuration\n"
!                    "file based on the current olsrd configuration of this node.<br/>\n"
!                    "<hr/>\n"
!                    "<pre>\n");
  
  #ifdef NETDIRECT
***************
*** 1125,1133 ****
    }
  
!   i++;
!   while (cfgfile_body[i]) {
!       size += snprintf(&buf[size], bufsize-size, cfgfile_body[i]);
!       i++;
!   }
  #if 0
    printf("RETURNING %d\n", size);
--- 1232,1237 ----
    }
  
!   size += snprintf(&buf[size], bufsize-size, "</pre>\n<hr/>\n");
! 
  #if 0
    printf("RETURNING %d\n", size);

Index: gfx.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/gfx.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** gfx.h	2 Jan 2005 13:54:40 -0000	1.3
--- gfx.h	15 Nov 2007 00:35:32 -0000	1.4
***************
*** 173,181 ****
  
  
- const unsigned int favicon_ico_len = 1406;
- 
- 
- 
- 
  static unsigned char logo_gif[] = {
    0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x50, 0x00, 0x50, 0x00, 0xf7, 0x00,
--- 173,176 ----
***************
*** 415,421 ****
  };
  
- const unsigned int logo_gif_len = 2801;
- 
- 
  static unsigned char grayline_gif[] = {
    0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, 0x80, 0x00,
--- 410,413 ----
***************
*** 425,430 ****
  };
  
- const unsigned int grayline_gif_len = 43;
- 
- 
  #endif
--- 417,419 ----

--- html.h DELETED ---





More information about the Olsr-cvs mailing list