Go to the source code of this file.
Defines | |
#define | MY_MAC "\x00\x06\x98\x30\x00\x35" |
#define | MY_IPADDR "192.168.192.35" |
#define | MY_IPMASK "255.255.255.0" |
#define | MY_IPGATE "192.168.192.1" |
#define | USE_DHCP |
#define | USE_DISCOVERY |
#define | MY_FSDEV devUrom |
Functions | |
int | ShowForm (FILE *stream, REQUEST *req) |
int | SSIDemoCGI (FILE *stream, REQUEST *req) |
void | Service (void *arg) |
HTTP service thread. | |
int | main (void) |
Main application routine. |
#define MY_MAC "\x00\x06\x98\x30\x00\x35" |
Definition at line 112 of file httpserv.c.
#define MY_IPADDR "192.168.192.35" |
Definition at line 119 of file httpserv.c.
#define MY_IPMASK "255.255.255.0" |
Definition at line 126 of file httpserv.c.
#define MY_IPGATE "192.168.192.1" |
Definition at line 133 of file httpserv.c.
#define USE_DHCP |
Definition at line 139 of file httpserv.c.
#define USE_DISCOVERY |
Definition at line 141 of file httpserv.c.
#define MY_FSDEV devUrom |
Definition at line 516 of file httpserv.c.
References fflush(), fprintf(), fprintf_P, fputs_P, NutHttpGetParameterCount(), NutHttpGetParameterName(), NutHttpGetParameterValue(), NutHttpSendHeaderBottom(), NutHttpSendHeaderTop(), prog_char, PSTR, and _REQUEST::req_query.
Referenced by main().
Definition at line 564 of file httpserv.c.
References fflush(), fprintf(), fprintf_P, localtime_r(), NutHttpGetParameterCount(), NutHttpGetParameterName(), NutHttpGetParameterValue(), PSTR, _REQUEST::req_query, time(), _tm::tm_hour, _tm::tm_mday, _tm::tm_min, _tm::tm_mon, _tm::tm_sec, and _tm::tm_year.
Referenced by main().
Service | ( | void * | arg | ) |
HTTP service thread.
The endless loop in this thread waits for a client connect, processes the HTTP request and disconnects. Nut/Net doesn't support a server backlog. If one client has established a connection, further connect attempts will be rejected. Typically browsers open more than one connection in order to load images concurrently. So we run this routine by several threads.
Definition at line 625 of file httpserv.c.
References _fdopen(), fclose(), NutHeapAvailable(), NutHttpProcessRequest(), NutSleep(), NutTcpAccept(), NutTcpCloseSocket(), NutTcpCreateSocket(), and printf.
Referenced by main().
int main | ( | void | ) |
Main application routine.
Nut/OS automatically calls this entry after initialization.
Definition at line 702 of file httpserv.c.
References _fileno(), _ioctl(), _O_BINARY, _O_RDWR, _open(), _CONFNET::cdn_ip_addr, _CONFNET::cdn_ip_mask, confnet, DEV_DEBUG, DEV_DEBUG_NAME, DEV_ETHER, DEV_ETHER_NAME, DISF_INITAL_ANN, freopen(), inet_addr(), inet_ntoa(), MY_FSDEV, MY_IPADDR, MY_IPGATE, MY_IPMASK, MY_MAC, NUT_THREAD_MAINSTACK, NutDhcpIfConfig(), NutIpRouteAdd(), NutNetIfConfig(), NutNetLoadConfig(), NutRegisterAsp(), NutRegisterAspCallback(), NutRegisterAuth(), NutRegisterCgi(), NutRegisterCgiBinPath(), NutRegisterDevice(), NutRegisterDiscovery(), NutRegisterHttpRoot(), NutRegisterSsi(), NutSleep(), NutThreadCreate(), NutThreadSetPriority(), NutTraceHeap(), NutTraceOs(), NutTracePPP(), NutTraceTcp(), NutVersionString(), printf, puts, Service(), ShowForm(), SSIDemoCGI(), stdout, and UART_SETSPEED.