Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
LWIP HTTP server implementation. More...
Go to the source code of this file.
Functions | |
| static struct http_ssi_state * | http_ssi_state_alloc (void) |
| Allocate as struct http_ssi_state. | |
| static void | http_ssi_state_free (struct http_ssi_state *ssi) |
| Free a struct http_ssi_state. | |
| static void | http_state_init (struct http_state *hs) |
| Initialize a struct http_state. | |
| static struct http_state * | http_state_alloc (void) |
| Allocate a struct http_state. | |
| static void | http_state_eof (struct http_state *hs) |
| Free a struct http_state. | |
| static void | http_state_free (struct http_state *hs) |
| Free a struct http_state. | |
| static err_t | http_write (struct altcp_pcb *pcb, const void *ptr, u16_t *length, u8_t apiflags) |
| Call tcp_write() in a loop trying smaller and smaller length. | |
| static err_t | http_close_or_abort_conn (struct altcp_pcb *pcb, struct http_state *hs, u8_t abort_conn) |
| The connection shall be actively closed (using RST to close from fault states). | |
| static err_t | http_close_conn (struct altcp_pcb *pcb, struct http_state *hs) |
| The connection shall be actively closed. | |
| static void | http_eof (struct altcp_pcb *pcb, struct http_state *hs) |
| End of file: either close the connection (Connection: close) or close the file (Connection: keep-alive) | |
| static int | extract_uri_parameters (struct http_state *hs, char *params) |
| Extract URI parameters from the parameter-part of an URI in the form "test.cgi?x=y". | |
| static void | get_tag_insert (struct http_state *hs) |
| Insert a tag (found in an shtml in the form of "<!--#tagname-->" into the file. | |
Variables | |
| static char | httpd_req_buf [LWIP_HTTPD_MAX_REQ_LENGTH+1] |
| HTTP request is copied here from pbufs for simple parsing. | |
| static struct http_state * | http_connections |
| global list of active HTTP connections, use to kill the oldest when running out of memory | |
Detailed Description
LWIP HTTP server implementation.
Definition in file lwip_httpd.c.
Function Documentation
| static int extract_uri_parameters | ( | struct http_state * | hs, |
| char * | params | ||
| ) | [static] |
Extract URI parameters from the parameter-part of an URI in the form "test.cgi?x=y".
- Parameters:
-
hs http connection state params pointer to the NULL-terminated parameter string from the URI
- Returns:
- number of parameters extracted
Definition at line 688 of file lwip_httpd.c.
| static err_t http_close_conn | ( | struct altcp_pcb * | pcb, |
| struct http_state * | hs | ||
| ) | [static] |
The connection shall be actively closed.
Reset the sent- and recv-callbacks.
- Parameters:
-
pcb the tcp pcb to reset callbacks hs connection state to free
Definition at line 646 of file lwip_httpd.c.
| static err_t http_close_or_abort_conn | ( | struct altcp_pcb * | pcb, |
| struct http_state * | hs, | ||
| u8_t | abort_conn | ||
| ) | [static] |
The connection shall be actively closed (using RST to close from fault states).
Reset the sent- and recv-callbacks.
- Parameters:
-
pcb the tcp pcb to reset callbacks hs connection state to free
Definition at line 596 of file lwip_httpd.c.
| static void http_eof | ( | struct altcp_pcb * | pcb, |
| struct http_state * | hs | ||
| ) | [static] |
End of file: either close the connection (Connection: close) or close the file (Connection: keep-alive)
Definition at line 655 of file lwip_httpd.c.
| static struct http_ssi_state* http_ssi_state_alloc | ( | void | ) | [static, read] |
Allocate as struct http_ssi_state.
Definition at line 418 of file lwip_httpd.c.
| static void http_ssi_state_free | ( | struct http_ssi_state * | ssi ) | [static] |
Free a struct http_ssi_state.
Definition at line 435 of file lwip_httpd.c.
| static struct http_state* http_state_alloc | ( | void | ) | [static, read] |
Allocate a struct http_state.
Definition at line 458 of file lwip_httpd.c.
| static void http_state_eof | ( | struct http_state * | hs ) | [static] |
Free a struct http_state.
Also frees the file data if dynamic.
Definition at line 478 of file lwip_httpd.c.
| static void http_state_free | ( | struct http_state * | hs ) | [static] |
Free a struct http_state.
Also frees the file data if dynamic.
Definition at line 514 of file lwip_httpd.c.
| static void http_state_init | ( | struct http_state * | hs ) | [static] |
Initialize a struct http_state.
Definition at line 446 of file lwip_httpd.c.
| static err_t http_write | ( | struct altcp_pcb * | pcb, |
| const void * | ptr, | ||
| u16_t * | length, | ||
| u8_t | apiflags | ||
| ) | [static] |
Call tcp_write() in a loop trying smaller and smaller length.
- Parameters:
-
pcb altcp_pcb to send ptr Data to send length Length of data to send (in/out: on return, contains the amount of data sent) apiflags directly passed to tcp_write
- Returns:
- the return value of tcp_write
Definition at line 533 of file lwip_httpd.c.
Variable Documentation
struct http_state* http_connections [static] |
global list of active HTTP connections, use to kill the oldest when running out of memory
Definition at line 351 of file lwip_httpd.c.
char httpd_req_buf[LWIP_HTTPD_MAX_REQ_LENGTH+1] [static] |
HTTP request is copied here from pbufs for simple parsing.
Definition at line 166 of file lwip_httpd.c.
Generated on Tue Jul 12 2022 13:55:13 by
1.7.2