Mercurial > flash_v2
annotate packages/net/httpd/current/src/monitor.c @ 1325:921f9882bd6d
* src/monitor.c (cyg_monitor_memory): Check if the request
contains a 'base' parameter and don't display anything if it does
not. This prevents the monitor from attempting to access memory
location '0' when the user accesses the memory html page for the
first time without any parameters.
| author | asl |
|---|---|
| date | Tue, 21 Oct 2003 18:53:27 +0000 |
| parents | 657f409c5dfe |
| children |
| rev | line source |
|---|---|
| 468 | 1 /* ================================================================= |
| 2 * | |
| 3 * monitor.c | |
| 4 * | |
| 5 * An HTTP system monitor | |
| 6 * | |
| 7 * ================================================================= | |
| 8 * ####ECOSGPLCOPYRIGHTBEGIN#### | |
| 9 * ------------------------------------------- | |
| 10 * This file is part of eCos, the Embedded Configurable Operating | |
| 11 * System. | |
| 12 * Copyright (C) 2002 Nick Garnett. | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
13 * Copyright (C) 2003 Andrew Lunn |
| 468 | 14 * |
| 15 * eCos is free software; you can redistribute it and/or modify it | |
| 16 * under the terms of the GNU General Public License as published by | |
| 17 * the Free Software Foundation; either version 2 or (at your option) | |
| 18 * any later version. | |
| 19 * | |
| 20 * eCos is distributed in the hope that it will be useful, but | |
| 21 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 23 * General Public License for more details. | |
| 24 * | |
| 25 * You should have received a copy of the GNU General Public License | |
| 26 * along with eCos; if not, write to the Free Software Foundation, | |
| 27 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | |
| 28 * | |
| 29 * As a special exception, if other files instantiate templates or | |
| 30 * use macros or inline functions from this file, or you compile this | |
| 31 * file and link it with other works to produce a work based on this | |
| 32 * file, this file does not by itself cause the resulting work to be | |
| 33 * covered by the GNU General Public License. However the source code | |
| 34 * for this file must still be made available in accordance with | |
| 35 * section (3) of the GNU General Public License. | |
| 36 * | |
| 37 * This exception does not invalidate any other reasons why a work | |
| 38 * based on this file might be covered by the GNU General Public | |
| 39 * License. | |
| 40 * | |
| 41 * ------------------------------------------- | |
| 42 * ####ECOSGPLCOPYRIGHTEND#### | |
| 43 * ================================================================= | |
| 44 * #####DESCRIPTIONBEGIN#### | |
| 45 * | |
| 46 * Author(s): nickg@calivar.com | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
47 * Contributors: nickg@calivar.com, andrew.lunn@ascom.ch |
| 468 | 48 * Date: 2002-10-14 |
| 49 * Purpose: | |
| 50 * Description: | |
| 51 * | |
| 52 * ####DESCRIPTIONEND#### | |
| 53 * | |
| 54 * ================================================================= | |
| 55 */ | |
| 56 | |
| 57 #include <pkgconf/system.h> | |
| 58 #include <pkgconf/isoinfra.h> | |
| 59 #include <pkgconf/net.h> | |
| 60 #include <pkgconf/httpd.h> | |
| 61 #include <pkgconf/kernel.h> | |
| 62 | |
| 63 #include <cyg/infra/cyg_trac.h> /* tracing macros */ | |
| 64 #include <cyg/infra/cyg_ass.h> /* assertion macros */ | |
| 65 | |
| 66 #include <cyg/httpd/httpd.h> | |
| 67 | |
| 68 #include <cyg/kernel/kapi.h> | |
| 69 #ifdef CYGPKG_KERNEL_INSTRUMENT | |
| 70 #include <cyg/kernel/instrmnt.h> | |
| 71 #include <cyg/kernel/instrument_desc.h> | |
| 72 #endif | |
| 73 | |
| 74 #include <unistd.h> | |
| 75 #include <ctype.h> | |
| 76 | |
| 77 /* ================================================================= */ | |
| 78 /* Include all the necessary network headers by hand. We need to do | |
| 79 * this so that _KERNEL is correctly defined, or not, for specific | |
| 80 * headers so we can use both the external API and get at internal | |
| 81 * kernel structures. | |
| 82 */ | |
| 83 | |
| 84 #define _KERNEL | |
| 85 #include <sys/param.h> | |
| 86 #undef _KERNEL | |
| 87 #include <sys/socket.h> | |
| 88 #include <sys/ioctl.h> | |
| 89 #include <sys/errno.h> | |
| 90 #include <sys/time.h> | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
91 #include <netdb.h> |
| 468 | 92 #define _KERNEL |
| 93 | |
| 94 #include <net/if.h> | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
95 #include <ifaddrs.h> |
| 468 | 96 #include <netinet/in.h> |
| 97 #include <netinet/ip.h> | |
| 98 #include <netinet/ip_icmp.h> | |
| 99 #include <net/route.h> | |
| 100 #include <net/if_dl.h> | |
| 101 | |
| 102 #include <sys/protosw.h> | |
| 103 #include <netinet/in_pcb.h> | |
| 104 #include <netinet/udp.h> | |
| 105 #include <netinet/tcp.h> | |
| 106 #include <netinet/tcp_timer.h> | |
| 107 #include <netinet/ip_var.h> | |
| 108 #include <netinet/icmp_var.h> | |
| 109 #include <netinet/udp_var.h> | |
| 110 #include <netinet/tcp_var.h> | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
111 #ifdef CYGPKG_NET_INET6 |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
112 #include <netinet/ip6.h> |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
113 #include <net/if_var.h> |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
114 #include <netinet6/ip6_var.h> |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
115 #include <netinet6/in6_var.h> |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
116 #include <netinet/icmp6.h> |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
117 #endif |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
118 |
| 468 | 119 |
|
831
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
120 #include <sys/mbuf.h> |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
121 |
| 468 | 122 #include <cyg/io/eth/eth_drv_stats.h> |
| 123 | |
| 124 /* ================================================================= */ | |
| 125 /* Use this when a thread appears to have no name. | |
| 126 */ | |
| 127 | |
| 128 #define NULL_THREAD_NAME "----------" | |
| 129 | |
| 130 /* ================================================================= */ | |
| 131 /* Draw navigation bar | |
| 132 * | |
| 133 * This draws a simple table containing links to the various monitor | |
| 134 * pages at the current position in the HTML stream. | |
| 135 */ | |
| 136 | |
| 137 static void draw_navbar( FILE *client ) | |
| 138 { | |
| 139 html_para_begin( client, "" ); | |
| 140 | |
| 141 html_table_begin( client, "border cellpadding=\"4\"" ); | |
| 142 { | |
| 143 html_table_row_begin(client, "" ); | |
| 144 { | |
| 145 html_table_data_begin( client, "" ); | |
| 146 html_image( client, "/monitor/ecos.gif", "eCos logo", "" ); | |
| 147 html_table_data_begin( client, "" ); | |
| 148 html_url( client, "Threads", "/monitor/threads.html"); | |
| 149 html_table_data_begin( client, "" ); | |
| 150 html_url( client, "Interrupts", "/monitor/interrupts.html"); | |
| 151 html_table_data_begin( client, "" ); | |
| 152 html_url( client, "Memory", "/monitor/memory.html"); | |
| 153 html_table_data_begin( client, "" ); | |
| 154 html_url( client, "Network", "/monitor/network.html"); | |
| 155 #ifdef CYGPKG_KERNEL_INSTRUMENT | |
| 156 html_table_data_begin( client, "" ); | |
| 157 html_url( client, "Instrumentation", "/monitor/instrument.html"); | |
| 158 #endif | |
| 159 } | |
| 160 html_table_row_end( client ); | |
| 161 } | |
| 162 html_table_end( client ); | |
| 163 } | |
| 164 | |
| 165 /* ================================================================= */ | |
| 166 /* Index page | |
| 167 * | |
| 168 * A simple introductory page matching "/monitor" and | |
| 169 * "/monitor/index.html". | |
| 170 */ | |
| 171 | |
| 172 static char monitor_index_blurb[] = | |
|
1053
657f409c5dfe
* src/httpd.c: Fixed a problem with closing the client socket --
nickg
parents:
1008
diff
changeset
|
173 "<p>This is the eCos System Monitor. It presents a simple web monitor" |
|
657f409c5dfe
* src/httpd.c: Fixed a problem with closing the client socket --
nickg
parents:
1008
diff
changeset
|
174 "and control interface for eCos systems.\n" |
| 468 | 175 "<p>Use the navigation bar at the bottom of each page to explore." |
| 176 ; | |
| 177 | |
| 178 static cyg_bool cyg_monitor_index( FILE * client, char *filename, | |
| 179 char *formdata, void *arg ) | |
| 180 { | |
| 181 html_begin(client); | |
| 182 | |
| 183 html_head(client,"eCos System Monitor", ""); | |
| 184 | |
| 185 html_body_begin(client,""); | |
| 186 { | |
| 187 html_heading(client, 2, "eCos System Monitor" ); | |
| 188 | |
| 189 fputs( monitor_index_blurb, client ); | |
| 190 | |
| 191 draw_navbar(client); | |
| 192 } | |
| 193 html_body_end(client); | |
| 194 | |
| 195 html_end(client); | |
| 196 | |
| 197 return 1; | |
| 198 } | |
| 199 | |
| 200 CYG_HTTPD_TABLE_ENTRY( cyg_monitor_entry, | |
| 201 "/monitor", | |
| 202 cyg_monitor_index, | |
| 203 NULL ); | |
| 204 | |
| 205 CYG_HTTPD_TABLE_ENTRY( cyg_monitor_index_entry, | |
| 206 "/monitor/index.html", | |
| 207 cyg_monitor_index, | |
| 208 NULL ); | |
| 209 | |
| 210 /* ================================================================= */ | |
| 211 /* Thread Monitor | |
| 212 * | |
| 213 * Uses the kapi thread info API to enumerate all the current threads | |
| 214 * and generate a table showing their state. | |
| 215 */ | |
| 216 | |
| 217 static cyg_bool cyg_monitor_threads( FILE * client, char *filename, | |
| 218 char *formdata, void *arg ) | |
| 219 { | |
| 220 | |
| 221 html_begin(client); | |
| 222 | |
| 223 /* html_head(client,"Thread Monitor", "<meta http-equiv=\"refresh\" content=\"10\">"); */ | |
| 224 html_head(client,"eCos Thread Monitor", ""); | |
| 225 | |
| 226 html_body_begin(client,""); | |
| 227 { | |
| 228 html_heading(client, 2, "Thread Monitor" ); | |
| 229 | |
| 230 html_table_begin( client, "border" ); | |
| 231 { | |
| 232 cyg_handle_t thread = 0; | |
| 233 cyg_uint16 id = 0; | |
| 234 | |
| 235 html_table_header( client, "Id", "" ); | |
| 236 html_table_header( client, "State", "" ); | |
| 237 html_table_header( client, "Set<br>Priority", "" ); | |
| 238 html_table_header( client, "Current<br>Priority", "" ); | |
| 239 html_table_header( client, "Name", "" ); | |
| 240 html_table_header( client, "Stack Base", "" ); | |
| 241 html_table_header( client, "Stack Size", "" ); | |
| 242 #ifdef CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT | |
| 243 html_table_header( client, "Stack Used", "" ); | |
| 244 #endif | |
| 245 /* Loop over the threads, and generate a table row for | |
| 246 * each. | |
| 247 */ | |
| 248 while( cyg_thread_get_next( &thread, &id ) ) | |
| 249 { | |
| 250 cyg_thread_info info; | |
| 251 char *state_string; | |
| 252 | |
| 253 cyg_thread_get_info( thread, id, &info ); | |
| 254 | |
| 255 if( info.name == NULL ) | |
| 256 info.name = NULL_THREAD_NAME; | |
| 257 | |
| 258 /* Translate the state into a string. | |
| 259 */ | |
| 260 if( info.state == 0 ) | |
| 261 state_string = "RUN"; | |
| 262 else if( info.state & 0x04 ) | |
| 263 state_string = "SUSP"; | |
| 264 else switch( info.state & 0x1b ) | |
| 265 { | |
| 266 case 0x01: state_string = "SLEEP"; break; | |
| 267 case 0x02: state_string = "CNTSLEEP"; break; | |
| 268 case 0x08: state_string = "CREATE"; break; | |
| 269 case 0x10: state_string = "EXIT"; break; | |
| 270 default: state_string = "????"; break; | |
| 271 } | |
| 272 | |
| 273 /* Now generate the row. | |
| 274 */ | |
| 275 html_table_row_begin(client, "" ); | |
| 276 { | |
| 277 html_table_data_begin( client, "" ); | |
| 278 fprintf( client, "<a href=\"/monitor/thread-%04x.html\">%04x</a>\n", id,id); | |
| 279 html_table_data_begin( client, "" ); | |
| 280 fprintf( client, "%s", state_string); | |
| 281 html_table_data_begin( client, "" ); | |
| 282 fprintf( client, "%d", info.set_pri); | |
| 283 html_table_data_begin( client, "" ); | |
| 284 fprintf( client, "%d", info.cur_pri); | |
| 285 html_table_data_begin( client, "" ); | |
| 286 fputs( info.name, client ); | |
| 287 html_table_data_begin( client, "" ); | |
| 288 fprintf( client, "%08x", info.stack_base ); | |
| 289 html_table_data_begin( client, "" ); | |
| 290 fprintf( client, "%d", info.stack_size ); | |
| 291 #ifdef CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT | |
| 292 html_table_data_begin( client, "" ); | |
| 293 fprintf( client, "%d", info.stack_used ); | |
| 294 #endif | |
| 295 } | |
| 296 html_table_row_end(client); | |
| 297 | |
| 298 } | |
| 299 } | |
| 300 html_table_end( client ); | |
| 301 | |
| 302 draw_navbar(client); | |
| 303 } | |
| 304 html_body_end(client); | |
| 305 | |
| 306 html_end(client); | |
| 307 | |
| 308 return 1; | |
| 309 } | |
| 310 | |
| 311 CYG_HTTPD_TABLE_ENTRY( cyg_monitor_show_threads, | |
| 312 "/monitor/threads.htm*", | |
| 313 cyg_monitor_threads, | |
| 314 NULL ); | |
| 315 | |
| 316 /* ================================================================= */ | |
| 317 /* Thread edit page | |
| 318 * | |
| 319 * A page on which the thread's state may be edited. This tests forms | |
| 320 * handling. | |
| 321 */ | |
| 322 | |
| 323 static char thread_edit_blurb[] = | |
|
1053
657f409c5dfe
* src/httpd.c: Fixed a problem with closing the client socket --
nickg
parents:
1008
diff
changeset
|
324 "<p>This table contains an entry for each property of the thread" |
|
657f409c5dfe
* src/httpd.c: Fixed a problem with closing the client socket --
nickg
parents:
1008
diff
changeset
|
325 "that you can edit. The properties are:\n" |
|
657f409c5dfe
* src/httpd.c: Fixed a problem with closing the client socket --
nickg
parents:
1008
diff
changeset
|
326 "<p><b>State:</b> Change thread's state. The <em>Suspend</em> button" |
|
657f409c5dfe
* src/httpd.c: Fixed a problem with closing the client socket --
nickg
parents:
1008
diff
changeset
|
327 "will suspend the thread. The <em>Run</em> button will undo any previous" |
|
657f409c5dfe
* src/httpd.c: Fixed a problem with closing the client socket --
nickg
parents:
1008
diff
changeset
|
328 "suspends. The <em>Release</em> button will release the thread out of" |
|
657f409c5dfe
* src/httpd.c: Fixed a problem with closing the client socket --
nickg
parents:
1008
diff
changeset
|
329 "any sleep it is currently in.\n" |
| 468 | 330 "<p><b>Priority:</b> Change the thread's priority.\n" |
|
1053
657f409c5dfe
* src/httpd.c: Fixed a problem with closing the client socket --
nickg
parents:
1008
diff
changeset
|
331 "<p>Once the new state has been selected, press the <em>Submit</em>" |
|
657f409c5dfe
* src/httpd.c: Fixed a problem with closing the client socket --
nickg
parents:
1008
diff
changeset
|
332 "button to make the change, or <em>Reset</em> to clear it." |
| 468 | 333 ; |
| 334 | |
| 335 static cyg_bool cyg_monitor_thread_edit( FILE * client, char *filename, | |
| 336 char *formdata, void *arg ) | |
| 337 { | |
| 338 /* If any form data has been supplied, then change the thread's | |
| 339 * state accordingly. | |
| 340 */ | |
| 341 if( formdata != NULL ) | |
| 342 { | |
| 343 char *formlist[6]; | |
| 344 char *state; | |
| 345 char *pri_string; | |
| 346 char *id_string; | |
| 347 cyg_handle_t thread = 0; | |
| 348 cyg_uint16 id; | |
| 349 | |
| 350 /* Parse the data */ | |
| 351 cyg_formdata_parse( formdata, formlist, 6 ); | |
| 352 | |
| 353 /* Get the thread id from the hidden control */ | |
| 354 id_string = cyg_formlist_find( formlist, "thread"); | |
| 355 | |
| 356 sscanf( id_string, "%04hx", &id ); | |
| 357 | |
| 358 thread = cyg_thread_find( id ); | |
| 359 | |
| 360 /* If there is a pri field, change the priority */ | |
| 361 pri_string = cyg_formlist_find( formlist, "pri"); | |
| 362 | |
| 363 if( pri_string != NULL ) | |
| 364 { | |
| 365 cyg_priority_t pri; | |
| 366 | |
| 367 sscanf( pri_string, "%d", &pri ); | |
| 368 | |
| 369 cyg_thread_set_priority( thread, pri ); | |
| 370 } | |
| 371 | |
| 372 /* If there is a state field, change the thread state */ | |
| 373 state = cyg_formlist_find( formlist, "state"); | |
| 374 | |
| 375 if( state != NULL ) | |
| 376 { | |
| 377 if( strcmp( state, "run" ) == 0 ) | |
| 378 cyg_thread_resume( thread ); | |
| 379 if( strcmp( state, "suspend" ) == 0 ) | |
| 380 cyg_thread_suspend( thread ); | |
| 381 if( strcmp( state, "release" ) == 0 ) | |
| 382 cyg_thread_release( thread ); | |
| 383 } | |
| 384 } | |
| 385 | |
| 386 /* Now generate a page showing the current thread state, and | |
| 387 * including form controls to change it. | |
| 388 */ | |
| 389 | |
| 390 html_begin(client); | |
| 391 | |
| 392 html_head(client,"eCos Thread Editor", ""); | |
| 393 | |
| 394 html_body_begin(client,""); | |
| 395 { | |
| 396 cyg_uint16 id; | |
| 397 cyg_thread_info info; | |
| 398 cyg_handle_t thread = 0; | |
| 399 char idbuf[16]; | |
| 400 | |
| 401 sscanf( filename, "/monitor/thread-%04hx.html", &id ); | |
| 402 | |
| 403 thread = cyg_thread_find( id ); | |
| 404 cyg_thread_get_info(thread, id, &info ); | |
| 405 | |
| 406 html_heading(client, 2, "Thread State Editor" ); | |
| 407 | |
| 408 html_para_begin( client, "" ); | |
| 409 | |
| 410 fprintf( client, "Editing Thread %04x %s\n",id, | |
| 411 info.name?info.name:NULL_THREAD_NAME); | |
| 412 | |
| 413 fputs( thread_edit_blurb, client ); | |
| 414 | |
| 415 html_form_begin( client, filename, "" ); | |
| 416 { | |
| 417 html_table_begin( client, "border" ); | |
| 418 { | |
| 419 html_table_header( client, "Property", "" ); | |
| 420 html_table_header( client, "Value", "" ); | |
| 421 | |
| 422 html_table_row_begin(client, "" ); | |
| 423 { | |
| 424 html_table_data_begin( client, "" ); | |
| 425 fputs( "State", client ); | |
| 426 | |
| 427 html_table_data_begin( client, "" ); | |
| 428 | |
| 429 html_form_input_radio( client, "state", "run", (info.state&0x04)==0 ); | |
| 430 fputs( "Run", client ); | |
| 431 html_form_input_radio( client, "state", "suspend", (info.state&0x04)!=0 ); | |
| 432 fputs( "Suspend", client ); | |
| 433 html_form_input_radio( client, "state", "release", 0 ); | |
| 434 fputs( "Release", client ); | |
| 435 } | |
| 436 html_table_row_end( client ); | |
| 437 | |
| 438 html_table_row_begin(client, "" ); | |
| 439 { | |
| 440 html_table_data_begin( client, "" ); | |
| 441 fputs( "Priority", client ); | |
| 442 | |
| 443 html_table_data_begin( client, "" ); | |
| 444 fprintf(client,"<input type=\"text\" name=\"pri\" size=\"10\" value=\"%d\">\n", | |
| 445 info.set_pri); | |
| 446 } | |
| 447 html_table_row_end( client ); | |
| 448 | |
| 449 } | |
| 450 html_table_end( client ); | |
| 451 | |
| 452 /* Add submit and reset buttons */ | |
| 453 html_form_input(client, "submit", "submit", "Submit", ""); | |
| 454 html_form_input(client, "reset", "reset", "Reset", ""); | |
| 455 | |
| 456 /* Pass the thread ID through to our next incarnation */ | |
| 457 sprintf( idbuf, "%04x", id ); | |
| 458 html_form_input_hidden(client, "thread", idbuf ); | |
| 459 | |
| 460 } | |
| 461 html_form_end( client ); | |
| 462 | |
| 463 draw_navbar(client); | |
| 464 } | |
| 465 html_body_end(client); | |
| 466 | |
| 467 html_end(client); | |
| 468 | |
| 469 return 1; | |
| 470 } | |
| 471 | |
| 472 CYG_HTTPD_TABLE_ENTRY( cyg_monitor_thread_edit_entry, | |
| 473 "/monitor/thread-*", | |
| 474 cyg_monitor_thread_edit, | |
| 475 NULL ); | |
| 476 | |
| 477 /* ================================================================= */ | |
| 478 /* Interrupt monitor | |
| 479 * | |
| 480 * At present this just generates a table showing which interrupts | |
| 481 * have an ISR attached. | |
| 482 */ | |
| 483 | |
| 484 static cyg_bool cyg_monitor_interrupts( FILE * client, char *filename, | |
| 485 char *formdata, void *arg ) | |
| 486 { | |
| 487 html_begin(client); | |
| 488 | |
| 489 html_head(client,"eCos Interrupt Monitor", ""); | |
| 490 | |
| 491 html_body_begin(client,""); | |
| 492 { | |
| 493 html_heading(client, 2, "Interrupt Monitor" ); | |
| 494 | |
| 495 html_table_begin( client, "border" ); | |
| 496 { | |
| 497 int i; | |
| 498 int maxint = CYGNUM_HAL_ISR_MAX; | |
| 499 | |
| 500 #ifdef CYGPKG_HAL_I386 | |
| 501 maxint = CYGNUM_HAL_ISR_MIN+16; | |
| 502 #endif | |
| 503 | |
| 504 html_table_header( client, "ISR", "" ); | |
| 505 html_table_header( client, "State", "" ); | |
| 506 | |
| 507 for( i = CYGNUM_HAL_ISR_MIN; i <= maxint ; i++ ) | |
| 508 { | |
| 509 cyg_bool_t inuse; | |
| 510 HAL_INTERRUPT_IN_USE( i, inuse ); | |
| 511 | |
| 512 html_table_row_begin(client, "" ); | |
| 513 { | |
| 514 html_table_data_begin( client, "" ); | |
| 515 fprintf( client, "%d", i); | |
| 516 html_table_data_begin( client, "" ); | |
| 517 fprintf( client, "%s", inuse?"In Use":"Free"); | |
| 518 } | |
| 519 html_table_row_end( client ); | |
| 520 } | |
| 521 } | |
| 522 html_table_end( client ); | |
| 523 | |
| 524 draw_navbar(client); | |
| 525 } | |
| 526 html_body_end(client); | |
| 527 | |
| 528 html_end(client); | |
| 529 | |
| 530 return 1; | |
| 531 | |
| 532 } | |
| 533 | |
| 534 CYG_HTTPD_TABLE_ENTRY( cyg_monitor_interrupts_entry, | |
| 535 "/monitor/interrupts.htm*", | |
| 536 cyg_monitor_interrupts, | |
| 537 NULL ); | |
| 538 | |
| 539 /* ================================================================= */ | |
| 540 /* Memory monitor | |
| 541 * | |
| 542 * Generates a table showing a 256 byte page of memory. Form controls | |
| 543 * allow changes to the base address and display element size. | |
| 544 */ | |
| 545 | |
| 546 static cyg_bool cyg_monitor_memory( FILE * client, char *filename, | |
| 547 char *formdata, void *arg ) | |
| 548 { | |
| 549 char *formlist[10]; | |
| 550 cyg_uint32 base = 0; | |
| 551 unsigned int datasize = 1; | |
| 552 int size = 256; | |
| 553 char *p; | |
|
1325
921f9882bd6d
* src/monitor.c (cyg_monitor_memory): Check if the request
asl
parents:
1053
diff
changeset
|
554 bool valid_base = true; |
|
921f9882bd6d
* src/monitor.c (cyg_monitor_memory): Check if the request
asl
parents:
1053
diff
changeset
|
555 |
| 468 | 556 |
| 557 cyg_formdata_parse( formdata, formlist, 10 ); | |
| 558 | |
| 559 p = cyg_formlist_find( formlist, "base" ); | |
| 560 | |
|
1325
921f9882bd6d
* src/monitor.c (cyg_monitor_memory): Check if the request
asl
parents:
1053
diff
changeset
|
561 /* If the page is requested without a 'base' parameter, do not attempt |
|
921f9882bd6d
* src/monitor.c (cyg_monitor_memory): Check if the request
asl
parents:
1053
diff
changeset
|
562 * to access any memory locations to prevent illegal memory accesses |
|
921f9882bd6d
* src/monitor.c (cyg_monitor_memory): Check if the request
asl
parents:
1053
diff
changeset
|
563 * on targets where '0' is not a valid address. |
|
921f9882bd6d
* src/monitor.c (cyg_monitor_memory): Check if the request
asl
parents:
1053
diff
changeset
|
564 */ |
| 468 | 565 if( p != NULL ) |
| 566 sscanf( p, "%x", &base ); | |
|
1325
921f9882bd6d
* src/monitor.c (cyg_monitor_memory): Check if the request
asl
parents:
1053
diff
changeset
|
567 else |
|
921f9882bd6d
* src/monitor.c (cyg_monitor_memory): Check if the request
asl
parents:
1053
diff
changeset
|
568 valid_base = false; |
| 468 | 569 |
| 570 p = cyg_formlist_find( formlist, "datasize" ); | |
| 571 | |
| 572 if( p != NULL ) | |
| 573 sscanf( p, "%x", &datasize ); | |
| 574 | |
| 575 if( cyg_formlist_find( formlist, "next" ) != NULL ) | |
| 576 base += size; | |
| 577 | |
| 578 if( cyg_formlist_find( formlist, "prev" ) != NULL ) | |
| 579 base -= size; | |
| 580 | |
| 581 html_begin(client); | |
| 582 | |
| 583 html_head(client,"eCos Memory Monitor", ""); | |
| 584 | |
| 585 html_body_begin(client,""); | |
| 586 { | |
| 587 html_heading(client, 2, "Memory Monitor" ); | |
| 588 | |
| 589 html_form_begin( client, "/monitor/memory.html", "" ); | |
| 590 { | |
| 591 | |
| 592 /* Text input control for base address | |
| 593 */ | |
| 594 html_para_begin( client, "" ); | |
| 595 fprintf(client, | |
| 596 "Base Address: 0x<input type=\"text\" name=\"base\" size=\"10\" value=\"%x\">\n", | |
| 597 base); | |
| 598 | |
|
1325
921f9882bd6d
* src/monitor.c (cyg_monitor_memory): Check if the request
asl
parents:
1053
diff
changeset
|
599 fprintf(client, |
|
921f9882bd6d
* src/monitor.c (cyg_monitor_memory): Check if the request
asl
parents:
1053
diff
changeset
|
600 "WARNING: entering an illegal base address can crash the system.\n"); |
|
921f9882bd6d
* src/monitor.c (cyg_monitor_memory): Check if the request
asl
parents:
1053
diff
changeset
|
601 |
| 468 | 602 /* A little menu for the element size |
| 603 */ | |
| 604 html_para_begin( client, "" ); | |
| 605 | |
| 606 fputs( "Element Size: ", client ); | |
| 607 html_form_select_begin( client, "datasize", "" ); | |
| 608 html_form_option( client, "1", "bytes", datasize==1 ); | |
| 609 html_form_option( client, "2", "words", datasize==2 ); | |
| 610 html_form_option( client, "4", "dwords", datasize==4 ); | |
| 611 html_form_select_end( client ); | |
| 612 | |
| 613 html_para_begin( client, "" ); | |
| 614 | |
| 615 /* Submit and reset buttons | |
| 616 */ | |
| 617 html_form_input(client, "submit", "submit", "Submit", ""); | |
| 618 html_form_input(client, "reset", "reset", "Reset", ""); | |
| 619 | |
| 620 html_para_begin( client, "" ); | |
| 621 | |
| 622 /* Previous page button */ | |
| 623 html_form_input(client, "submit", "prev", "Prev Page", ""); | |
| 624 | |
| 625 /* Switch to monospaced font */ | |
| 626 cyg_html_tag_begin( client, "font", "face=\"monospace\"" ); | |
| 627 | |
| 628 html_table_begin( client, "" ); | |
|
1325
921f9882bd6d
* src/monitor.c (cyg_monitor_memory): Check if the request
asl
parents:
1053
diff
changeset
|
629 |
|
921f9882bd6d
* src/monitor.c (cyg_monitor_memory): Check if the request
asl
parents:
1053
diff
changeset
|
630 if (valid_base == true) { |
| 468 | 631 cyg_addrword_t loc; |
| 632 cyg_addrword_t oloc; | |
| 633 | |
| 634 for( oloc = loc = base; loc <= (base+size) ; loc++ ) | |
| 635 { | |
| 636 if( ( loc % 16 ) == 0 ) | |
| 637 { | |
| 638 if( loc != base ) | |
| 639 { | |
| 640 html_table_data_begin( client, "" ); | |
| 641 for( ; oloc < loc; oloc++ ) | |
| 642 { | |
| 643 char c = *(char *)oloc; | |
| 644 if( !isprint(c) ) | |
| 645 c = '.'; | |
| 646 putc( c, client ); | |
| 647 } | |
| 648 html_table_row_end( client ); | |
| 649 } | |
| 650 if( loc == (base+size) ) | |
| 651 break; | |
| 652 html_table_row_begin(client, "" ); | |
| 653 html_table_data_begin( client, "" ); | |
| 654 fprintf( client, "%08x:",loc); | |
| 655 } | |
| 656 | |
| 657 html_table_data_begin( client, "" ); | |
| 658 | |
| 659 if( (loc % datasize) == 0 ) | |
| 660 { | |
| 661 switch( datasize ) | |
| 662 { | |
| 663 case 1: fprintf( client, "%02x", *(cyg_uint8 *)loc ); break; | |
| 664 case 2: fprintf( client, "%04x", *(cyg_uint16 *)loc ); break; | |
| 665 case 4: fprintf( client, "%08x", *(cyg_uint32 *)loc ); break; | |
| 666 } | |
| 667 } | |
| 668 } | |
| 669 } | |
| 670 html_table_end( client ); | |
| 671 cyg_html_tag_end( client, "font" ); | |
| 672 | |
| 673 html_form_input(client, "submit", "next", "Next Page", ""); | |
| 674 } | |
| 675 html_form_end( client ); | |
| 676 | |
| 677 draw_navbar(client); | |
| 678 } | |
| 679 html_body_end(client); | |
| 680 | |
| 681 html_end(client); | |
| 682 | |
| 683 return 1; | |
| 684 | |
| 685 } | |
| 686 | |
| 687 CYG_HTTPD_TABLE_ENTRY( cyg_monitor_memory_entry, | |
| 688 "/monitor/memory.htm*", | |
| 689 cyg_monitor_memory, | |
| 690 NULL ); | |
| 691 | |
| 692 /* ================================================================= */ | |
| 693 /* Network Monitor | |
| 694 * | |
| 695 * This function generates a page containing information about the | |
| 696 * network interfaces and the protocols. | |
| 697 */ | |
| 698 | |
| 699 static cyg_bool cyg_monitor_network( FILE * client, char *filename, | |
| 700 char *formdata, void *arg ) | |
| 701 { | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
702 struct ifaddrs *iflist, *ifp; |
| 468 | 703 |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
704 getifaddrs(&iflist); |
| 468 | 705 |
| 706 html_begin(client); | |
| 707 | |
| 708 html_head(client,"eCos Network Monitor", ""); | |
| 709 | |
| 710 html_body_begin(client,""); | |
| 711 { | |
| 712 html_heading(client, 2, "Network Monitor" ); | |
| 713 | |
| 714 html_heading(client, 3, "Interfaces" ); | |
| 715 | |
| 716 html_table_begin( client, "border" ); | |
| 717 { | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
718 char addr[64]; |
| 468 | 719 int i; |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
720 ifp = iflist; |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
721 |
| 468 | 722 html_table_header( client, "Interface", "" ); |
| 723 html_table_header( client, "Status", "" ); | |
| 724 | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
725 while( ifp != (struct ifaddrs *)NULL) |
| 468 | 726 { |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
727 if (ifp->ifa_addr->sa_family != AF_LINK) |
| 468 | 728 { |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
729 |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
730 html_table_row_begin(client, "" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
731 { |
| 468 | 732 html_table_data_begin( client, "" ); |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
733 fprintf( client, "%s", ifp->ifa_name); |
| 468 | 734 |
| 735 html_table_data_begin( client, "" ); | |
| 736 html_table_begin( client, "" ); | |
| 737 { | |
| 738 /* Get the interface's flags and display | |
| 739 * the interesting ones. | |
| 740 */ | |
| 741 | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
742 html_table_row_begin(client, "" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
743 fprintf( client, "<td>Flags<td>\n" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
744 for( i = 0; i < 16; i++ ) |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
745 { |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
746 switch( ifp->ifa_flags & (1<<i) ) |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
747 { |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
748 default: break; |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
749 case IFF_UP: fputs( " UP", client ); break; |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
750 case IFF_BROADCAST: fputs( " BROADCAST", client ); break; |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
751 case IFF_DEBUG: fputs( " DEBUG", client ); break; |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
752 case IFF_LOOPBACK: fputs( " LOOPBACK", client ); break; |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
753 case IFF_PROMISC: fputs( " PROMISCUOUS", client ); break; |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
754 case IFF_RUNNING: fputs( " RUNNING", client ); break; |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
755 case IFF_SIMPLEX: fputs( " SIMPLEX", client ); break; |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
756 case IFF_MULTICAST: fputs( " MULTICAST", client ); break; |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
757 } |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
758 } |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
759 html_table_row_end( client ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
760 |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
761 html_table_row_begin(client, "" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
762 getnameinfo(ifp->ifa_addr, sizeof(*ifp->ifa_addr), |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
763 addr, sizeof(addr), NULL, 0, NI_NUMERICHOST); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
764 fprintf( client, "<td>Address<td>%s\n", addr); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
765 html_table_row_end( client ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
766 |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
767 if (ifp->ifa_netmask) |
| 468 | 768 { |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
769 html_table_row_begin(client, "" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
770 getnameinfo(ifp->ifa_netmask, sizeof(*ifp->ifa_netmask), |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
771 addr, sizeof(addr), NULL, 0, NI_NUMERICHOST); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
772 fprintf( client, "<td>Mask<td>%s\n", addr); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
773 html_table_row_end( client ); |
| 468 | 774 } |
| 775 | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
776 if (ifp->ifa_broadaddr) |
| 468 | 777 { |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
778 html_table_row_begin(client, "" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
779 getnameinfo(ifp->ifa_broadaddr, sizeof(*ifp->ifa_broadaddr), |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
780 addr, sizeof(addr), NULL, 0, NI_NUMERICHOST); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
781 fprintf( client, "<td>Broadcast<td>%s\n", addr); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
782 html_table_row_end( client ); |
| 468 | 783 } |
| 784 } | |
| 785 html_table_end( client ); | |
| 786 } | |
| 787 html_table_row_end( client ); | |
| 788 | |
| 789 } | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
790 ifp = ifp->ifa_next; |
| 468 | 791 } |
| 792 } | |
| 793 html_table_end( client ); | |
| 794 | |
| 795 /* Now the protocols. For each of the main protocols: IP, | |
| 796 * ICMP, UDP, TCP print a table of useful information derived | |
| 797 * from the in-kernel data structures. Note that this only | |
| 798 * works for the BSD stacks. | |
| 799 */ | |
| 800 | |
| 801 html_para_begin( client, "" ); | |
| 802 html_heading(client, 3, "Protocols" ); | |
| 803 | |
| 804 html_para_begin( client, "" ); | |
| 805 html_table_begin( client, "border"); | |
| 806 { | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
807 html_table_header( client, "IPv4", "" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
808 #ifdef CYGPKG_NET_INET6 |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
809 html_table_header( client, "IPv6", "" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
810 #endif |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
811 html_table_header( client, "ICMPv4", "" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
812 #ifdef CYGPKG_NET_INET6 |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
813 html_table_header( client, "ICMPv6", "" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
814 #endif |
| 468 | 815 html_table_header( client, "UDP", "" ); |
| 816 html_table_header( client, "TCP", "" ); | |
| 817 | |
| 818 html_table_row_begin(client, "" ); | |
| 819 { | |
| 820 html_table_data_begin( client, "valign=\"top\"" ); | |
| 821 html_table_begin( client, "" ); | |
| 822 { | |
| 823 | |
| 824 fprintf( client, "<tr><td><b>%s:</b><td></tr>\n", "Received" ); | |
| 825 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Total", | |
| 826 ipstat.ips_total ); | |
| 827 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Bad", | |
| 828 ipstat.ips_badsum+ | |
| 829 ipstat.ips_tooshort+ | |
| 830 ipstat.ips_toosmall+ | |
| 831 ipstat.ips_badhlen+ | |
| 832 ipstat.ips_badlen+ | |
| 833 ipstat.ips_noproto+ | |
| 834 ipstat.ips_toolong | |
| 835 ); | |
| 836 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Reassembled", | |
| 837 ipstat.ips_reassembled ); | |
| 838 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Delivered", | |
| 839 ipstat.ips_delivered ); | |
| 840 | |
| 841 fprintf( client, "<tr><td><b>%s:</b><td></tr>\n", "Sent" ); | |
| 842 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Total", | |
| 843 ipstat.ips_localout ); | |
| 844 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Raw", | |
| 845 ipstat.ips_rawout ); | |
| 846 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Fragmented", | |
| 847 ipstat.ips_fragmented ); | |
| 848 } | |
| 849 html_table_end( client ); | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
850 #ifdef CYGPKG_NET_INET6 |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
851 html_table_data_begin( client, "valign=\"top\"" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
852 html_table_begin( client, "" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
853 { |
| 468 | 854 |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
855 fprintf( client, "<tr><td><b>%s:</b><td></tr>\n", "Received" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
856 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "Total", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
857 ip6stat.ip6s_total ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
858 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "Bad", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
859 ip6stat.ip6s_tooshort+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
860 ip6stat.ip6s_toosmall |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
861 ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
862 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "Reassembled", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
863 ip6stat.ip6s_reassembled ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
864 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "Delivered", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
865 ip6stat.ip6s_delivered ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
866 |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
867 fprintf( client, "<tr><td><b>%s:</b><td></tr>\n", "Sent" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
868 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "Total", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
869 ip6stat.ip6s_localout ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
870 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "Raw", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
871 ip6stat.ip6s_rawout ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
872 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "Fragmented", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
873 ip6stat.ip6s_fragmented ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
874 } |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
875 html_table_end( client ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
876 #endif |
| 468 | 877 html_table_data_begin( client, "valign=\"top\"" ); |
| 878 html_table_begin( client, "" ); | |
| 879 { | |
| 880 | |
| 881 fprintf( client, "<tr><td><b>%s:</b><td></tr>\n", "Received" ); | |
| 882 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "ECHO", | |
| 883 icmpstat.icps_inhist[ICMP_ECHO] ); | |
| 884 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "ECHO REPLY", | |
| 885 icmpstat.icps_inhist[ICMP_ECHOREPLY] ); | |
| 886 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "UNREACH", | |
| 887 icmpstat.icps_inhist[ICMP_UNREACH] ); | |
| 888 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "REDIRECT", | |
| 889 icmpstat.icps_inhist[ICMP_REDIRECT] ); | |
| 890 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Other", | |
| 891 icmpstat.icps_inhist[ICMP_SOURCEQUENCH]+ | |
| 892 icmpstat.icps_inhist[ICMP_ROUTERADVERT]+ | |
| 893 icmpstat.icps_inhist[ICMP_ROUTERSOLICIT]+ | |
| 894 icmpstat.icps_inhist[ICMP_TIMXCEED]+ | |
| 895 icmpstat.icps_inhist[ICMP_PARAMPROB]+ | |
| 896 icmpstat.icps_inhist[ICMP_TSTAMP]+ | |
| 897 icmpstat.icps_inhist[ICMP_TSTAMPREPLY]+ | |
| 898 icmpstat.icps_inhist[ICMP_IREQ]+ | |
| 899 icmpstat.icps_inhist[ICMP_IREQREPLY]+ | |
| 900 icmpstat.icps_inhist[ICMP_MASKREQ]+ | |
| 901 icmpstat.icps_inhist[ICMP_MASKREPLY] | |
| 902 ); | |
| 903 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Bad", | |
| 904 icmpstat.icps_badcode+ | |
| 905 icmpstat.icps_tooshort+ | |
| 906 icmpstat.icps_checksum+ | |
| 907 icmpstat.icps_badlen+ | |
| 908 icmpstat.icps_bmcastecho | |
| 909 ); | |
| 910 | |
| 911 fprintf( client, "<tr><td><b>%s:</b><td></tr>\n", "Sent" ); | |
| 912 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "ECHO", | |
| 913 icmpstat.icps_outhist[ICMP_ECHO] ); | |
| 914 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "ECHO REPLY", | |
| 915 icmpstat.icps_outhist[ICMP_ECHOREPLY] ); | |
| 916 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "UNREACH", | |
| 917 icmpstat.icps_outhist[ICMP_UNREACH] ); | |
| 918 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "REDIRECT", | |
| 919 icmpstat.icps_outhist[ICMP_REDIRECT] ); | |
| 920 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Other", | |
| 921 icmpstat.icps_inhist[ICMP_SOURCEQUENCH]+ | |
| 922 icmpstat.icps_outhist[ICMP_ROUTERADVERT]+ | |
| 923 icmpstat.icps_outhist[ICMP_ROUTERSOLICIT]+ | |
| 924 icmpstat.icps_outhist[ICMP_TIMXCEED]+ | |
| 925 icmpstat.icps_outhist[ICMP_PARAMPROB]+ | |
| 926 icmpstat.icps_outhist[ICMP_TSTAMP]+ | |
| 927 icmpstat.icps_outhist[ICMP_TSTAMPREPLY]+ | |
| 928 icmpstat.icps_outhist[ICMP_IREQ]+ | |
| 929 icmpstat.icps_outhist[ICMP_IREQREPLY]+ | |
| 930 icmpstat.icps_outhist[ICMP_MASKREQ]+ | |
| 931 icmpstat.icps_outhist[ICMP_MASKREPLY] | |
| 932 ); | |
| 933 } | |
| 934 html_table_end( client ); | |
| 935 | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
936 #ifdef CYGPKG_NET_INET6 |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
937 html_table_data_begin( client, "valign=\"top\"" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
938 html_table_begin( client, "" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
939 { |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
940 |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
941 fprintf( client, "<tr><td><b>%s:</b><td></tr>\n", "Received" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
942 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "ECHO", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
943 icmp6stat.icp6s_inhist[ICMP_ECHO] ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
944 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "ECHO REPLY", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
945 icmp6stat.icp6s_inhist[ICMP_ECHOREPLY] ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
946 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "UNREACH", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
947 icmp6stat.icp6s_inhist[ICMP_UNREACH] ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
948 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "REDIRECT", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
949 icmp6stat.icp6s_inhist[ICMP_REDIRECT] ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
950 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "Other", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
951 icmp6stat.icp6s_inhist[ICMP_SOURCEQUENCH]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
952 icmp6stat.icp6s_inhist[ICMP_ROUTERADVERT]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
953 icmp6stat.icp6s_inhist[ICMP_ROUTERSOLICIT]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
954 icmp6stat.icp6s_inhist[ICMP_TIMXCEED]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
955 icmp6stat.icp6s_inhist[ICMP_PARAMPROB]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
956 icmp6stat.icp6s_inhist[ICMP_TSTAMP]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
957 icmp6stat.icp6s_inhist[ICMP_TSTAMPREPLY]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
958 icmp6stat.icp6s_inhist[ICMP_IREQ]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
959 icmp6stat.icp6s_inhist[ICMP_IREQREPLY]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
960 icmp6stat.icp6s_inhist[ICMP_MASKREQ]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
961 icmp6stat.icp6s_inhist[ICMP_MASKREPLY] |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
962 ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
963 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "Bad", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
964 icmp6stat.icp6s_badcode+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
965 icmp6stat.icp6s_tooshort+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
966 icmp6stat.icp6s_checksum+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
967 icmp6stat.icp6s_badlen |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
968 ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
969 |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
970 fprintf( client, "<tr><td><b>%s:</b><td></tr>\n", "Sent" ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
971 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "ECHO", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
972 icmp6stat.icp6s_outhist[ICMP_ECHO] ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
973 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "ECHO REPLY", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
974 icmp6stat.icp6s_outhist[ICMP_ECHOREPLY] ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
975 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "UNREACH", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
976 icmp6stat.icp6s_outhist[ICMP_UNREACH] ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
977 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "REDIRECT", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
978 icmp6stat.icp6s_outhist[ICMP_REDIRECT] ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
979 fprintf( client, "<tr><td>%s<td>%lld</tr>\n", "Other", |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
980 icmp6stat.icp6s_inhist[ICMP_SOURCEQUENCH]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
981 icmp6stat.icp6s_outhist[ICMP_ROUTERADVERT]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
982 icmp6stat.icp6s_outhist[ICMP_ROUTERSOLICIT]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
983 icmp6stat.icp6s_outhist[ICMP_TIMXCEED]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
984 icmp6stat.icp6s_outhist[ICMP_PARAMPROB]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
985 icmp6stat.icp6s_outhist[ICMP_TSTAMP]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
986 icmp6stat.icp6s_outhist[ICMP_TSTAMPREPLY]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
987 icmp6stat.icp6s_outhist[ICMP_IREQ]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
988 icmp6stat.icp6s_outhist[ICMP_IREQREPLY]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
989 icmp6stat.icp6s_outhist[ICMP_MASKREQ]+ |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
990 icmp6stat.icp6s_outhist[ICMP_MASKREPLY] |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
991 ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
992 } |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
993 html_table_end( client ); |
|
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
994 #endif |
| 468 | 995 html_table_data_begin( client, "valign=\"top\"" ); |
| 996 html_table_begin( client, "" ); | |
| 997 { | |
| 998 | |
| 999 fprintf( client, "<tr><td><b>%s:</b><td></tr>\n", "Received" ); | |
| 1000 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Total", | |
| 1001 udpstat.udps_ipackets ); | |
| 1002 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Bad", | |
| 1003 udpstat.udps_hdrops+ | |
| 1004 udpstat.udps_badsum+ | |
| 1005 udpstat.udps_badlen+ | |
| 1006 udpstat.udps_noport+ | |
| 1007 udpstat.udps_noportbcast+ | |
| 1008 udpstat.udps_fullsock | |
| 1009 ); | |
| 1010 fprintf( client, "<tr><td><b>%s:</b><td></tr>\n", "Sent" ); | |
| 1011 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Total", | |
| 1012 udpstat.udps_opackets ); | |
| 1013 } | |
| 1014 html_table_end( client ); | |
| 1015 | |
| 1016 html_table_data_begin( client, "valign=\"top\"" ); | |
| 1017 html_table_begin( client, "" ); | |
| 1018 { | |
| 1019 | |
| 1020 fprintf( client, "<tr><td><b>%s:</b><td></tr>\n", "Connections" ); | |
| 1021 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Initiated", | |
| 1022 tcpstat.tcps_connattempt ); | |
| 1023 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Accepted", | |
| 1024 tcpstat.tcps_accepts ); | |
| 1025 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Established", | |
| 1026 tcpstat.tcps_connects ); | |
| 1027 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Closed", | |
| 1028 tcpstat.tcps_closed ); | |
| 1029 | |
| 1030 fprintf( client, "<tr><td><b>%s:</b><td></tr>\n", "Received" ); | |
| 1031 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Packets", | |
| 1032 tcpstat.tcps_rcvtotal ); | |
| 1033 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Data Packets", | |
| 1034 tcpstat.tcps_rcvpack ); | |
| 1035 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Bytes", | |
| 1036 tcpstat.tcps_rcvbyte ); | |
| 1037 | |
| 1038 fprintf( client, "<tr><td><b>%s:</b><td></tr>\n", "Sent" ); | |
| 1039 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Packets", | |
| 1040 tcpstat.tcps_sndtotal ); | |
| 1041 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Data Packets", | |
| 1042 tcpstat.tcps_sndpack ); | |
| 1043 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Bytes", | |
| 1044 tcpstat.tcps_sndbyte ); | |
| 1045 | |
| 1046 | |
| 1047 } | |
| 1048 html_table_end( client ); | |
| 1049 | |
| 1050 | |
| 1051 } | |
| 1052 html_table_row_end( client ); | |
| 1053 | |
| 1054 } | |
| 1055 html_table_end( client ); | |
| 1056 | |
|
831
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1057 html_para_begin( client, "" ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1058 html_heading(client, 3, "Mbufs" ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1059 |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1060 html_table_begin( client, "border" ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1061 { |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1062 html_table_header( client, "Summary", "" ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1063 html_table_header( client, "Types", "" ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1064 |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1065 html_table_row_begin( client, "" ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1066 { |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1067 html_table_data_begin( client, "valign=\"top\"" ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1068 html_table_begin( client, "" ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1069 { |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1070 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Mbufs", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1071 mbstat.m_mbufs ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1072 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Clusters", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1073 mbstat.m_clusters ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1074 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Free Clusters", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1075 mbstat.m_clfree ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1076 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Drops", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1077 mbstat.m_drops ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1078 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Waits", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1079 mbstat.m_wait ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1080 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Drains", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1081 mbstat.m_drain ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1082 #if defined(CYGPKG_NET_FREEBSD_STACK) |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1083 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Copy Fails", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1084 mbstat.m_mcfail ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1085 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Pullup Fails", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1086 mbstat.m_mpfail ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1087 #endif |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1088 |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1089 } |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1090 html_table_end( client ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1091 |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1092 html_table_data_begin( client, "valign=\"top\"" ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1093 html_table_begin( client, "" ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1094 { |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1095 u_long *mtypes; |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1096 #if defined(CYGPKG_NET_FREEBSD_STACK) |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1097 mtypes = mbtypes; |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1098 #else |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1099 mtypes = mbstat.m_mtypes; |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1100 #endif |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1101 |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1102 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "FREE", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1103 mtypes[MT_FREE] ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1104 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "DATA", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1105 mtypes[MT_DATA] ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1106 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "HEADER", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1107 mtypes[MT_HEADER] ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1108 #if !defined(CYGPKG_NET_FREEBSD_STACK) |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1109 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "SOCKET", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1110 mtypes[MT_SOCKET] ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1111 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "PCB", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1112 mtypes[MT_PCB] ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1113 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "RTABLE", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1114 mtypes[MT_RTABLE] ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1115 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "HTABLE", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1116 mtypes[MT_HTABLE] ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1117 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "ATABLE", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1118 mtypes[MT_ATABLE] ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1119 #endif |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1120 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "SONAME", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1121 mtypes[MT_SONAME] ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1122 #if !defined(CYGPKG_NET_FREEBSD_STACK) |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1123 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "SOOPTS", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1124 mtypes[MT_SOOPTS] ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1125 #endif |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1126 fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "FTABLE", |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1127 mtypes[MT_FTABLE] ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1128 |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1129 /* Ignore the rest for now... */ |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1130 |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1131 } |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1132 html_table_end( client ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1133 |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1134 } |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1135 html_table_row_end( client ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1136 |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1137 } |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1138 html_table_end( client ); |
|
0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
nickg
parents:
468
diff
changeset
|
1139 |
| 468 | 1140 |
| 1141 draw_navbar(client); | |
| 1142 } | |
| 1143 html_body_end(client); | |
| 1144 | |
| 1145 html_end(client); | |
| 1146 | |
|
1008
4ca8a5f30c03
* src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
831
diff
changeset
|
1147 freeifaddrs(iflist); |
| 468 | 1148 return 1; |
| 1149 | |
| 1150 } | |
| 1151 | |
| 1152 CYG_HTTPD_TABLE_ENTRY( cyg_monitor_network_entry, | |
| 1153 "/monitor/network.htm*", | |
| 1154 cyg_monitor_network, | |
| 1155 NULL ); | |
| 1156 | |
| 1157 | |
| 1158 /* ================================================================= */ | |
| 1159 /* Instrumentation Monitor | |
| 1160 * | |
| 1161 * If the CYGPKG_KERNEL_INSTRUMENT option is set, we generate a table | |
| 1162 * showing the current instrumentation buffer. If the FLAGS option is | |
| 1163 * enabled we also print a table giving control of the flags. | |
| 1164 * | |
| 1165 */ | |
| 1166 | |
| 1167 #ifdef CYGPKG_KERNEL_INSTRUMENT | |
| 1168 | |
| 1169 /* Instrumentation record. */ | |
| 1170 struct Instrument_Record | |
| 1171 { | |
| 1172 CYG_WORD16 type; // record type | |
| 1173 CYG_WORD16 thread; // current thread id | |
| 1174 CYG_WORD timestamp; // 32 bit timestamp | |
| 1175 CYG_WORD arg1; // first arg | |
| 1176 CYG_WORD arg2; // second arg | |
| 1177 }; | |
| 1178 typedef struct Instrument_Record Instrument_Record; | |
| 1179 | |
| 1180 /* Instrumentation variables, these live in the | |
| 1181 * instrumentation files in the kernel | |
| 1182 */ | |
| 1183 __externC Instrument_Record *instrument_buffer_pointer; | |
| 1184 __externC Instrument_Record instrument_buffer[]; | |
| 1185 __externC cyg_uint32 instrument_buffer_size; | |
| 1186 | |
| 1187 #if defined(CYGDBG_KERNEL_INSTRUMENT_FLAGS) && \ | |
| 1188 defined(CYGDBG_KERNEL_INSTRUMENT_MSGS) | |
| 1189 | |
| 1190 static cyg_uint32 instrument_flags[(CYG_INSTRUMENT_CLASS_MAX>>8)+1]; | |
| 1191 | |
| 1192 #endif | |
| 1193 | |
| 1194 static char cyg_monitor_instrument_blurb1[] = | |
|
1053
657f409c5dfe
* src/httpd.c: Fixed a problem with closing the client socket --
nickg
parents:
1008
diff
changeset
|
1195 "<p>Use the checkboxes to enable the events to be recorded. Click" |
|
657f409c5dfe
* src/httpd.c: Fixed a problem with closing the client socket --
nickg
parents:
1008
diff
changeset
|
1196 "the <em>Submit</em> button to start recording. Click the <em>Clear</em>" |
|
657f409c5dfe
* src/httpd.c: Fixed a problem with closing the client socket --
nickg
parents:
1008
diff
changeset
|
1197 "button to clear all instrumentation and to stop recording." |
| 468 | 1198 ; |
| 1199 | |
| 1200 static cyg_bool cyg_monitor_instrument( FILE * client, char *filename, | |
| 1201 char *formdata, void *arg ) | |
| 1202 { | |
| 1203 | |
| 1204 #if defined(CYGDBG_KERNEL_INSTRUMENT_FLAGS) && \ | |
| 1205 defined(CYGDBG_KERNEL_INSTRUMENT_MSGS) | |
| 1206 | |
| 1207 /* Disable all instrumentation while we generate the page. | |
| 1208 * Otherwise we could swamp the information we are really after. | |
| 1209 */ | |
| 1210 | |
| 1211 cyg_scheduler_lock(); | |
| 1212 { | |
| 1213 struct instrument_desc_s *id = instrument_desc; | |
| 1214 CYG_WORD cl = 0, ev = 0; | |
| 1215 | |
| 1216 for( ; id->msg != 0; id++ ) | |
| 1217 { | |
| 1218 if( id->num > 0xff ) | |
| 1219 { | |
| 1220 cl = id->num>>8; | |
| 1221 instrument_flags[cl] = 0; | |
| 1222 } | |
| 1223 else | |
| 1224 { | |
| 1225 ev = id->num; | |
| 1226 cyg_instrument_disable( cl<<8, ev ); | |
| 1227 } | |
| 1228 } | |
| 1229 } | |
| 1230 cyg_scheduler_unlock(); | |
| 1231 | |
| 1232 #endif | |
| 1233 | |
| 1234 /* If we have some form data, deal with it. | |
| 1235 */ | |
| 1236 if( formdata != NULL ) | |
| 1237 { | |
| 1238 char *list[40]; | |
| 1239 | |
| 1240 cyg_formdata_parse( formdata, list, sizeof(list)/sizeof(*list) ); | |
| 1241 | |
| 1242 #if defined(CYGDBG_KERNEL_INSTRUMENT_FLAGS) && \ | |
| 1243 defined(CYGDBG_KERNEL_INSTRUMENT_MSGS) | |
| 1244 | |
| 1245 if( cyg_formlist_find( list, "clear" ) != NULL ) | |
| 1246 { | |
| 1247 /* If the clear button is set, then disable all instrumentation flags. | |
| 1248 */ | |
| 1249 int i; | |
| 1250 for( i = 0; i < sizeof(instrument_flags)/sizeof(*instrument_flags); i++ ) | |
| 1251 instrument_flags[i] = 0; | |
| 1252 } | |
| 1253 else | |
| 1254 { | |
| 1255 /* Otherwise all the set checkboxes have been reported to | |
| 1256 * us in the form of class=event inputs. | |
| 1257 */ | |
| 1258 char **p; | |
| 1259 for( p = list; *p != NULL; p++ ) | |
| 1260 { | |
| 1261 int cl,ev; | |
| 1262 if( sscanf( *p, "%02x=%02x", &cl, &ev ) == 2 ) | |
| 1263 instrument_flags[cl] |= 1<<ev; | |
| 1264 } | |
| 1265 } | |
| 1266 #endif | |
| 1267 | |
| 1268 /* If the cleartable button has been pressed, clear all the | |
| 1269 * table entries. | |
| 1270 */ | |
| 1271 if( cyg_formlist_find( list, "cleartable" ) != NULL ) | |
| 1272 { | |
| 1273 cyg_scheduler_lock(); | |
| 1274 { | |
| 1275 Instrument_Record *ibp = instrument_buffer_pointer; | |
| 1276 do | |
| 1277 { | |
| 1278 ibp->type = 0; | |
| 1279 ibp++; | |
| 1280 if( ibp == &instrument_buffer[instrument_buffer_size] ) | |
| 1281 ibp = instrument_buffer; | |
| 1282 | |
| 1283 } while( ibp != instrument_buffer_pointer ); | |
| 1284 | |
| 1285 } | |
| 1286 cyg_scheduler_unlock(); | |
| 1287 } | |
| 1288 } | |
| 1289 | |
| 1290 /* Now start generating the HTML page. | |
| 1291 */ | |
| 1292 html_begin(client); | |
| 1293 | |
| 1294 html_head(client,"eCos Instrumentation Buffer", ""); | |
| 1295 | |
| 1296 html_body_begin(client,""); | |
| 1297 { | |
| 1298 html_heading(client, 2, "Instrumentation Buffer" ); | |
| 1299 | |
| 1300 html_form_begin( client, "/monitor/instrument.html", "" ); | |
| 1301 | |
| 1302 #if defined(CYGDBG_KERNEL_INSTRUMENT_FLAGS) && \ | |
| 1303 defined(CYGDBG_KERNEL_INSTRUMENT_MSGS) | |
| 1304 | |
| 1305 /* If we have the flags enabled, generate a table showing all | |
| 1306 * the flag names with a checkbox against each. | |
| 1307 */ | |
| 1308 | |
| 1309 fputs( cyg_monitor_instrument_blurb1, client ); | |
| 1310 | |
| 1311 html_para_begin( client, "" ); | |
| 1312 /* Add submit,clear and reset buttons */ | |
| 1313 html_form_input(client, "submit", "submit", "Submit", ""); | |
| 1314 html_form_input(client, "submit", "clear", "Clear", ""); | |
| 1315 html_form_input(client, "reset", "reset", "Reset", ""); | |
| 1316 | |
| 1317 html_table_begin( client, "border width=100%" ); | |
| 1318 { | |
| 1319 struct instrument_desc_s *id = instrument_desc; | |
| 1320 CYG_WORD cl = 0, ev = 0; | |
| 1321 int clc = 0; | |
| 1322 char class[5], event[5]; | |
| 1323 | |
| 1324 html_table_row_begin( client, "" ); | |
| 1325 | |
| 1326 for( ; id->msg != 0; id++ ) | |
| 1327 { | |
| 1328 if( id->num > 0xff ) | |
| 1329 { | |
| 1330 cl = id->num; | |
| 1331 sprintf( class, "%02x", cl>>8 ); | |
| 1332 clc = 0; | |
| 1333 | |
| 1334 if( id != instrument_desc ) | |
| 1335 { | |
| 1336 html_table_end( client ); | |
| 1337 html_table_row_end( client ); | |
| 1338 html_table_row_begin( client, "" ); | |
| 1339 } | |
| 1340 | |
| 1341 html_table_data_begin( client, "valign=\"top\" width=100%" ); | |
| 1342 html_table_begin( client, "width=100%" ); | |
| 1343 } | |
| 1344 else | |
| 1345 { | |
| 1346 ev = id->num; | |
| 1347 sprintf( event, "%02x", ev ); | |
| 1348 | |
| 1349 if( (clc%4) == 0 ) | |
| 1350 { | |
| 1351 if( clc != 0 ) | |
| 1352 html_table_row_end( client ); | |
| 1353 | |
| 1354 html_table_row_begin( client, "" ); | |
| 1355 } | |
| 1356 clc++; | |
| 1357 html_table_data_begin( client, "width=25%" ); | |
| 1358 html_form_input_checkbox( client, class, event, | |
| 1359 instrument_flags[cl>>8] & (1<<ev) ); | |
| 1360 fputs( id->msg, client ); | |
| 1361 } | |
| 1362 } | |
| 1363 html_table_end( client ); | |
| 1364 html_table_row_end( client ); | |
| 1365 } | |
| 1366 html_table_end( client ); | |
| 1367 | |
| 1368 /* Add submit,clear and reset buttons */ | |
| 1369 html_form_input(client, "submit", "submit", "Submit", ""); | |
| 1370 html_form_input(client, "submit", "clear", "Clear", ""); | |
| 1371 html_form_input(client, "reset", "reset", "Reset", ""); | |
| 1372 | |
| 1373 #endif | |
| 1374 | |
| 1375 html_para_begin( client, "" ); | |
| 1376 | |
| 1377 html_form_input(client, "submit", "cleartable", "Clear Table", ""); | |
| 1378 | |
| 1379 | |
| 1380 /* | |
| 1381 */ | |
| 1382 | |
| 1383 html_table_begin( client, "border" ); | |
| 1384 { | |
| 1385 Instrument_Record *ibp = instrument_buffer_pointer; | |
| 1386 | |
| 1387 html_table_header( client, "TIME", "" ); | |
| 1388 html_table_header( client, "THREAD", "" ); | |
| 1389 html_table_header( client, "EVENT", "" ); | |
| 1390 html_table_header( client, "ARG1", "" ); | |
| 1391 html_table_header( client, "ARG2", "" ); | |
| 1392 | |
| 1393 do | |
| 1394 { | |
| 1395 if( ibp->type != 0 ) | |
| 1396 { | |
| 1397 html_table_row_begin(client, "" ); | |
| 1398 { | |
| 1399 cyg_handle_t thread = cyg_thread_find(ibp->thread); | |
| 1400 cyg_thread_info info; | |
| 1401 | |
| 1402 html_table_data_begin( client, "" ); | |
| 1403 fprintf( client, "%08x",ibp->timestamp); | |
| 1404 html_table_data_begin( client, "" ); | |
| 1405 if( thread != 0 && | |
| 1406 cyg_thread_get_info( thread, ibp->thread, &info ) && | |
| 1407 info.name != NULL ) | |
| 1408 fputs( info.name, client ); | |
| 1409 else fprintf( client, "[%04x]", ibp->thread); | |
| 1410 html_table_data_begin( client, "" ); | |
| 1411 #if defined(CYGDBG_KERNEL_INSTRUMENT_MSGS) | |
| 1412 fprintf( client, "%s", cyg_instrument_msg(ibp->type)); | |
| 1413 #else | |
| 1414 fprintf( client, "%04x", ibp->type ); | |
| 1415 #endif | |
| 1416 html_table_data_begin( client, "" ); | |
| 1417 fprintf( client, "%08x", ibp->arg1); | |
| 1418 html_table_data_begin( client, "" ); | |
| 1419 fprintf( client, "%08x", ibp->arg2); | |
| 1420 } | |
| 1421 html_table_row_end( client ); | |
| 1422 } | |
| 1423 ibp++; | |
| 1424 if( ibp == &instrument_buffer[instrument_buffer_size] ) | |
| 1425 ibp = instrument_buffer; | |
| 1426 | |
| 1427 } while( ibp != instrument_buffer_pointer ); | |
| 1428 } | |
| 1429 html_table_end( client ); | |
| 1430 | |
| 1431 html_para_begin( client, "" ); | |
| 1432 | |
| 1433 html_form_input(client, "submit", "cleartable", "Clear Table", ""); | |
| 1434 | |
| 1435 html_form_end( client ); | |
| 1436 | |
| 1437 draw_navbar(client); | |
| 1438 } | |
| 1439 html_body_end(client); | |
| 1440 | |
| 1441 html_end(client); | |
| 1442 | |
| 1443 | |
| 1444 #if defined(CYGDBG_KERNEL_INSTRUMENT_FLAGS) && \ | |
| 1445 defined(CYGDBG_KERNEL_INSTRUMENT_MSGS) | |
| 1446 | |
| 1447 /* | |
| 1448 */ | |
| 1449 | |
| 1450 cyg_scheduler_lock(); | |
| 1451 { | |
| 1452 struct instrument_desc_s *id = instrument_desc; | |
| 1453 CYG_WORD cl = 0, ev = 0; | |
| 1454 | |
| 1455 for( ; id->msg != 0; id++ ) | |
| 1456 { | |
| 1457 if( id->num > 0xff ) | |
| 1458 cl = id->num>>8; | |
| 1459 else | |
| 1460 { | |
| 1461 ev = id->num; | |
| 1462 if( (instrument_flags[cl] & (1<<ev)) != 0 ) | |
| 1463 cyg_instrument_enable( cl<<8, ev ); | |
| 1464 } | |
| 1465 } | |
| 1466 } | |
| 1467 cyg_scheduler_unlock(); | |
| 1468 #endif | |
| 1469 | |
| 1470 return true; | |
| 1471 } | |
| 1472 | |
| 1473 CYG_HTTPD_TABLE_ENTRY( cyg_monitor_instrument_entry, | |
| 1474 "/monitor/instrument.htm*", | |
| 1475 cyg_monitor_instrument, | |
| 1476 NULL ); | |
| 1477 | |
| 1478 #endif | |
| 1479 | |
| 1480 /* ================================================================= */ | |
| 1481 /* eCos Logo | |
| 1482 * | |
| 1483 * Define the logo as a byte array, and then define the data structure | |
| 1484 * and table entry to allow it to be fetched by the client. | |
| 1485 */ | |
| 1486 | |
| 1487 static cyg_uint8 ecos_logo_gif[] = { | |
| 1488 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x6f, 0x00, 0x23, 0x00, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1489 0xff, 0xff, 0xff, 0xea, 0x19, 0x00, 0xcc, 0x00, 0x00, 0xfd, 0xfd, 0xfd, 0x83, 0x00, 0x00, 0xf6, | |
| 1490 0xf6, 0xf6, 0x2f, 0x2f, 0x2f, 0xef, 0xef, 0xef, 0x19, 0x00, 0x19, 0x45, 0x45, 0x45, 0xbb, 0xbb, | |
| 1491 0xbb, 0xe2, 0x3e, 0x3e, 0xe8, 0xbb, 0xd3, 0x3e, 0x3e, 0x3e, 0xfb, 0xfb, 0xfb, 0xbe, 0xbe, 0xbe, | |
| 1492 0xf1, 0xed, 0xed, 0xe5, 0x7b, 0x8e, 0xe5, 0x6b, 0x7b, 0xcc, 0xcc, 0xcc, 0x98, 0x95, 0x98, 0xc6, | |
| 1493 0xc3, 0xc6, 0x19, 0x19, 0x19, 0xf1, 0xf1, 0xf1, 0x98, 0x98, 0x98, 0xd6, 0xd3, 0xd6, 0x83, 0x83, | |
| 1494 0x83, 0xde, 0xde, 0xde, 0xe5, 0x25, 0x25, 0x73, 0x6f, 0x73, 0xea, 0xea, 0xea, 0xe5, 0x8e, 0xa2, | |
| 1495 0xe8, 0xe8, 0xe8, 0x7f, 0x7b, 0x7f, 0xe2, 0x56, 0x66, 0x8b, 0x8b, 0x8b, 0x19, 0x19, 0x00, 0xf8, | |
| 1496 0xf8, 0xf8, 0x73, 0x73, 0x73, 0xd3, 0xd1, 0xd1, 0x9c, 0x9c, 0x9c, 0x50, 0x50, 0x50, 0xef, 0xce, | |
| 1497 0xea, 0x92, 0x8e, 0x92, 0x6f, 0x6f, 0x6f, 0xe2, 0x2f, 0x2f, 0x61, 0x61, 0x61, 0xe5, 0xe5, 0xe5, | |
| 1498 0xe8, 0x9f, 0xb8, 0x37, 0x2f, 0x37, 0x66, 0x66, 0x66, 0xe2, 0x4b, 0x50, 0x56, 0x50, 0x56, 0xa9, | |
| 1499 0xa5, 0xa9, 0xce, 0xce, 0xce, 0x56, 0x50, 0x50, 0xd9, 0xd9, 0xd9, 0x77, 0x73, 0x77, 0x25, 0x25, | |
| 1500 0x2f, 0x6b, 0x6b, 0x6b, 0x9f, 0x9f, 0x9f, 0x87, 0x83, 0x87, 0x3e, 0x37, 0x37, 0xf4, 0xf4, 0xf4, | |
| 1501 0x25, 0x25, 0x25, 0xc1, 0xc1, 0xc1, 0x83, 0x7f, 0x83, 0xe5, 0xe2, 0xe2, 0x4b, 0x45, 0x4b, 0xd1, | |
| 1502 0xce, 0xd1, 0xaf, 0xac, 0xaf, 0xcc, 0xc9, 0xcc, 0x5b, 0x56, 0x5b, 0xdb, 0xd9, 0xdb, 0x66, 0x61, | |
| 1503 0x66, 0xe2, 0xe2, 0xe2, 0xb8, 0xb5, 0xb8, 0x2f, 0x25, 0x2f, 0xc3, 0xc1, 0xc3, 0xe0, 0xde, 0xe0, | |
| 1504 0xd3, 0xd3, 0xd3, 0xde, 0xdb, 0xde, 0xac, 0xac, 0xac, 0xce, 0xcc, 0xce, 0x77, 0x6f, 0x73, 0x4b, | |
| 1505 0x45, 0x45, 0xc9, 0xc6, 0xc9, 0x45, 0x3e, 0x45, 0x61, 0x5b, 0x61, 0xb5, 0xb2, 0xb5, 0x3e, 0x00, | |
| 1506 0x00, 0x8b, 0x87, 0x87, 0x95, 0x92, 0x95, 0xa2, 0x9f, 0xa2, 0xb8, 0xb8, 0xb8, 0x7b, 0x77, 0x7b, | |
| 1507 0x9c, 0x98, 0x9c, 0x50, 0x4b, 0x50, 0x6f, 0x6b, 0x6f, 0x6b, 0x66, 0x6b, 0xac, 0xa9, 0xac, 0x8e, | |
| 1508 0x8b, 0x8e, 0x8e, 0x00, 0x00, 0xdb, 0xdb, 0xdb, 0xed, 0xed, 0xed, 0x50, 0x4b, 0x4b, 0x3e, 0x37, | |
| 1509 0x3e, 0x95, 0x95, 0x95, 0xa5, 0xa2, 0xa5, 0x9f, 0x9c, 0x9f, 0xc1, 0xbe, 0xbe, 0x2f, 0x25, 0x25, | |
| 1510 0xd3, 0xd1, 0xd3, 0xf4, 0xf1, 0xf4, 0xc6, 0xc6, 0xc6, 0x8e, 0x8e, 0x8e, 0x25, 0x19, 0x19, 0x66, | |
| 1511 0x61, 0x61, 0xb2, 0xaf, 0xb2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1512 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1513 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1514 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1515 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1516 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1517 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1518 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1519 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1520 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1521 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1522 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1523 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1524 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1525 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1526 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1527 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1528 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1529 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1530 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1531 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1532 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1533 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1534 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1535 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 1536 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, | |
| 1537 0x00, 0x00, 0x6f, 0x00, 0x23, 0x00, 0x40, 0x08, 0xff, 0x00, 0x03, 0x08, 0x1c, 0x28, 0x10, 0x41, | |
| 1538 0x8a, 0x17, 0x0e, 0x1c, 0x00, 0x58, 0xc8, 0xb0, 0xa1, 0xc3, 0x87, 0x10, 0x21, 0x12, 0x14, 0x28, | |
| 1539 0xa0, 0xa2, 0xc5, 0x8b, 0x18, 0x33, 0x6a, 0xdc, 0xb8, 0x91, 0x01, 0x83, 0x11, 0x31, 0x26, 0x12, | |
| 1540 0x44, 0x10, 0x91, 0xe1, 0x09, 0x91, 0x28, 0x03, 0x4c, 0xb9, 0x50, 0x72, 0xa1, 0x0a, 0x04, 0x29, | |
| 1541 0x09, 0x72, 0x6c, 0x10, 0x73, 0xe2, 0x88, 0x8d, 0x2e, 0x0c, 0xd4, 0x0c, 0x70, 0x73, 0x63, 0x80, | |
| 1542 0x88, 0x10, 0x76, 0x0a, 0x6d, 0x18, 0x94, 0x60, 0x03, 0x8e, 0x1a, 0x27, 0x4a, 0x40, 0x5a, 0x51, | |
| 1543 0xa9, 0xc5, 0x0e, 0x3b, 0x0d, 0x30, 0x40, 0xca, 0x40, 0x45, 0xc9, 0x14, 0x42, 0x45, 0x72, 0x60, | |
| 1544 0xf9, 0xf0, 0x64, 0xd6, 0x00, 0x19, 0x3b, 0xe8, 0xfc, 0x3a, 0x70, 0xe9, 0x45, 0x10, 0x59, 0x0d, | |
| 1545 0x70, 0x9c, 0x30, 0xf1, 0x44, 0xcb, 0xb7, 0x70, 0x4b, 0x8a, 0x64, 0x4a, 0xb7, 0xae, 0x5d, 0x01, | |
| 1546 0x6c, 0x51, 0xbe, 0x88, 0xcb, 0xb7, 0xef, 0xc2, 0xb9, 0x77, 0x03, 0x0b, 0xbe, 0x98, 0x37, 0xc0, | |
| 1547 0x81, 0x88, 0x58, 0x09, 0xde, 0xe0, 0xea, 0xf0, 0xc5, 0x44, 0x0e, 0x0f, 0x13, 0x13, 0x34, 0x30, | |
| 1548 0x21, 0x23, 0xdb, 0x8c, 0x63, 0x07, 0x4a, 0xcd, 0x88, 0xd6, 0xa9, 0x45, 0x9a, 0x04, 0x69, 0x60, | |
| 1549 0xec, 0xc0, 0x94, 0x41, 0x44, 0xaf, 0x03, 0x53, 0xf8, 0xdd, 0xd1, 0x10, 0xf5, 0xc0, 0xa9, 0x76, | |
| 1550 0x41, 0x0f, 0x24, 0xcd, 0xb1, 0xf3, 0xc0, 0x9e, 0x1c, 0x25, 0x88, 0xac, 0xac, 0x91, 0x41, 0x00, | |
| 1551 0xc8, 0x6f, 0x77, 0x48, 0x9e, 0x78, 0xc3, 0xaa, 0xdf, 0x03, 0x27, 0xa6, 0x40, 0x28, 0x2a, 0x13, | |
| 1552 0xe9, 0x08, 0xd9, 0x93, 0x41, 0xd0, 0xe6, 0xd8, 0x41, 0x42, 0x83, 0x15, 0x02, 0x0d, 0x34, 0xe0, | |
| 1553 0x8d, 0x34, 0x73, 0x6a, 0xc6, 0x7e, 0xc3, 0x3b, 0xff, 0x04, 0x3c, 0xb8, 0x3c, 0x5d, 0xdb, 0x03, | |
| 1554 0xb7, 0xc2, 0x7d, 0x91, 0x02, 0xa6, 0xe2, 0x13, 0xe0, 0xf9, 0x22, 0x3f, 0xe1, 0x9a, 0x22, 0xd3, | |
| 1555 0x09, 0xd0, 0x03, 0x18, 0x00, 0x01, 0x9b, 0x2e, 0x48, 0xec, 0x01, 0x34, 0x10, 0xc3, 0x04, 0xd3, | |
| 1556 0x69, 0xa4, 0xd3, 0x5e, 0x11, 0x39, 0x46, 0x96, 0x40, 0x53, 0x44, 0xa4, 0x02, 0x59, 0x1a, 0xe5, | |
| 1557 0x97, 0x95, 0x68, 0x17, 0xd1, 0x80, 0x92, 0x77, 0xfd, 0x69, 0x34, 0x81, 0x83, 0x6d, 0x25, 0xe4, | |
| 1558 0xe1, 0x87, 0x0e, 0x3c, 0x48, 0x90, 0x6a, 0x0c, 0x89, 0x48, 0x10, 0x77, 0x74, 0x85, 0x44, 0x10, | |
| 1559 0x6e, 0x11, 0x4e, 0xd4, 0x9f, 0x84, 0x2b, 0x10, 0x68, 0x97, 0x69, 0x10, 0x31, 0x27, 0xd0, 0x72, | |
| 1560 0x38, 0xe6, 0xa8, 0x63, 0x8e, 0x44, 0x4d, 0x74, 0xd4, 0x5d, 0x13, 0xa1, 0xe8, 0x13, 0x41, 0x31, | |
| 1561 0x60, 0xe4, 0x02, 0x7a, 0x22, 0xa9, 0xd5, 0xd1, 0x61, 0x35, 0x4e, 0x84, 0x80, 0x42, 0x0e, 0x5d, | |
| 1562 0x70, 0x83, 0x48, 0xac, 0xf5, 0xe8, 0xa3, 0x46, 0x2e, 0xac, 0x30, 0x9a, 0x48, 0x45, 0x66, 0xc4, | |
| 1563 0x80, 0x77, 0x01, 0x74, 0x69, 0x91, 0x75, 0x05, 0x0a, 0x80, 0xa4, 0x59, 0x5e, 0x92, 0x54, 0x92, | |
| 1564 0x94, 0x5f, 0x3d, 0xf9, 0x16, 0x09, 0x59, 0x6d, 0x44, 0x03, 0x98, 0x31, 0xfd, 0x48, 0x58, 0x56, | |
| 1565 0x20, 0x20, 0x45, 0x90, 0x71, 0xe2, 0xf5, 0x39, 0xde, 0x44, 0xe6, 0x05, 0xea, 0xdf, 0x4e, 0x1c, | |
| 1566 0x90, 0xe0, 0x40, 0x95, 0x7e, 0xf2, 0x45, 0x9e, 0xa0, 0xe6, 0x75, 0xc0, 0x80, 0x04, 0x00, 0x0a, | |
| 1567 0x85, 0x00, 0x82, 0x89, 0x86, 0xb7, 0x28, 0xa3, 0x82, 0x4e, 0x40, 0x27, 0x41, 0x94, 0x56, 0x2a, | |
| 1568 0xde, 0xa5, 0x98, 0x32, 0x5a, 0x58, 0x6a, 0x7d, 0xed, 0x90, 0x10, 0x93, 0x9e, 0x02, 0x00, 0x2a, | |
| 1569 0x47, 0x2e, 0x78, 0x14, 0x2a, 0x53, 0xb6, 0x75, 0xff, 0x0a, 0x91, 0x03, 0x53, 0xc6, 0x84, 0x00, | |
| 1570 0x09, 0x7c, 0x5d, 0x70, 0x82, 0x7b, 0x29, 0x21, 0x25, 0xc1, 0xa6, 0x03, 0x35, 0x90, 0x61, 0x46, | |
| 1571 0x2e, 0x48, 0x18, 0xec, 0xb0, 0x16, 0xb1, 0x45, 0x62, 0x44, 0x70, 0x92, 0xb5, 0x58, 0x49, 0x0a, | |
| 1572 0x0a, 0xb5, 0x91, 0xb1, 0x31, 0xa1, 0x79, 0x11, 0xb5, 0x03, 0x69, 0xc9, 0x51, 0x0c, 0x50, 0x3e, | |
| 1573 0x74, 0x01, 0xaf, 0x05, 0x9d, 0x80, 0xaa, 0x0a, 0x36, 0x0a, 0x24, 0x2b, 0x00, 0xdf, 0xa2, 0xb4, | |
| 1574 0x82, 0x04, 0x13, 0x4c, 0x00, 0x02, 0x80, 0x96, 0xa1, 0xb4, 0x5d, 0xbb, 0x20, 0xd0, 0xa9, 0xe4, | |
| 1575 0x98, 0x3e, 0xd2, 0x46, 0x43, 0x03, 0x76, 0x76, 0x24, 0x17, 0x41, 0xea, 0x31, 0x3b, 0x11, 0x9f, | |
| 1576 0xe8, 0xa2, 0xe4, 0xc2, 0x46, 0x2c, 0x0a, 0x30, 0xc2, 0x44, 0x06, 0x1c, 0xac, 0x21, 0xc3, 0xd7, | |
| 1577 0x4e, 0x24, 0xe6, 0x8c, 0x02, 0x2f, 0xe8, 0x64, 0x43, 0xcd, 0x36, 0x67, 0xd7, 0x44, 0xda, 0x72, | |
| 1578 0x64, 0x21, 0x41, 0x68, 0xea, 0x96, 0xd2, 0x76, 0x74, 0xd1, 0xf8, 0x50, 0xb9, 0x16, 0xff, 0xc4, | |
| 1579 0x50, 0xb9, 0xfd, 0x32, 0xe5, 0x42, 0x90, 0x74, 0x5d, 0x69, 0xd1, 0xc2, 0x3b, 0x21, 0x6b, 0x91, | |
| 1580 0xc9, 0x0e, 0x65, 0x2c, 0x10, 0xaa, 0xe2, 0x4d, 0xc1, 0x71, 0x60, 0x32, 0xb3, 0xea, 0x59, 0x46, | |
| 1581 0x20, 0x6d, 0x6a, 0xb3, 0x00, 0x38, 0x37, 0xb4, 0x83, 0x48, 0xdd, 0x46, 0x09, 0x62, 0x42, 0x4a, | |
| 1582 0x8b, 0xd4, 0x31, 0xb1, 0x18, 0x89, 0x1c, 0x2c, 0x47, 0xbe, 0x01, 0x7a, 0xde, 0xd0, 0x18, 0x31, | |
| 1583 0xd0, 0x74, 0x43, 0x0e, 0xa0, 0x34, 0x85, 0x0a, 0x87, 0x39, 0x40, 0x02, 0xb8, 0x02, 0xe1, 0xea, | |
| 1584 0x50, 0xd8, 0x49, 0x4a, 0x00, 0x1b, 0x0d, 0x9d, 0x71, 0x96, 0xe4, 0x04, 0x53, 0x75, 0x00, 0x37, | |
| 1585 0x4a, 0x05, 0x42, 0xa5, 0x9f, 0xdb, 0x15, 0x8d, 0x61, 0x2a, 0xd0, 0xd1, 0x0c, 0x2c, 0x0b, 0x51, | |
| 1586 0xad, 0x6d, 0xf2, 0xec, 0xd0, 0x70, 0x35, 0x61, 0x69, 0x71, 0xcb, 0x7a, 0x0b, 0x65, 0x2d, 0x46, | |
| 1587 0x21, 0x11, 0x0c, 0x91, 0xce, 0x29, 0x41, 0x80, 0x68, 0x4b, 0x0e, 0xa0, 0xac, 0x35, 0x96, 0xd8, | |
| 1588 0x96, 0xd5, 0x51, 0xe7, 0x8f, 0x63, 0x44, 0x73, 0x00, 0x6e, 0xc5, 0xa5, 0x02, 0x09, 0xa8, 0x93, | |
| 1589 0xf0, 0xc2, 0xe5, 0x7e, 0xae, 0x1a, 0xd6, 0x08, 0x12, 0xc4, 0x2e, 0x01, 0x85, 0xaf, 0x66, 0x64, | |
| 1590 0x75, 0x41, 0x5f, 0xa7, 0xaa, 0xe8, 0xe6, 0xb5, 0x0b, 0x3a, 0x3a, 0x4a, 0x37, 0xe4, 0xae, 0xfb, | |
| 1591 0xbf, 0x1a, 0xf7, 0x3e, 0x18, 0x0d, 0x91, 0x0e, 0x14, 0x10, 0x00, 0x3b | |
| 1592 }; | |
| 1593 | |
| 1594 CYG_HTTPD_DATA( cyg_monitor_ecos_logo_data, | |
| 1595 "image/gif", | |
| 1596 sizeof(ecos_logo_gif), ecos_logo_gif ); | |
| 1597 | |
| 1598 CYG_HTTPD_TABLE_ENTRY( cyg_monitor_ecos_logo, | |
| 1599 "/monitor/ecos.gif", | |
| 1600 cyg_httpd_send_data, | |
| 1601 &cyg_monitor_ecos_logo_data ); | |
| 1602 | |
| 1603 /*------------------------------------------------------------------ */ | |
| 1604 /* end of monitor.c */ |
