IPC@CHIP® RTOS-LNX – API Documentation

Header image

Main page


Functions
CGI API

Detailed Description

The CGI ("Common Gateway Interface") API provides access to the CGI implementation of the IPC@CHIP® Web server. CGI at the IPC@CHIP® provides the possibility to install own programmed CGI functions at the IPC@CHIP® Web server. These functions are bound with a fixed name and are executed by the Web server task, if a HTTP request with such a fixed name comes in. This mechanism allows dynamic usage of the IPC@CHIP® Web server. For better understanding of CGI and it's possibilities, see the available program examples at the Beck homepage.

For test and demonstration purpose two pages are preinstalled at the IPC@CHIP®:

For configuring the web server and CGI, see the provided Web server CHIP.INI entries. For some useful comments see also under Programming notes.

Functions

int CGI_Install (const CGI_Entry *cgiEntryPtr)
 Install a CGI function. More...
 
int CGI_Delete (const char *name)
 Remove a CGI function. More...
 
int CGI_SetMainPage (const char *name)
 Set a new main page. More...
 
int CGI_SetMainPagePost (const char *name)
 Set a new main page (POST method). More...
 
int CGI_SetRootDrive (const char driveLetter)
 Set Web server's root drive. More...
 
int CGI_SetRootDir (const char *name)
 Set Web server's root directory. More...
 
int CGI_GetMainPage (char **name)
 Get the main page name. More...
 
int CGI_GetMainPagePost (char **name)
 Get the main page name (POST method). More...
 
char CGI_GetRootDrive (void)
 Get the web server's root drive. More...
 
int CGI_GetRootDir (char **name)
 Get the web server's root directory. More...
 
int CGI_SetCredentials (const char *username, const char *password, int accType, int accIdx)
 Set the web server's user names and passwords. More...
 
void CGI_Enable_Upload (int enable)
 Enables or disables the HTTP file upload. More...
 
int CGI_Install_Func_OnUpload (const char *pathPtr, void *CgiFuncOnUpload)
 Install CGI function on HTTP file uploads. More...
 
int CGI_Install_Func_OnErr (unsigned int error_state, void *CgiFuncOnErr)
 Install CGI function on HTTP errors. More...
 
int CGI_Install_MIME_Table (unsigned int entries, CUSTOM_MIMETYPES_TABLE *mimeTable)
 Install custom MIME table. More...
 
int CGI_Remove_MIME_Table (void)
 Remove custom MIME table. More...
 
int CGI_Install_ContentEncoding_Table (unsigned int entries, CUSTOM_CONTENTENCODING_TABLE *contentEncodingTable)
 Install custom content-encoding table. More...
 
int CGI_Remove_ContentEncoding_Table (void)
 Remove custom content-encoding table. More...
 
int CGI_Install_Headers_Table (unsigned int entries, CUSTOM_HEADERS_TABLE *headersTable)
 Install custom headers table. More...
 
int CGI_Remove_Headers_Table (void)
 Remove custom headers table. More...
 
void CGI_UrlEncode (char *dst, const char *src)
 Encodes a URL string. More...
 
void CGI_UrlDecode (char *dst, const char *src)
 Decodes a URL string. More...
 
int CGI_GetArgument (char **name, char **value, rpCgiPtr CgiRequest)
 Returns the next available argument (name-value pair). More...
 
int CGI_SetCookie (const char *name, const char *value, const char *domain, const unsigned long *expires, const char *path, const int secure, rpCgiPtr CgiRequest)
 Creates a new cookie or modifies an old one. More...
 
int CGI_GetCookie (char **name, char **value, char **domain, char **path, char **port, char **version, rpCgiPtr CgiRequest)
 Returns the next available cookie. More...
 





Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Tue Dec 12 2017 09:23:36 by Doxygen 1.8.13