[Olsr-cvs] olsrd-current/lib/httpinfo/src html.h, 1.9, 1.10 olsrd_httpinfo.c, 1.79, 1.80
Bernd Petrovitsch
(spam-protected)
Mon Oct 15 00:46:05 CEST 2007
Update of /cvsroot/olsrd/olsrd-current/lib/httpinfo/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7105/lib/httpinfo/src
Modified Files:
html.h olsrd_httpinfo.c
Log Message:
cleanups:
- killed sprintf()
- simplified stuff in html.h
- fixed generated HTML to test the TotalValidator extension from Firefox
(and there is more to do)
Index: olsrd_httpinfo.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/olsrd_httpinfo.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -C2 -d -r1.79 -r1.80
*** olsrd_httpinfo.c 13 Oct 2007 12:09:37 -0000 1.79
--- olsrd_httpinfo.c 14 Oct 2007 22:46:03 -0000 1.80
***************
*** 100,105 ****
#define FRAMEWIDTH 800
- #define ACTIVE_TAB "class=\"active\""
-
#define FILENREQ_MATCH(req, filename) \
!strcmp(req, filename) || \
--- 100,103 ----
***************
*** 141,145 ****
static int build_http_header(http_header_type, olsr_bool, olsr_u32_t, char *, olsr_u32_t);
! static int build_frame(char *, char *, int, char *, olsr_u32_t, int(*frame_body_cb)(char *, olsr_u32_t));
static int build_routes_body(char *, olsr_u32_t);
--- 139,143 ----
static int build_http_header(http_header_type, olsr_bool, olsr_u32_t, char *, olsr_u32_t);
! static int build_frame(char *, olsr_u32_t, char *, char *, int, int(*frame_body_cb)(char *, olsr_u32_t));
static int build_routes_body(char *, olsr_u32_t);
***************
*** 169,172 ****
--- 167,171 ----
const union olsr_ip_addr * const ipaddr,
const int prefix_len);
+ static int section_title(char *buf, olsr_u32_t bufsize, const char *title);
static ssize_t writen(int fd, const void *buf, size_t count);
***************
*** 186,216 ****
#endif
! static const struct tab_entry tab_entries[] =
! {
! {"Configuration", "config", build_config_body, OLSR_TRUE},
! {"Routes", "routes", build_routes_body, OLSR_TRUE},
! {"Links/Topology", "nodes", build_nodes_body, OLSR_TRUE},
! {"All", "all", build_all_body, OLSR_TRUE},
#ifdef ADMIN_INTERFACE
! {"Admin", "admin", build_admin_body, OLSR_TRUE},
#endif
! {"About", "about", build_about_body, OLSR_TRUE},
! {"FOO", "cfgfile", build_cfgfile_body, OLSR_FALSE},
! {NULL, NULL, NULL, OLSR_FALSE}
! };
! static const struct static_bin_file_entry static_bin_files[] =
! {
{"favicon.ico", favicon_ico, 1406/*favicon_ico_len*/},
{"logo.gif", logo_gif, 2801/*logo_gif_len*/},
{"grayline.gif", grayline_gif, 43/*grayline_gif_len*/},
{NULL, NULL, 0}
! };
! static const struct static_txt_file_entry static_txt_files[] =
! {
{"httpinfo.css", httpinfo_css},
{NULL, NULL}
! };
--- 185,212 ----
#endif
! static const struct tab_entry tab_entries[] = {
! {"Configuration", "config", build_config_body, OLSR_TRUE},
! {"Routes", "routes", build_routes_body, OLSR_TRUE},
! {"Links/Topology", "nodes", build_nodes_body, OLSR_TRUE},
! {"All", "all", build_all_body, OLSR_TRUE},
#ifdef ADMIN_INTERFACE
! {"Admin", "admin", build_admin_body, OLSR_TRUE},
#endif
! {"About", "about", build_about_body, OLSR_TRUE},
! {"FOO", "cfgfile", build_cfgfile_body, OLSR_FALSE},
! {NULL, NULL, NULL, OLSR_FALSE}
! };
! static const struct static_bin_file_entry static_bin_files[] = {
{"favicon.ico", favicon_ico, 1406/*favicon_ico_len*/},
{"logo.gif", logo_gif, 2801/*logo_gif_len*/},
{"grayline.gif", grayline_gif, 43/*grayline_gif_len*/},
{NULL, NULL, 0}
! };
! static const struct static_txt_file_entry static_txt_files[] = {
{"httpinfo.css", httpinfo_css},
{NULL, NULL}
! };
***************
*** 439,443 ****
while(static_txt_files[i].data[y])
{
! size += sprintf(&body[size], static_txt_files[i].data[y]);
y++;
}
--- 435,439 ----
while(static_txt_files[i].data[y])
{
! size += snprintf(&body[size], sizeof(body)-size, static_txt_files[i].data[y]);
y++;
}
***************
*** 472,498 ****
netsprintf_direct = 1;
#endif
! y = 0;
! while(http_ok_head[y])
! {
! size += sprintf(&body[size], http_ok_head[y]);
! y++;
! }
size += build_tabs(&body[size], sizeof(body)-size, i);
! size += build_frame("Current Routes",
"routes",
FRAMEWIDTH,
- &body[size],
- sizeof(body)-size,
tab_entries[i].build_body_cb);
stats.ok_hits++;
!
! y = 0;
! while(http_ok_tail[y])
! {
! size += sprintf(&body[size], http_ok_tail[y]);
! y++;
! }
#ifdef NETDIRECT
--- 468,484 ----
netsprintf_direct = 1;
#endif
! size += snprintf(&body[size], sizeof(body)-size, "%s", http_ok_head);
size += build_tabs(&body[size], sizeof(body)-size, i);
! size += build_frame(&body[size],
! sizeof(body)-size,
! "Current Routes",
"routes",
FRAMEWIDTH,
tab_entries[i].build_body_cb);
stats.ok_hits++;
!
! size += snprintf(&body[size], sizeof(body)-size, http_ok_tail);
#ifdef NETDIRECT
***************
*** 605,644 ****
static int build_tabs(char *buf, const olsr_u32_t bufsize, int active)
{
! int size = 0, i = 0, tabs = 0;
!
! while(strcmp(html_tabs[i], "<!-- TAB ELEMENTS -->"))
! {
! size += snprintf(&buf[size], bufsize-size, html_tabs[i]);
! i++;
! }
!
! i++;
! for(tabs = 0; tab_entries[tabs].tab_label; tabs++)
! {
! if(!tab_entries[tabs].display_tab)
! continue;
! if(tabs == active)
! size += snprintf(&buf[size], bufsize-size,
! html_tabs[i],
! tab_entries[tabs].filename,
! ACTIVE_TAB,
! tab_entries[tabs].tab_label);
! else
! size += snprintf(&buf[size], bufsize-size,
! html_tabs[i],
! tab_entries[tabs].filename,
! " ",
! tab_entries[tabs].tab_label);
! }
!
! i++;
! while(html_tabs[i])
! {
! size += snprintf(&buf[size], bufsize-size, html_tabs[i]);
! i++;
! }
!
return size;
}
--- 591,608 ----
static int build_tabs(char *buf, const olsr_u32_t bufsize, int active)
{
! 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)
! continue;
! size += snprintf(&buf[size], bufsize-size,
! "<li><a href=\"%s\"%s>%s</a></li>\n",
! tab_entries[tabs].filename,
! tabs == active ? " class=\"active\"" : "",
! tab_entries[tabs].tab_label);
! }
! size += snprintf(&buf[size], bufsize-size, html_tabs_epilog);
return size;
}
***************
*** 656,678 ****
! static int build_frame(char *title __attribute__((unused)),
char *link __attribute__((unused)),
int width __attribute__((unused)),
- char *buf,
- olsr_u32_t bufsize,
int(*frame_body_cb)(char *, olsr_u32_t))
{
! int i = 0, size = 0;
!
! while(http_frame[i])
! {
! if(!strcmp(http_frame[i], "<!-- BODY -->"))
! size += frame_body_cb(&buf[size], bufsize-size);
! else
! size += snprintf(&buf[size], bufsize-size, "%s", http_frame[i]);
!
! i++;
! }
!
return size;
}
--- 620,641 ----
! static int section_title(char *buf, olsr_u32_t bufsize, const char *title)
! {
! return snprintf(buf, bufsize,
! "<h2>%s</h2>\n"
! "<table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n", title);
! }
!
! static int build_frame(char *buf,
! olsr_u32_t bufsize,
! char *title __attribute__((unused)),
char *link __attribute__((unused)),
int width __attribute__((unused)),
int(*frame_body_cb)(char *, olsr_u32_t))
{
! int size = 0;
! size += snprintf(&buf[size], bufsize-size, "<div id=\"maintable\">\n");
! size += frame_body_cb(&buf[size], bufsize-size);
! size += snprintf(&buf[size], bufsize-size, "</div>\n");
return size;
}
***************
*** 777,790 ****
int size = 0;
struct rt_entry *rt;
!
size += snprintf(&buf[size], bufsize-size,
! "<h2>OLSR routes in kernel</h2>\n"
! "<table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n"
! "<tr><th%1$s>Destination</th><th%1$s>Gateway</th><th>Metric</th>",
resolve_ip_addresses ? " colspan=\"2\"" : "");
- size += snprintf(&buf[size], bufsize-size, "<th>ETX</th>");
- size += snprintf(&buf[size], bufsize-size, "<th>Interface</th></tr>\n");
-
/* Walk the route table */
OLSR_FOR_ALL_RT_ENTRIES(rt) {
--- 740,748 ----
int size = 0;
struct rt_entry *rt;
! size += section_title(&buf[size], bufsize-size, "OLSR Routes in Kernel");
size += snprintf(&buf[size], bufsize-size,
! "<tr><th%1$s>Destination</th><th%1$s>Gateway</th><th>Metric</th><th>ETX</th><th>Interface</th></tr>\n",
resolve_ip_addresses ? " colspan=\"2\"" : "");
/* Walk the route table */
OLSR_FOR_ALL_RT_ENTRIES(rt) {
***************
*** 843,847 ****
size += snprintf(&buf[size], bufsize-size, "<table width=\"100%%\" border=\"0\">\n<tr>");
! size += snprintf(&buf[size], bufsize-size, "<td>Main address: <b>%s</b></td>\n", olsr_ip_to_string(&olsr_cnf->main_addr));
size += snprintf(&buf[size], bufsize-size, "<td>IP version: %d</td>\n", olsr_cnf->ip_version == AF_INET ? 4 : 6);
--- 801,805 ----
size += snprintf(&buf[size], bufsize-size, "<table width=\"100%%\" border=\"0\">\n<tr>");
! size += snprintf(&buf[size], bufsize-size, "<td>Main address: <strong>%s</strong></td>\n", olsr_ip_to_string(&olsr_cnf->main_addr));
size += snprintf(&buf[size], bufsize-size, "<td>IP version: %d</td>\n", olsr_cnf->ip_version == AF_INET ? 4 : 6);
***************
*** 862,866 ****
size += snprintf(&buf[size], bufsize-size, "<td>TOS: 0x%04x</td>\n", olsr_cnf->tos);
! size += sprintf(&buf[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)" : "");
--- 820,824 ----
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)" : "");
***************
*** 959,967 ****
size += snprintf(&buf[size], bufsize-size, "</table>\n");
- size += snprintf(&buf[size], bufsize-size,
- "<h2>Announced HNA entries</h2>\n"
- "<table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n"
- );
if((olsr_cnf->ip_version == AF_INET) && (olsr_cnf->hna4_entries))
{
--- 917,922 ----
size += snprintf(&buf[size], bufsize-size, "</table>\n");
+ size += section_title(&buf[size], bufsize-size, "Announced HNA entries");
if((olsr_cnf->ip_version == AF_INET) && (olsr_cnf->hna4_entries))
{
***************
*** 977,982 ****
olsr_ip_to_string(&hna4->netmask));
}
-
- size += snprintf(&buf[size], bufsize-size, "</table>\n");
}
else if((olsr_cnf->ip_version == AF_INET6) && (olsr_cnf->hna6_entries))
--- 932,935 ----
***************
*** 994,1000 ****
}
- size += snprintf(&buf[size], bufsize-size, "</table>\n");
}
!
return size;
--- 947,952 ----
}
}
! size += snprintf(&buf[size], bufsize-size, "</table>\n");
return size;
***************
*** 1010,1019 ****
int size = 0, index, thop_cnt;
size += snprintf(&buf[size], bufsize-size,
- "<h2>Links</h2>\n"
- "<table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n"
"<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>LinkQuality</th><th>lost</th><th>total</th><th>NLQ</th><th>ETX</th>\n");
size += snprintf(&buf[size], bufsize-size, "</tr>\n");
--- 962,972 ----
int size = 0, index, thop_cnt;
+ 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");
***************
*** 1025,1033 ****
size += build_ipaddr_with_link(&buf[size], bufsize, &link->local_iface_addr, -1);
size += build_ipaddr_with_link(&buf[size], bufsize, &link->neighbor_iface_addr, -1);
! size += snprintf(&buf[size], bufsize-size,
! "<td align=\"right\">%0.2f</td>",
! link->L_link_quality);
! if (olsr_cnf->lq_level > 0)
! {
size += snprintf(&buf[size], bufsize-size,
"<td align=\"right\">%0.2f</td>"
--- 978,983 ----
size += build_ipaddr_with_link(&buf[size], bufsize, &link->local_iface_addr, -1);
size += build_ipaddr_with_link(&buf[size], bufsize, &link->neighbor_iface_addr, -1);
! size += snprintf(&buf[size], bufsize-size, "<td align=\"right\">%0.2f</td>", link->L_link_quality);
! if (olsr_cnf->lq_level > 0) {
size += snprintf(&buf[size], bufsize-size,
"<td align=\"right\">%0.2f</td>"
***************
*** 1041,1045 ****
link->neigh_link_quality,
(link->loss_link_quality * link->neigh_link_quality) ? 1.0 / (link->loss_link_quality * link->neigh_link_quality) : 0.0);
! }
size += snprintf(&buf[size], bufsize-size, "</tr>\n");
--- 991,995 ----
link->neigh_link_quality,
(link->loss_link_quality * link->neigh_link_quality) ? 1.0 / (link->loss_link_quality * link->neigh_link_quality) : 0.0);
! }
size += snprintf(&buf[size], bufsize-size, "</tr>\n");
***************
*** 1049,1056 ****
size += snprintf(&buf[size], bufsize-size, "</table>\n");
size += snprintf(&buf[size], bufsize-size,
! "<h2>Neighbors</h2>\n"
! "<table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n"
! "<tr><th>IP address</th><th>SYM</th><th>MPR</th><th>MPRS</th><th>Willingness</th><th>2 Hop Neighbors</th></tr>\n");
/* Neighbors */
for(index=0;index<HASHSIZE;index++)
--- 999,1005 ----
size += snprintf(&buf[size], bufsize-size, "</table>\n");
+ 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(index=0;index<HASHSIZE;index++)
***************
*** 1063,1070 ****
size += build_ipaddr_with_link(&buf[size], bufsize, &neigh->neighbor_main_addr, -1);
size += snprintf(&buf[size], bufsize-size,
! "<td>%s</td>"
! "<td>%s</td>"
! "<td>%s</td>"
! "<td>%d</td>",
(neigh->status == SYM) ? "YES" : "NO",
neigh->is_mpr ? "YES" : "NO",
--- 1012,1019 ----
size += build_ipaddr_with_link(&buf[size], bufsize, &neigh->neighbor_main_addr, -1);
size += snprintf(&buf[size], bufsize-size,
! "<td align=\"center\">%s</td>"
! "<td align=\"center\">%s</td>"
! "<td align=\"center\">%s</td>"
! "<td align=\"center\">%d</td>",
(neigh->status == SYM) ? "YES" : "NO",
neigh->is_mpr ? "YES" : "NO",
***************
*** 1072,1085 ****
neigh->willingness);
! size += snprintf(&buf[size], bufsize-size, "<td><select>\n");
! size += snprintf(&buf[size], bufsize-size, "<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)
{
! size += snprintf(&buf[size], bufsize-size, "<option>%s</option>", olsr_ip_to_string(&list_2->neighbor_2->neighbor_2_addr));
thop_cnt ++;
}
--- 1021,1033 ----
neigh->willingness);
! size += snprintf(&buf[size], bufsize-size, "<td><select>\n"
! "<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)
{
! size += snprintf(&buf[size], bufsize-size, "<option>%s</option>\n", olsr_ip_to_string(&list_2->neighbor_2->neighbor_2_addr));
thop_cnt ++;
}
***************
*** 1099,1108 ****
struct tc_entry *tc;
! size += snprintf(&buf[size], bufsize-size,
! "<h2>Topology entries</h2>\n"
! "<table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n"
! "<tr><th>Destination IP</th><th>Last Hop IP</th>");
if (olsr_cnf->lq_level > 0) {
! size += snprintf(&buf[size], bufsize-size, "<th>LQ</th><th>ILQ</th><th>ETX</th>");
}
size += snprintf(&buf[size], bufsize-size, "</tr>\n");
--- 1047,1054 ----
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>");
}
size += snprintf(&buf[size], bufsize-size, "</tr>\n");
***************
*** 1115,1120 ****
size += build_ipaddr_with_link(&buf[size], bufsize, &tc_edge->T_dest_addr, -1);
size += build_ipaddr_with_link(&buf[size], bufsize, &tc->addr, -1);
! if (olsr_cnf->lq_level > 0)
! {
const double d = tc_edge->link_quality * tc_edge->inverse_link_quality;
size += snprintf(&buf[size], bufsize-size,
--- 1061,1065 ----
size += build_ipaddr_with_link(&buf[size], bufsize, &tc_edge->T_dest_addr, -1);
size += build_ipaddr_with_link(&buf[size], bufsize, &tc->addr, -1);
! if (olsr_cnf->lq_level > 0) {
const double d = tc_edge->link_quality * tc_edge->inverse_link_quality;
size += snprintf(&buf[size], bufsize-size,
***************
*** 1141,1147 ****
olsr_u8_t index;
size += snprintf(&buf[size], bufsize-size,
- "<h2>MID entries</h2>\n"
- "<table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n"
"<tr><th>Main Address</th><th>Aliases</th></tr>\n");
--- 1086,1091 ----
olsr_u8_t index;
+ 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");
***************
*** 1229,1233 ****
if(size < 0) {
! size = sprintf(&buf[0], "ERROR GENERATING CONFIGFILE!\n");
}
--- 1173,1177 ----
if(size < 0) {
! size = snprintf(buf, size, "ERROR GENERATING CONFIGFILE!\n");
}
Index: html.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/html.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** html.h 13 Oct 2007 12:04:10 -0000 1.9
--- html.h 14 Oct 2007 22:46:03 -0000 1.10
***************
*** 85,140 ****
! static const char *http_ok_head[] =
! {
! "<!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=\"800\">"
! "<tbody><tr bgcolor=\"#ffffff\">",
! "<td align=\"left\" height=\"69\" valign=\"middle\" width=\"80%\">",
! "<font color=\"black\" face=\"timesroman\" size=\"6\"> olsr.org OLSR daemon</font></td>",
! "<td align=\"right\" height=\"69\" valign=\"middle\" width=\"20%\">",
! "<img src=\"/logo.gif\" alt=\"olsrd logo\"></td>",
! "</tr>",
! "</table>",
! "<!-- END HEAD -->\n\n",
! NULL
! };
! static const char *html_tabs[] =
! {
! "<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"800\">\n",
! "<tr bgcolor=\"#ffffff\"><td>\n",
! "<ul id=\"tabnav\">\n",
! "<!-- TAB ELEMENTS -->",
! "<li><a href=\"%s\" %s>%s</a></li>\n",
! "</ul>\n",
! "</td></tr>\n",
! "<tr><td>\n",
! NULL
! };
!
! static const char *http_ok_tail[] =
! {
! "\n<!-- START TAIL -->\n\n",
! "<div id=\"footer\">\n\n",
! "<p><center>\n",
! "(C)2005 Andreas Tønnesen<br/>\n",
! "<a href=\"http://www.olsr.org/\">http://www.olsr.org</a>\n",
! "</center></p>\n",
! "</div>\n",
! "</body></html>\n",
! NULL
! };
static const char *cfgfile_body[] =
--- 85,130 ----
! static const char * const http_ok_head =
! "<!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=\"800\">"
! "<tbody><tr bgcolor=\"#ffffff\">"
! "<td align=\"left\" height=\"69\" valign=\"middle\" width=\"80%\">"
! "<font color=\"black\" face=\"timesroman\" size=\"6\"> olsr.org OLSR daemon</font></td>"
! "<td align=\"right\" height=\"69\" valign=\"middle\" width=\"20%\">"
! "<img src=\"/logo.gif\" alt=\"olsrd logo\"></td>"
! "</tr>"
! "</tbody>"
! "</table>"
! "<!-- END HEAD -->\n\n";
! static const char * const html_tabs_prolog =
! "<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"800\">\n"
! "<tr bgcolor=\"#ffffff\"><td>\n"
! "<ul id=\"tabnav\">\n";
+ static const char * const html_tabs_epilog =
+ "</ul>\n"
+ "</td></tr>\n"
+ "<tr><td>\n";
! static const char * const http_ok_tail =
! "<!-- START TAIL -->\n"
! "<div id=\"footer\">\n\n"
! "<p><center>\n"
! "(C)2005 Andreas Tønnesen<br/>\n"
! "<a href=\"http://www.olsr.org/\">http://www.olsr.org</a>\n"
! "</center></p>\n"
! "</div>\n"
! "</body></html>\n";
static const char *cfgfile_body[] =
***************
*** 194,207 ****
};
-
-
- static const char *http_frame[] =
- {
- "<div id=\"maintable\">\n",
- "<!-- BODY -->",
- "</div>\n",
- NULL
- };
-
-
#endif
--- 184,186 ----
More information about the Olsr-cvs
mailing list