File nut/pro/uhttp/modules/mod_ssi.c

References Functions: HttpSsiEchoHandler() nut/pro/uhttp/modules/mod_ssi.c
  HttpSsiExecHandler() nut/pro/uhttp/modules/mod_ssi.c
  HttpSsiIncludeHandler() nut/pro/uhttp/modules/mod_ssi.c
  HttpSsiVarHandler() nut/pro/uhttp/modules/mod_ssi.c

Included Files


Preprocessor definitions

#define SSI_TYPE_FILE 0x01

#define SSI_TYPE_VIRTUAL 0x02

#define SSI_TYPE_EXEC 0x03

#define SSI_TYPE_ECHO 0x04

#define HTTP_SSI_CMD_INCLUDE 1

#define HTTP_SSI_CMD_ECHO 2

#define HTTP_SSI_CMD_CONFIG 3

#define HTTP_SSI_CMD_SET 4

#define HTTP_SSI_CMD_IF 5

#define HTTP_SSI_CMD_ELIF 6

#define HTTP_SSI_CMD_ELSE 7

#define HTTP_SSI_CMD_ENDIF 8

#define HTTP_SSI_CMD_BLOCK 9

#define HTTP_SSI_CMD_ENDBLOCK 10

#define HTTP_SSI_NUM_COMMANDS


Typedef HTTP_SSI_PARAM

typedef struct _HTTP_SSI_PARAM HTTP_SSI_PARAM
See: Type struct _HTTP_SSI_PARAM

Type struct _HTTP_SSI_PARAM

struct _HTTP_SSI_PARAM
struct _HTTP_SSI_PARAM  
   {  
      const char* ipar_name;  
      int ipar_namelen;  
      const char* ipar_value;  
      int ipar_valuelen;  
   }  

Typedef HTTP_SSICMD_HANDLER

typedef int (*HTTP_SSICMD_HANDLER)(HTTPD_SESSION*,HTTP_SSI_PARAM*)

Typedef HTTP_SSI_COMMAND

typedef struct _HTTP_SSI_COMMAND HTTP_SSI_COMMAND
See: Type struct _HTTP_SSI_COMMAND

Type struct _HTTP_SSI_COMMAND

struct _HTTP_SSI_COMMAND
struct _HTTP_SSI_COMMAND  
   {  
      char* icmd_name;  
      int icmd_namelen;  
      HTTP_SSICMD_HANDLER icmd_handler;  
   }  

Global Variable ssiCmdList

HTTP_SSI_COMMAND ssiCmdList[]
Visible in:   nut/pro/uhttp/modules/mod_ssi.c
Used in: HttpSsiParse() nut/pro/uhttp/modules/mod_ssi.c

Local Variables

ssivar_handler
static HTTP_SSI_VARHANDLER ssivar_handler
Used in: HttpRegisterSsiVarHandler()  
  HttpSsiEchoHandler()  

Global Function HttpRegisterSsiVarHandler()

HTTP_SSI_VARHANDLER HttpRegisterSsiVarHandler ( HTTP_SSI_VARHANDLER handler )
Prototyped in: nut/include/pro/uhttp/modules/mod_ssi.h
Called by: NutAppMain() nut/app/uhttpd_ssi/httpd_ssi.c
References Variables: ssivar_handler nut/pro/uhttp/modules/mod_ssi.c

Global Function HttpSsiEchoHandler()

int HttpSsiEchoHandler ( HTTPD_SESSION* hs, HTTP_SSI_PARAM* prm )
Calls: fputs() nut/crt/fputs.c
  memcpy() nut/c/string/memcpy.c
  realloc() nut/crt/realloc.c
Used in:   nut/pro/uhttp/modules/mod_ssi.c
References Variables: ssivar_handler nut/pro/uhttp/modules/mod_ssi.c

Global Function HttpSsiExecHandler()

int HttpSsiExecHandler ( HTTPD_SESSION* hs, HTTP_SSI_PARAM* prm )
Calls: AllocConcatStringLen() nut/pro/uhttp/utils.c
  HttpCgiFunctionHandler() nut/pro/uhttp/modules/mod_cgi_func.c
  free() nut/crt/malloc.c
  malloc() nut/crt/malloc.c
  memcmp() nut/c/string/memcmp.c
  memcpy() nut/c/string/memcpy.c
  strcat() nut/c/string/strcat.c
  strchr() nut/c/string/strchr.c
  strcpy() nut/c/string/strcpy.c
  strlen() nut/c/string/strlen.c
  strstr() nut/c/string/strstr.c
Used in:   nut/pro/uhttp/modules/mod_ssi.c

Global Function HttpSsiHandler()

int HttpSsiHandler ( HTTPD_SESSION* hs, const MEDIA_TYPE_ENTRY* mt, const char* filepath )
Prototyped in: nut/include/pro/uhttp/modules/mod_ssi.h
Calls: HttpSendError() nut/pro/uhttp/responses.c
  HttpSendHeaderBottom() nut/pro/uhttp/responses.c
  HttpSendHeaderTop() nut/pro/uhttp/responses.c
  HttpSsiProcessFile() nut/pro/uhttp/modules/mod_ssi.c
  Rfc1123TimeString() nut/pro/rfctime.c
  _close() nut/crt/close.c
  _open() nut/crt/open.c
  fputs() nut/crt/fputs.c
  gmtime() nut/crt/gmtime.c
  time() nut/crt/time.c
  s_vputs()

Global Function HttpSsiIncludeHandler()

int HttpSsiIncludeHandler ( HTTPD_SESSION* hs, HTTP_SSI_PARAM* prm )
Calls: AllocConcatStringLen() nut/pro/uhttp/utils.c
  HttpSsiProcessFile() nut/pro/uhttp/modules/mod_ssi.c
  _close() nut/crt/close.c
  _open() nut/crt/open.c
  free() nut/crt/malloc.c
  memcmp() nut/c/string/memcmp.c
Used in:   nut/pro/uhttp/modules/mod_ssi.c

Global Function HttpSsiParse()

int HttpSsiParse ( HTTPD_SESSION* hs, const char* buf, int len )
Calls: memset() nut/c/string/memset.c
  isalpha(), isspace(), strncasecmp()
Called by: HttpSsiProcessFile() nut/pro/uhttp/modules/mod_ssi.c
References Variables: ssiCmdList nut/pro/uhttp/modules/mod_ssi.c

Global Function HttpSsiProcessFile()

int HttpSsiProcessFile ( HTTPD_SESSION* hs, int fd )
Prototyped in: nut/pro/uhttp/modules/mod_ssi.c
Calls: HttpSsiParse() nut/pro/uhttp/modules/mod_ssi.c
  _filelength() nut/crt/filelength.c
  _read() nut/crt/read.c
  _seek() nut/crt/seek.c
  fflush() nut/crt/fflush.c
  free() nut/crt/malloc.c
  fwrite() nut/crt/fwrite.c
  malloc() nut/crt/malloc.c
  strlen() nut/c/string/strlen.c
  strstr() nut/c/string/strstr.c
Called by: HttpSsiHandler() nut/pro/uhttp/modules/mod_ssi.c
  HttpSsiIncludeHandler() nut/pro/uhttp/modules/mod_ssi.c

Local Function HttpSsiVarHandler()

static const char* HttpSsiVarHandler ( HTTPD_SESSION* hs, const char* name )
Prototyped in: nut/pro/uhttp/modules/mod_ssi.c
Used in:   nut/pro/uhttp/modules/mod_ssi.c