#include <string.h>#include <stdlib.h>#include <stdio.h>#include <sys/time.h>#include <sys/types.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 "../../logger.h"#include "../../scriba.h"Go to the source code of this file.
Data Structures | |
| struct | _WebData |
| struct | _ApplicationThreadData |
| struct | _RunServiceProgram |
Defines | |
| #define | FULL_PATH_BUFFER_LENGTH 256 |
| #define | INBLEN 10 |
| #define | ERRMSGCLIENT 0x01 |
| #define | ERRMSGERRLOG 0x02 |
| #define | OBLEN 20 |
| #define | ENVLEN 256 |
| #define | DEC(c) pr2six[(int)c] |
| #define | MAXVAL 63 |
| #define | CONFIG(X) cft_GetString(pWD->pProgramConfig->pCONF,(X)) |
| #define | GET_FTP_PARAMETER(X) |
| #define | X(a, b) case a: pszEVN = b; strcpy(pATD->szEnvBuf,b); strcat(pATD->szEnvBuf,"=");break; |
| #define | envRETURN(X) |
| #define | X(a, b) case a: pszEVN = b; strcpy(pATD->szEnvBuf,b); strcat(pATD->szEnvBuf,"=");break; |
| #define | envRETURN(X) |
| #define | GET_BAS_P_NAME(X, Y) if( ! strnicmp(Buffer,#X,Y) )s = pHT->server[pT->server_index].X; |
Typedefs | |
| typedef _WebData | WebData |
| typedef _WebData * | pWebData |
| typedef _ApplicationThreadData | ApplicationThreadData |
| typedef _ApplicationThreadData * | pApplicationThreadData |
Functions | |
| static int | uudecode (char *bufcoded, unsigned char *bufplain, int outbufsize) |
| static char * | prefix (char *t, char *p) |
| static int | maskip (char *s, unsigned long *ip, unsigned long *mask) |
| static void | httpd_report (void *pEmbedPointer, char *FileName, long LineNumber, unsigned int iErrorCode, int iErrorSeverity, int *piErrorCounter, char *szErrorString, unsigned long *fFlags) |
| static void | ftp_report (void *pEmbedPointer, char *FileName, long LineNumber, unsigned int iErrorCode, int iErrorSeverity, int *piErrorCounter, char *szErrorString, unsigned long *fFlags) |
| int | AppInit (int argc, char *argv[], pHttpdThread pHT, void **AppData) |
| static void | GuardThread (void *p) |
| static void | ExecuteProgramThread (void *p) |
| static void | ExecuteProgram (pWebData pWD, char *pszProgramFileName, int iRestart) |
| int | AppStart (void **AppData) |
| static void | pfFtpOut (int ch, void *pE) |
| static int | pfFtpIn (void *pE) |
| static void | pfStdOut (int ch, void *pE) |
| static int | pfStdIn (void *pE) |
| static char * | pfFtpEnv (void *pE, char *pszEVN, long lEVSN) |
| static char * | pfEnv (void *pE, char *pszEVN, long lEVSN) |
| static void | send404 (pHttpdThread pHT, pThreadData pT) |
| int | FtpProc (pHttpdThread pHT, pThreadData pT, char *Buffer) |
| void | HttpProc (pHttpdThread pHT, pThreadData pT) |
| main (int argc, char *argv[]) | |
Variables | |
| static char | six2pr [64] |
| static unsigned char | pr2six [256] |
|
|
Definition at line 400 of file websrv.c. Referenced by AppStart(). |
|
|
Referenced by uudecode(). |
|
|
|
|
|
Value: |
|
|
Value: do{ pszRet=X;\ if( isLong ){\ if( pszRet && strlen(pszRet) < ENVLEN - strlen(pATD->szEnvBuf) -1 )\ strcat(pATD->szEnvBuf,pszRet);\ return pATD->szEnvBuf;\ }else return pszRet;\ }while(0) Referenced by pfEnv(), and pfFtpEnv(). |
|
|
Definition at line 147 of file websrv.c. Referenced by ftp_report(), and httpd_report(). |
|
|
Definition at line 148 of file websrv.c. Referenced by ftp_report(), and httpd_report(). |
|
|
|
|
|
Referenced by FtpProc(). |
|
|
Value: |
|
|
Definition at line 80 of file websrv.c. Referenced by pfStdIn(). |
|
|
Referenced by uudecode(). |
|
|
Definition at line 162 of file websrv.c. Referenced by pfStdOut(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||
|
Definition at line 402 of file websrv.c. References free(), i, iError, _WebData::nolog, NULL, _WebData::pHT, _WebData::pProgramConfig, s, scriba_InitModuleInterface(), scriba_LoadConfiguration(), scriba_new(), and _WebData::XForwarded. |
|
|
Definition at line 897 of file websrv.c. References alloc_Alloc(), alloc_Free(), alloc_InitSegment(), _WebData::AppLog, cft_EnumFirst(), cft_EnumNext(), cft_FindNode(), cft_GetEx(), cft_GetKey(), CONFIG, _WebData::ErrLog, ExecuteProgram(), fp, free(), GuardThread(), _WebData::HitLog, iError, _RunServiceProgram::iRestart, log_init(), log_printf(), _WebData::lWaitLoop, _WebData::nolog, NULL, _WebData::PanicLog, _WebData::pHT, _WebData::pProgramConfig, _WebData::pszPid, _RunServiceProgram::pWD, s, _WebData::StatLog, thread_CreateThread(), and thread_InitMutex(). Referenced by main(). |
|
||||||||||||||||
|
Definition at line 873 of file websrv.c. References _WebData::ErrLog, ExecuteProgramThread(), _RunServiceProgram::iRestart, log_printf(), NULL, _RunServiceProgram::pszProgramFileName, _RunServiceProgram::pWD, strcpy(), and thread_CreateThread(). Referenced by AppStart(). |
|
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 353 of file websrv.c. References _WebData::bErrMsgDest, buf, _WebData::ErrLog, ERRMSGCLIENT, ERRMSGERRLOG, log_printf(), s, and sprintf(). Referenced by FtpProc(). |
|
||||||||||||||||
|
|
Definition at line 791 of file websrv.c. References _WebData::AppLog, buf, fp, i, log_printf(), _WebData::lWaitLoop, memcpy(), NULL, _WebData::pszPid, sprintf(), thread_LockMutex(), and thread_UnlockMutex(). Referenced by AppStart(). |
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 286 of file websrv.c. References _WebData::bErrMsgDest, buf, _WebData::ErrLog, ERRMSGCLIENT, ERRMSGERRLOG, log_printf(), s, and sprintf(). Referenced by HttpProc(). |
|
||||||||||||
|
||||||||||||
|
Definition at line 1601 of file websrv.c. References AppInit(), _WebData::AppLog, AppStart(), buf, fork(), FtpProc(), httpd(), HttpProc(), i, log_printf(), main(), memcpy(), NULL, ReportStatusToSCMgr(), scriba_InitStaticModules(), ServiceStart(), ServiceStop(), sprintf(), thread_LockMutex(), and thread_UnlockMutex(). |
|
||||||||||||||||
|
Definition at line 255 of file websrv.c. References i. |
|
||||||||||||||||
|
Definition at line 1150 of file websrv.c. References envRETURN, NULL, _WebData::pHT, _ApplicationThreadData::pszClientIP, _ApplicationThreadData::pszPassword, _ApplicationThreadData::pszPathTranslated, _ApplicationThreadData::pszRemoteUser, s, _WebData::szPort, and X. Referenced by HttpProc(). |
|
||||||||||||||||
|
Definition at line 1116 of file websrv.c. References envRETURN, NULL, _ApplicationThreadData::pszFtpCommand, _ApplicationThreadData::szThreadIndex, and X. Referenced by FtpProc(). |
|
|
Definition at line 1047 of file websrv.c. Referenced by FtpProc(). |
|
||||||||||||
|
Definition at line 1038 of file websrv.c. Referenced by FtpProc(). |
|
|
Definition at line 1090 of file websrv.c. References _ApplicationThreadData::cbInBuffer, INBLEN, _ApplicationThreadData::pszInBuffer, and _ApplicationThreadData::szInBuffer. Referenced by HttpProc(). |
|
||||||||||||
|
Definition at line 1051 of file websrv.c. References _ApplicationThreadData::cbBuffer, _ApplicationThreadData::FirstHeaderLine, OBLEN, and _ApplicationThreadData::szBuffer. Referenced by HttpProc(). |
|
||||||||||||
|
Definition at line 237 of file websrv.c. References NULL. Referenced by HttpProc(). |
|
||||||||||||
|
Definition at line 1277 of file websrv.c. References _WebData::code404, and _WebData::msg404. |
|
||||||||||||||||
|
Definition at line 187 of file websrv.c. References DEC, j, and MAXVAL. Referenced by HttpProc(). |
|
|
|
|
|
Initial value: {
'A','B','C','D','E','F','G','H','I','J','K','L','M',
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
'a','b','c','d','e','f','g','h','i','j','k','l','m',
'n','o','p','q','r','s','t','u','v','w','x','y','z',
'0','1','2','3','4','5','6','7','8','9','+','/'
}
|
1.4.6-NO