|  | WE310F5
    39.00.000
    | 
This file contains the APIs for HTTP server operations. More...
Go to the source code of this file.
| Data Structures | |
| struct | M2MB_HTTPD_CONFIG_S | 
| HTTP server configuration structure.  More... | |
| struct | M2MB_HTTPD_URI_CTX | 
| HTTP server URI context structure.  More... | |
| struct | M2MB_HTTPD_URI_REQ_INFO | 
| HTTP server URI Request structure.  More... | |
| struct | M2MB_HTTPD_URI_REQ_CGI_KEY_PAIR | 
| HTTP server CGI parameter pair structure.  More... | |
| struct | M2MB_HTTPD_URI_REQ_CGI_FORM_DATA | 
| HTTP server CGI form data structure.  More... | |
| struct | M2MB_URI_CFG_S | 
| struct | M2MB_HTTPD_INIT_PARAMS | 
| HTTPD initialization parameters.  More... | |
| struct | M2MB_HTTPD_URI_CONFIG_PARAMS | 
| This structure is used to set HTTPD URI configuration parameters.  More... | |
| struct | M2MB_HTTPD_GET_MSG_INFO | 
| The structure is used to GET the HEAD/BODY information.  More... | |
| struct | M2MB_HTTPD_GET_CONTENT_LEN | 
| The structure is used to GET the content length of the request.  More... | |
| struct | M2MB_HTTPD_GET_BODY_LOC | 
| The structure is used to GET the pointer to the body locaiton on the request.  More... | |
| struct | M2MB_HTTPD_GET_REQUEST_TYPE | 
| The structure is used to GET the request type on the connection handler.  More... | |
| struct | M2MB_HTTPD_GET_REQ_URI_CGI_FORM_DATA | 
| The structure is used to GET the CGI form data with the URI request.  More... | |
| struct | M2MB_HTTPD_URICTXT_FROM_INDEX | 
| The structure is used to GET the applicaiton context of the registered URI.  More... | |
| struct | M2MB_HTTPD_USER_INFO | 
| The structure is used to GET/SET the user information on the HTTPD module.  More... | |
| union | M2MB_HTTPD_CONF_PARAMS_T | 
| Structure is used by SET/GET configuration paramters of CONF IDs mentioned in enum M2MB_HTTPD_CONF_ID_E.  More... | |
| #define | M2MB_HTTPD_PATH_MAX 31 | 
| #define | M2MB_HTTPD_SRVR_NAME_MAX 512 | 
| #define | HTTP_OK 200 | 
| #define | HTTP_CREATED 201 | 
| #define | HTTP_ACCEPTED 202 | 
| #define | HTTP_NO_CONTENT 204 | 
| #define | HTTP_RESET_CONTENT 205 | 
| #define | HTTP_REDIRECT_MULTI 300 | 
| #define | HTTP_REDIRECT_PERM 301 | 
| #define | HTTP_REDIRECT_TEMP 302 | 
| #define | HTTP_REDIRECT_OTHER 303 | 
| #define | HTTP_REDIRECT_NOMOD 304 | 
| #define | HTTP_REDIRECT_PROXY 305 | 
| #define | HTTP_ERROR_BADREQ 400 | 
| #define | HTTP_ERROR_AUTHFAIL 401 | 
| #define | HTTP_ERROR_PAYMENT 402 | 
| #define | HTTP_ERROR_FORBID 403 | 
| #define | HTTP_ERROR_NOFILE 404 | 
| #define | HTTP_ERROR_METHOD 405 | 
| #define | HTTP_ERROR_UNACCEPT 406 | 
| #define | HTTP_ERROR_PROXYAUT 407 | 
| #define | HTTP_ERROR_REQTMO 408 | 
| #define | HTTP_ERROR_CONFLICT 409 | 
| #define | HTTP_ERROR_RESGONE 410 | 
| #define | HTTP_ERROR_LENGTH 411 | 
| #define | HTTP_ERROR_PREFAIL 412 | 
| #define | HTTP_ERROR_TOOBIG 413 | 
| #define | HTTP_ERROR_URIBIG 414 | 
| #define | HTTP_ERROR_BADMEDIA 415 | 
| #define | HTTP_ERROR_SERVER 500 | 
| #define | HTTP_ERROR_NOTIMPLEMENTED 501 | 
| #define | HTTP_ERROR_BADGATEWAY 502 | 
| #define | HTTP_ERROR_OVERLOAD 503 | 
| #define | HTTP_ERROR_GATEAWYTMO 504 | 
| #define | HTTP_ERROR_HTTPVER 505 | 
| enum | M2MB_HTTPD_CGI_RETURN_E { FP_ERR = 0x110, FP_OK = 0x120, FP_FILE = 0x140, FP_DONE = 0x200 } | 
| Return values enumeration.  More... | |
| enum | M2MB_HTTPD_MODE_E { M2MB_HTTPD_MODE_HTTP = 1, M2MB_HTTPD_MODE_HTTPS = 2, M2MB_HTTPD_MODE_HTTP_AND_HTTPS = 3 } | 
| HTTP server operational mode enumeration.  More... | |
| enum | M2MB_HTTPD_METHOD_E { M2MB_HTTPD_METHOD_INVALID = 1, M2MB_HTTPD_METHOD_GET = 2, M2MB_HTTPD_METHOD_HEAD = 3, M2MB_HTTPD_METHOD_POST = 4, M2MB_HTTPD_METHOD_PUT = 5, M2MB_HTTPD_METHOD_DELETE = 6, M2MB_HTTPD_METHOD_TRACE = 7, M2MB_HTTPD_METHOD_POSTMULTI = 8 } | 
| HTTP server request method enumeration.  More... | |
| enum | M2MB_URI_AUTH_FLAG { M2MB_URI_FLAG_NOAUTH = 0x00, M2MB_URI_FLAG_AUTHBASIC = 0x02, M2MB_URI_FLAG_AUTHMD5 = 0x04 } | 
| HTTP server URI user authentication enumeration.  More... | |
| enum | M2MB_HTTPD_URI_USER_EVENT { M2MB_HTTPD_URI_USER_EVENT_CON_OPENED = 0x00000001, M2MB_HTTPD_URI_USER_EVENT_CON_CLOSE = 0x00000002, M2MB_HTTPD_URI_USER_EVENT_HEADERS_RECV = 0x00000004, M2MB_HTTPD_URI_USER_EVENT_FORM_RECV = 0x00000008, M2MB_HTTPD_URI_USER_EVENT_BODY_RECV = 0x00000010, M2MB_HTTPD_URI_USER_EVENT_ALL_RECV = 0x00000020, M2MB_HTTPD_URI_USER_EVENT_FORM_FILE_RECV = 0x00000040, M2MB_HTTPD_URI_USER_EVENT_DATA_SENT = 0x00000080 } | 
| HTTP server URI user event enumeration.  More... | |
| enum | M2MB_HTTPD_CONF_ID { M2MB_HTTPD_CONF_SET_REGISTER_URI = 0, M2MB_HTTPD_CONF_SET_DEREGISTER_URI = 1, M2MB_HTTPD_CONF_SET_USER_CHANGE_PASSWORD = 2, M2MB_HTTPD_CONF_GET_IS_STARTED = 3, M2MB_HTTPD_CONF_GET_MESSAGE_BODY = 4, M2MB_HTTPD_CONF_GET_MESSAGE_HEAD = 5, M2MB_HTTPD_CONF_GET_CONTENT_LEN = 6, M2MB_HTTPD_CONF_GET_BODY_LOCATION = 7, M2MB_HTTPD_CONF_GET_REQUEST_TYPE = 8, M2MB_HTTPD_CONF_GET_CGI_FORM = 9 } | 
| HTTP server GET/SET Configuration enumeration.  More... | |
| typedef enum M2MB_URI_AUTH_FLAG | M2MB_URI_AUTH_FLAG_T | 
| HTTP server URI user authentication enumeration.  More... | |
| typedef enum M2MB_HTTPD_URI_USER_EVENT | M2MB_HTTPD_URI_USER_EVENT_E | 
| HTTP server URI user event enumeration.  More... | |
| typedef struct M2MB_HTTPD_CONFIG_S | M2MB_HTTPD_CONFIG_T | 
| HTTP server configuration structure.  More... | |
| typedef struct M2MB_HTTPD_URI_CTX | M2MB_HTTPD_URICTX_T | 
| HTTP server URI context structure.  More... | |
| typedef struct M2MB_HTTPD_URI_REQ_INFO | M2MB_HTTPD_URI_REQ_INFO_T | 
| HTTP server URI Request structure.  More... | |
| typedef struct M2MB_HTTPD_URI_REQ_CGI_KEY_PAIR | M2MB_HTTPD_URI_REQ_CGI_KEY_PAIR_T | 
| HTTP server CGI parameter pair structure.  More... | |
| typedef struct M2MB_HTTPD_URI_REQ_CGI_FORM_DATA | M2MB_HTTPD_URI_REQ_CGI_FORM_DATA_T | 
| HTTP server CGI form data structure.  More... | |
| typedef INT32(* | M2MB_HTTPD_URI_HANDLER_T) (VOID *conn_handle, VOID *usr_ctx, INT32 event) | 
| HTTP server URI Request user call back prototype.  More... | |
| typedef struct M2MB_URI_CFG_S | M2MB_URI_CFG_T | 
| typedef enum M2MB_HTTPD_CONF_ID | M2MB_HTTPD_CONF_ID_E | 
| HTTP server GET/SET Configuration enumeration.  More... | |
| typedef struct M2MB_HTTPD_INIT_PARAMS | M2MB_HTTPD_INIT_PARAMS_T | 
| HTTPD initialization parameters.  More... | |
| typedef struct M2MB_HTTPD_URI_CONFIG_PARAMS | M2MB_HTTPD_URI_CONFIG_PARAMS_T | 
| This structure is used to set HTTPD URI configuration parameters.  More... | |
| typedef struct M2MB_HTTPD_GET_MSG_INFO | M2MB_HTTPD_GET_MSG_INFO_T | 
| The structure is used to GET the HEAD/BODY information.  More... | |
| typedef struct M2MB_HTTPD_GET_CONTENT_LEN | M2MB_HTTPD_GET_CONTENT_LEN_T | 
| The structure is used to GET the content length of the request.  More... | |
| typedef struct M2MB_HTTPD_GET_BODY_LOC | M2MB_HTTPD_GET_BODY_LOC_T | 
| The structure is used to GET the pointer to the body locaiton on the request.  More... | |
| typedef struct M2MB_HTTPD_GET_REQUEST_TYPE | M2MB_HTTPD_GET_REQUEST_TYPE_T | 
| The structure is used to GET the request type on the connection handler.  More... | |
| typedef struct M2MB_HTTPD_GET_REQ_URI_CGI_FORM_DATA | M2MB_HTTPD_GET_REQ_URI_CGI_FORM_DATA_T | 
| The structure is used to GET the CGI form data with the URI request.  More... | |
| typedef struct M2MB_HTTPD_URICTXT_FROM_INDEX | M2MB_HTTPD_URICTXT_FROM_INDEX_T | 
| The structure is used to GET the applicaiton context of the registered URI.  More... | |
| typedef struct M2MB_HTTPD_USER_INFO | M2MB_HTTPD_USER_INFO_T | 
| The structure is used to GET/SET the user information on the HTTPD module.  More... | |
| M2MB_STATUS_T | m2mb_httpd_init (HANDLE *handle, M2MB_HTTPD_INIT_PARAMS_T *init_params) | 
| HTTP server deinitialization.  More... | |
| M2MB_STATUS_T | m2mb_httpd_deinit (HANDLE handle) | 
| HTTP server deinitialization.  More... | |
| M2MB_STATUS_T | m2mb_httpd_start (HANDLE handle) | 
| Start HTTP server.  More... | |
| M2MB_STATUS_T | m2mb_httpd_stop (HANDLE handle) | 
| Stop HTTP server.  More... | |
| M2MB_STATUS_T | m2mb_httpd_send_headers (VOID *conn_handle, UINT8 *content_type, INT32 content_length, INT32 status_code, UINT8 *status_text, UINT8 *user_headers) | 
| Send HTTP headers.  More... | |
| M2MB_STATUS_T | m2mb_httpd_send_data (VOID *conn_handle, const INT8 *data, UINT32 length) | 
| Send HTTP data.  More... | |
| M2MB_STATUS_T | m2mb_httpd_set_cfg (HANDLE handle, M2MB_HTTPD_CONF_ID_E conf_id, M2MB_HTTPD_CONF_PARAMS_T *conf_params) | 
| SET the HTTPD configuration parameters.  More... | |
| M2MB_STATUS_T | m2mb_httpd_get_cfg (HANDLE handle, M2MB_HTTPD_CONF_ID_E conf_id, M2MB_HTTPD_CONF_PARAMS_T *conf_params) | 
| GET the HTTPD configuration parameters.  More... | |
| M2MB_URI_CFG_T * | m2mb_httpd_get_uri_cfg_from_index (INT32 index) | 
| Gets the URI configuration.  More... | |
This file contains the APIs for HTTP server operations.
 
HTTP Server APis can be used to create a HTTP server and respond to HTTP client request. The diagram shows the sequence of API call to be performed.
Definition in file m2mb_httpd.h.