[Olsr-cvs] olsrd-current/lib/httpinfo/src olsrd_httpinfo.c, 1.78, 1.79
Bernd Petrovitsch
(spam-protected)
Sat Oct 13 14:09:39 CEST 2007
Update of /cvsroot/olsrd/olsrd-current/lib/httpinfo/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26503/lib/httpinfo/src
Modified Files:
olsrd_httpinfo.c
Log Message:
* more HTML cleanup
Index: olsrd_httpinfo.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/httpinfo/src/olsrd_httpinfo.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -C2 -d -r1.78 -r1.79
*** olsrd_httpinfo.c 13 Oct 2007 12:04:57 -0000 1.78
--- olsrd_httpinfo.c 13 Oct 2007 12:09:37 -0000 1.79
***************
*** 778,787 ****
struct rt_entry *rt;
- size += snprintf(&buf[size], bufsize-size, "<h2>OLSR routes in kernel</h2>\n");
-
size += snprintf(&buf[size], bufsize-size,
! "<table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">"
"<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>");
--- 778,786 ----
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>");
***************
*** 842,846 ****
size += snprintf(&buf[size], bufsize-size, "<h2>Variables</h2>\n");
! 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));
--- 841,845 ----
size += snprintf(&buf[size], bufsize-size, "<h2>Variables</h2>\n");
! 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));
***************
*** 893,897 ****
! size += snprintf(&buf[size], bufsize-size, "<table width=\"100%%\" border=0>\n");
--- 892,896 ----
! size += snprintf(&buf[size], bufsize-size, "<table width=\"100%%\" border=\"0\">\n");
***************
*** 939,943 ****
size += snprintf(&buf[size], bufsize-size, "<h2>Plugins</h2>\n");
! size += snprintf(&buf[size], bufsize-size, "<table width=\"100%%\" border=0><tr><th>Name</th><th>Parameters</th></tr>\n");
for(pentry = olsr_cnf->plugins; pentry; pentry = pentry->next)
--- 938,942 ----
size += snprintf(&buf[size], bufsize-size, "<h2>Plugins</h2>\n");
! size += snprintf(&buf[size], bufsize-size, "<table width=\"100%%\" border=\"0\"><tr><th>Name</th><th>Parameters</th></tr>\n");
for(pentry = olsr_cnf->plugins; pentry; pentry = pentry->next)
***************
*** 961,976 ****
! size += snprintf(&buf[size], bufsize-size, "<h2>Announced HNA entries</h2>\n");
if((olsr_cnf->ip_version == AF_INET) && (olsr_cnf->hna4_entries))
{
struct hna4_entry *hna4;
! size += snprintf(&buf[size], bufsize-size, "<table width=\"100%%\" BORDER=0 CELLSPACING=0 CELLPADDING=0 ALIGN=center><tr><th>Network</th><th>Netmask</th></tr>\n");
for(hna4 = olsr_cnf->hna4_entries; hna4; hna4 = hna4->next)
{
size += snprintf(&buf[size], bufsize-size, "<tr><td>%s</td><td>%s</td></tr>\n",
! olsr_ip_to_string((union olsr_ip_addr *)&hna4->net),
! olsr_ip_to_string((union olsr_ip_addr *)&hna4->netmask));
}
--- 960,979 ----
! 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))
{
struct hna4_entry *hna4;
! size += snprintf(&buf[size], bufsize-size,
! "<tr><th>Network</th><th>Netmask</th></tr>\n");
for(hna4 = olsr_cnf->hna4_entries; hna4; hna4 = hna4->next)
{
size += snprintf(&buf[size], bufsize-size, "<tr><td>%s</td><td>%s</td></tr>\n",
! olsr_ip_to_string(&hna4->net),
! olsr_ip_to_string(&hna4->netmask));
}
***************
*** 981,990 ****
struct hna6_entry *hna6;
! size += snprintf(&buf[size], bufsize-size, "<table width=\"100%%\" BORDER=0 CELLSPACING=0 CELLPADDING=0 ALIGN=center><tr><th>Network</th><th>Prefix length</th></tr>\n");
for(hna6 = olsr_cnf->hna6_entries; hna6; hna6 = hna6->next)
{
size += snprintf(&buf[size], bufsize-size, "<tr><td>%s</td><td>%d</td></tr>\n",
! olsr_ip_to_string((union olsr_ip_addr *)&hna6->net),
hna6->prefix_len);
}
--- 984,994 ----
struct hna6_entry *hna6;
! size += snprintf(&buf[size], bufsize-size,
! "<tr><th>Network</th><th>Prefix length</th></tr>\n");
for(hna6 = olsr_cnf->hna6_entries; hna6; hna6 = hna6->next)
{
size += snprintf(&buf[size], bufsize-size, "<tr><td>%s</td><td>%d</td></tr>\n",
! olsr_ip_to_string(&hna6->net),
hna6->prefix_len);
}
***************
*** 1006,1011 ****
int size = 0, index, thop_cnt;
! size += snprintf(&buf[size], bufsize-size, "<h2>Links</h2>\n");
! size += snprintf(&buf[size], bufsize-size, "<table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"><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");
--- 1010,1017 ----
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");
***************
*** 1043,1048 ****
size += snprintf(&buf[size], bufsize-size, "</table>\n");
! size += snprintf(&buf[size], bufsize-size, "<h2>Neighbors</h2>\n");
! size += snprintf(&buf[size], bufsize-size, "<table width=\"100%%\" BORDER=0 CELLSPACING=0 CELLPADDING=0 ALIGN=center><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++)
--- 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++)
***************
*** 1090,1105 ****
int size = 0;
struct tc_entry *tc;
- struct tc_edge_entry *tc_edge;
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%1$s>Destination IP</th><th%1$s>Last Hop IP</th>",
! resolve_ip_addresses ? " colspan=\"2\"" : "");
! 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");
OLSR_FOR_ALL_TC_ENTRIES(tc) {
OLSR_FOR_ALL_TC_EDGE_ENTRIES(tc, tc_edge) {
--- 1098,1113 ----
int size = 0;
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");
OLSR_FOR_ALL_TC_ENTRIES(tc) {
+ struct tc_edge_entry *tc_edge;
OLSR_FOR_ALL_TC_EDGE_ENTRIES(tc, tc_edge) {
***************
*** 1133,1137 ****
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><tr><th>Main Address</th><th>Aliases</th></tr>\n");
/* MID */
--- 1141,1148 ----
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");
/* MID */
More information about the Olsr-cvs
mailing list