Changeset 0fe6b0d in network-demos
- Timestamp:
- 11/23/09 14:31:53 (14 years ago)
- Branches:
- 4.11, 57a009d5b89e72f488ab655184e6a33bb0fe6b7f, network-demos-4-10-branch
- Children:
- 81f6c2e
- Parents:
- 6ecabe8
- Location:
- http
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
http/ChangeLog
r6ecabe8 r0fe6b0d 1 2009-11-23 Joel Sherrill <joel.sherrill@oarcorp.com> 2 3 * Makefile, goahead_index.html, init.c, shttpd_ext.c, 4 shttpd_index.html: Add Mongoose HTTPD support. 5 * mongoose_ext.c, mongoose_index.html: New files. 6 1 7 2009-05-13 Joel Sherrill <joel.sherrill@oarcorp.com> 2 8 -
http/Makefile
r6ecabe8 r0fe6b0d 9 9 10 10 # C source names, if any, go here -- minus the .c 11 C_PIECES=init FilesystemImage shttpd_ext 11 C_PIECES=init FilesystemImage shttpd_ext mongoose_ext 12 12 C_FILES=$(C_PIECES:%=%.c) 13 13 C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) … … 43 43 ## FYI GoAhead requires POSIX to be enabled 44 44 USE_GOAHEAD=no 45 USE_SIMPLE=yes 45 USE_SIMPLE=no 46 USE_MONGOOSE=yes 46 47 USE_FTPD=yes 47 48 ifeq ($(USE_GOAHEAD),yes) … … 55 56 CFLAGS += -DUSE_SIMPLE_HTTPD 56 57 override LD_LIBS += -lshttpd 58 endif 59 60 ifeq ($(USE_MONGOOSE),yes) 61 HTTPD = Mongoose HTTPD Web Server 62 CFLAGS += -DUSE_MONGOOSE_HTTPD 63 override LD_LIBS += -lmghttpd 57 64 endif 58 65 … … 88 95 $(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage 89 96 90 rootfs/index.html: shttpd_index.html goahead_index.html 97 rootfs/index.html: shttpd_index.html goahead_index.html mongoose_index.html 91 98 ifeq ($(USE_SIMPLE),yes) 92 99 cp shttpd_index.html rootfs/index.html … … 94 101 ifeq ($(USE_GOHEAD),yes) 95 102 cp goahead_index.html rootfs/index.html 103 endif 104 ifeq ($(USE_MONGOOSE),yes) 105 cp mongoose_index.html rootfs/index.html 96 106 endif 97 107 -
http/goahead_index.html
r6ecabe8 r0fe6b0d 1 1 <HTML> 2 <HEAD><TITLE>RTEMS @SERVER@Test Page</TITLE></HEAD>2 <HEAD><TITLE>RTEMS GoAhead Test Page</TITLE></HEAD> 3 3 <BODY BGCOLOR="FFFFFF"> 4 4 <center> -
http/init.c
r6ecabe8 r0fe6b0d 81 81 #else 82 82 bool Simple_HTTPD_enabled = false; 83 #endif 84 85 #if defined(USE_MONGOOSE_HTTPD) 86 #include <mghttpd/mongoose.h> 87 88 void example_mongoose_addpages( 89 struct mg_context *server 90 ); 83 91 #endif 84 92 … … 146 154 #endif 147 155 156 #if defined(USE_MONGOOSE_HTTPD) 157 { 158 struct mg_context *WebServer; 159 printf( "Initializing Mongoose HTTPD\n" ); 160 WebServer = mg_start(); 161 162 mg_set_option(WebServer, "root", "/" ); 163 mg_set_option(WebServer, "ports", "80" ); 164 example_mongoose_addpages( WebServer ); 165 166 } 167 #endif 148 168 status = rtems_task_delete( RTEMS_SELF ); 149 169 } … … 163 183 #define CONFIGURE_MAXIMUM_TASKS 20 164 184 185 #if defined(USE_MONGOOSE_HTTPD) 186 #define CONFIGURE_MAXIMUM_POSIX_THREADS 10 187 #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 30 188 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10 189 #define CONFIGURE_MINIMUM_TASK_STACK_SIZE (32 * 1024) 190 #define CONFIGURE_UNIFIED_WORK_AREAS 191 #endif 192 165 193 #define CONFIGURE_MICROSECONDS_PER_TICK 10000 166 194 -
http/shttpd_ext.c
r6ecabe8 r0fe6b0d 31 31 32 32 if ( !strcmp( query, "cpuuse_report" ) ) { 33 34 shttpd_printf( arg, "<pre>" ); 33 35 rtems_cpu_usage_report_with_plugin( 34 36 arg, 35 37 (rtems_printk_plugin_t) shttpd_printf 36 38 ); 39 shttpd_printf( arg, "</pre>" ); 37 40 } else if ( !strcmp( query, "cpuuse_reset" ) ) { 38 41 rtems_cpu_usage_reset(); … … 44 47 ); 45 48 } else if ( !strcmp( query, "stackuse_report" ) ) { 49 shttpd_printf( arg, "<pre>" ); 46 50 rtems_stack_checker_report_usage_with_plugin( 47 51 arg, 48 52 (rtems_printk_plugin_t) shttpd_printf 49 53 ); 54 shttpd_printf( arg, "</pre>" ); 50 55 } else { 51 56 shttpd_printf( -
http/shttpd_index.html
r6ecabe8 r0fe6b0d 30 30 <LI><A HREF="queries?stackuse_report">Stack Usage -- Report</LI> 31 31 </UL> 32 </big>33 32 34 33 </BODY></HTML>
Note: See TracChangeset
for help on using the changeset viewer.