#include <stdio.h>#include <string.h>#include <sys/time.h>#include <sys/types.h>#include <sys/socket.h>#include <netinet/in.h>#include <netdb.h>#include <unistd.h>#include <signal.h>#include <sys/wait.h>#include "thread.h"#include "filesys.h"#include "httpd.h"#include "getopt.h"Go to the source code of this file.
Data Structures | |
| struct | _StateCode |
Defines | |
| #define | Sleep sleep |
| #define | SLEEPER 1 |
| #define | MAXBINDTRIAL 1200 |
| #define | BINDSLEEP 1 |
| #define | MSPACE(x) while( *x && isspace(*x)) x++ |
| #define | SSPACE(x) if( *x && isspace(*x)) x++ |
Functions | |
| void | SEGV_handle (int i) |
| void | InitSignalHandlers () |
| static int | unhex (int t) |
| static int | strIcmp (char *a, char *b) |
| static char * | _GetServerVariable (pThreadData ThisThread, char *VariableName) |
| static void | _CloseClient (pThreadData ThisThread) |
| static int | _WriteClient (pThreadData ThisThread, char *pszBuffer, int cbBuffer) |
| static int | _WriteClientText (pThreadData ThisThread, char *pszBuffer) |
| static int | _State (pThreadData ThisThread, int StateCode) |
| static int | _ContentType (pThreadData ThisThread, char *pszContentType) |
| static int | _Header (pThreadData ThisThread, char *pszHeaderKey, char *pszHeaderValue) |
| static int | _StartBody (pThreadData ThisThread) |
| static int | _ReadClient (pThreadData ThisThread, char *pszBuffer, int cbBuffer) |
| static char * | _ScriptName (pThreadData ThisThread) |
| static char * | _GetParam (pThreadData ThisThread, char *key) |
| static char * | _PostParam (pThreadData ThisThread, char *key) |
| int | httpd (int argc, char *argv[], int(*AppInit)(int argc, char *argv[], pHttpdThread pHT, void **AppData), int(*AppStart)(void **AppData), void(*HttpProc)(pHttpdThread pHT, pThreadData ThisThread), int(*FtpProc)(pHttpdThread pHT, pThreadData ThisThread, char *pszCommand)) |
| pThreadData | GetFreeThread (pHttpdThread pHT) |
| void | ReleaseThreadData (pHttpdThread pHT, int index) |
| int | CheckAllowDeny (pThreadData ThisThread) |
| void | FinishConnection (pThreadData ThisThread) |
| void | HitHandler (void *t) |
| void | HandleFtpHit (pThreadData ThisThread) |
| void | HandleHttpHit (pThreadData ThisThread) |
Variables | |
| static struct _StateCode | StateMessages [] |
|
|
|
|
|
Definition at line 230 of file httpd.c. Referenced by httpd(). |
|
|
|
|
|
Definition at line 221 of file httpd.c. Referenced by GetFreeThread(), and InstallScriptBasic(). |
|
|
Definition at line 222 of file httpd.c. Referenced by GetFreeThread(). |
|
|
|
|
|
|
|
||||||||||||
|
Definition at line 474 of file httpd.c. References _WriteClient(), and _WriteClientText(). |
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 481 of file httpd.c. References _WriteClient(), and _WriteClientText(). |
|
||||||||||||
|
Definition at line 577 of file httpd.c. References NULL. |
|
||||||||||||||||
|
|
|
|
|
|
|
Definition at line 490 of file httpd.c. References _WriteClient(). |
|
||||||||||||
|
Definition at line 458 of file httpd.c. References _WriteClientText(), buffer, _StateCode::Code, i, sprintf(), _StateCode::StateMessage, and StateMessages. |
|
||||||||||||||||
|
Definition at line 422 of file httpd.c. Referenced by _ContentType(), _Header(), and _StartBody(). |
|
||||||||||||
|
Definition at line 438 of file httpd.c. Referenced by _ContentType(), _Header(), and _State(). |
|
|
Definition at line 829 of file httpd.c. Referenced by HitHandler(). |
|
|
Definition at line 886 of file httpd.c. References ReleaseThreadData(), and thread_ExitThread(). Referenced by HandleFtpHit(), HandleHttpHit(), and HitHandler(). |
|
|
Definition at line 795 of file httpd.c. References Sleep, SLEEPER, thread_LockMutex(), and thread_UnlockMutex(). |
|
|
Definition at line 934 of file httpd.c. References Buffer, cbBuffer, FinishConnection(), and NULL. Referenced by HitHandler(). |
|
|
Definition at line 972 of file httpd.c. References Buffer, cbBuffer, FinishConnection(), j, NULL, and s. Referenced by HitHandler(). |
|
|
Definition at line 900 of file httpd.c. References CheckAllowDeny(), FinishConnection(), HandleFtpHit(), HandleHttpHit(), memcpy(), and NULL. |
|
||||||||||||||||||||||||||||
|
Definition at line 598 of file httpd.c. References AppInit(), getoptt(), i, InitSignalHandlers(), j, MAXBINDTRIAL, and NULL. Referenced by main(). |
|
|
Definition at line 347 of file httpd.c. References SEGV_handle(). Referenced by httpd(). |
|
||||||||||||
|
Definition at line 815 of file httpd.c. References thread_LockMutex(), and thread_UnlockMutex(). Referenced by FinishConnection(). |
|
|
Definition at line 328 of file httpd.c. Referenced by InitSignalHandlers(). |
|
||||||||||||
|
Definition at line 393 of file httpd.c. Referenced by _GetServerVariable(). |
|
|
Definition at line 387 of file httpd.c. Referenced by _GetParam(). |
|
|
Referenced by _State(). |
1.4.6-NO