Go to the source code of this file.
|
static void | http_server_sessions_reader_lock (void) |
|
static void | http_server_sessions_reader_unlock (void) |
|
static void | http_server_sessions_writer_lock (void) |
|
static void | http_server_sessions_writer_unlock (void) |
|
static http_session_t * | http_server_session_alloc (u32 thread_index) |
|
static http_session_t * | http_server_session_get (u32 thread_index, u32 hs_index) |
|
static void | http_server_session_free (http_session_t *hs) |
|
static void | http_server_session_lookup_add (u32 thread_index, u32 s_index, u32 hs_index) |
|
static void | http_server_session_lookup_del (u32 thread_index, u32 s_index) |
|
static http_session_t * | http_server_session_lookup (u32 thread_index, u32 s_index) |
|
static void | http_server_session_timer_start (http_session_t *hs) |
|
static void | http_server_session_timer_stop (http_session_t *hs) |
|
static void | http_server_session_disconnect (http_session_t *hs) |
|
static void | http_process_free (http_server_args *args) |
|
static void | http_cli_output (uword arg, u8 *buffer, uword buffer_bytes) |
|
void | send_data (http_session_t *hs, u8 *data) |
|
static void | send_error (http_session_t *hs, char *str) |
|
static uword | http_cli_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f) |
|
static void | alloc_http_process (http_server_args *args) |
|
static void | alloc_http_process_callback (void *cb_args) |
|
static int | session_rx_request (http_session_t *hs) |
|
static int | http_server_rx_callback (session_t *s) |
|
static int | http_server_rx_callback_static (session_t *s) |
|
static int | http_server_session_accept_callback (session_t *s) |
|
static void | http_server_session_disconnect_callback (session_t *s) |
|
static void | http_server_session_reset_callback (session_t *s) |
|
static int | http_server_session_connected_callback (u32 app_index, u32 api_context, session_t *s, session_error_t err) |
|
static int | http_server_add_segment_callback (u32 client_index, u64 segment_handle) |
|
static void | http_server_cleanup_callback (session_t *s, session_cleanup_ntf_t ntf) |
|
static int | http_server_attach () |
|
static int | http_server_listen () |
|
static void | http_server_session_close_cb (void *hs_handlep) |
|
static void | http_expired_timers_dispatch (u32 *expired_timers) |
|
static uword | http_server_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f) |
|
static int | http_server_create (vlib_main_t *vm) |
|
static clib_error_t * | http_server_create_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
static clib_error_t * | http_server_main_init (vlib_main_t *vm) |
|
◆ http_process_event_t
◆ http_session_state_t
Enumerator |
---|
HTTP_STATE_CLOSED | |
HTTP_STATE_ESTABLISHED | |
HTTP_STATE_OK_SENT | |
HTTP_STATE_CLOSED | Session is closed.
|
HTTP_STATE_ESTABLISHED | Session is established.
|
HTTP_STATE_OK_SENT | Session has sent an OK response.
|
HTTP_STATE_SEND_MORE_DATA | Session has sent an HTML response.
|
HTTP_STATE_N_STATES | Number of states.
|
Definition at line 34 of file http_server.c.
◆ alloc_http_process()
◆ alloc_http_process_callback()
static void alloc_http_process_callback |
( |
void * |
cb_args | ) |
|
|
static |
◆ http_cli_output()
static void http_cli_output |
( |
uword |
arg, |
|
|
u8 * |
buffer, |
|
|
uword |
buffer_bytes |
|
) |
| |
|
static |
◆ http_cli_process()
◆ http_expired_timers_dispatch()
static void http_expired_timers_dispatch |
( |
u32 * |
expired_timers | ) |
|
|
static |
◆ http_process_free()
◆ http_server_add_segment_callback()
static int http_server_add_segment_callback |
( |
u32 |
client_index, |
|
|
u64 |
segment_handle |
|
) |
| |
|
static |
◆ http_server_attach()
static int http_server_attach |
( |
| ) |
|
|
static |
◆ http_server_cleanup_callback()
◆ http_server_create()
◆ http_server_create_command_fn()
◆ http_server_listen()
static int http_server_listen |
( |
| ) |
|
|
static |
◆ http_server_main_init()
◆ http_server_process()
◆ http_server_rx_callback()
static int http_server_rx_callback |
( |
session_t * |
s | ) |
|
|
static |
◆ http_server_rx_callback_static()
static int http_server_rx_callback_static |
( |
session_t * |
s | ) |
|
|
static |
◆ http_server_session_accept_callback()
static int http_server_session_accept_callback |
( |
session_t * |
s | ) |
|
|
static |
◆ http_server_session_alloc()
◆ http_server_session_close_cb()
static void http_server_session_close_cb |
( |
void * |
hs_handlep | ) |
|
|
static |
◆ http_server_session_connected_callback()
◆ http_server_session_disconnect()
◆ http_server_session_disconnect_callback()
static void http_server_session_disconnect_callback |
( |
session_t * |
s | ) |
|
|
static |
◆ http_server_session_free()
◆ http_server_session_get()
◆ http_server_session_lookup()
◆ http_server_session_lookup_add()
static void http_server_session_lookup_add |
( |
u32 |
thread_index, |
|
|
u32 |
s_index, |
|
|
u32 |
hs_index |
|
) |
| |
|
static |
◆ http_server_session_lookup_del()
static void http_server_session_lookup_del |
( |
u32 |
thread_index, |
|
|
u32 |
s_index |
|
) |
| |
|
static |
◆ http_server_session_reset_callback()
static void http_server_session_reset_callback |
( |
session_t * |
s | ) |
|
|
static |
◆ http_server_session_timer_start()
◆ http_server_session_timer_stop()
◆ http_server_sessions_reader_lock()
static void http_server_sessions_reader_lock |
( |
void |
| ) |
|
|
static |
◆ http_server_sessions_reader_unlock()
static void http_server_sessions_reader_unlock |
( |
void |
| ) |
|
|
static |
◆ http_server_sessions_writer_lock()
static void http_server_sessions_writer_lock |
( |
void |
| ) |
|
|
static |
◆ http_server_sessions_writer_unlock()
static void http_server_sessions_writer_unlock |
( |
void |
| ) |
|
|
static |
◆ send_data()
◆ send_error()
◆ session_rx_request()
◆ html_footer
Initial value:=
"</pre></body></html>\r\n"
Definition at line 257 of file http_server.c.
◆ html_header_static
const char* html_header_static |
|
static |
Initial value:=
"<html><head><title>static reply</title></head>"
"<link rel=\"icon\" href=\"data:,\">"
"<body><pre>hello</pre></body></html>\r\n"
Definition at line 260 of file http_server.c.
◆ html_header_template
const char* html_header_template |
|
static |
Initial value:=
"<html><head><title>%v</title></head>"
"<link rel=\"icon\" href=\"data:,\">"
"<body><pre>"
Definition at line 252 of file http_server.c.
◆ http_error_template
const char* http_error_template |
|
static |
Initial value:=
"HTTP/1.1 %s\r\n"
"Content-Type: text/html\r\n"
"Expires: Mon, 11 Jan 1970 10:10:10 GMT\r\n"
"Connection: close\r\n"
"Pragma: no-cache\r\n"
"Content-Length: 0\r\n\r\n"
Definition at line 243 of file http_server.c.
◆ http_ok
◆ http_response
const char* http_response |
|
static |
Initial value:=
"Content-Type: text/html\r\n"
"Expires: Mon, 11 Jan 1970 10:10:10 GMT\r\n"
"Connection: close \r\n"
"Pragma: no-cache\r\n"
"Content-Length: %d\r\n\r\n%s"
Definition at line 236 of file http_server.c.
◆ http_server_create_command
Initial value:=
{
.path = "test http server",
.short_help = "test http server",
}
static clib_error_t * http_server_create_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
(constructor) VLIB_CLI_COMMAND (http_server_create_command)
Definition at line 953 of file http_server.c.
◆ http_server_main
◆ http_server_process_node
Initial value:=
{
.name = "http-server-process",
.state = VLIB_NODE_STATE_DISABLED,
}
static uword http_server_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
(constructor) VLIB_REGISTER_NODE (http_server_process_node)
Definition at line 831 of file http_server.c.
◆ http_server_session_cb_vft
Initial value:= {
}
static int http_server_session_accept_callback(session_t *s)
static int http_server_rx_callback(session_t *s)
static int http_server_session_connected_callback(u32 app_index, u32 api_context, session_t *s, session_error_t err)
static void http_server_cleanup_callback(session_t *s, session_cleanup_ntf_t ntf)
static int http_server_add_segment_callback(u32 client_index, u64 segment_handle)
static void http_server_session_reset_callback(session_t *s)
static void http_server_session_disconnect_callback(session_t *s)
Definition at line 701 of file http_server.c.
◆ static_http
◆ static_ok