IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


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.


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

Top of page | Main page

Copyright © 2020 Beck IPC GmbH
Generated on Tue Jul 14 12:36:23 2020 by Doxygen 1.6.1