FD.io VPP
v19.08.1-401-g8e4ed521a
Vector Packet Processing
|
Go to the source code of this file.
Functions | |
static u8 * | format_state_machine_called_from (u8 *s, va_list *args) |
Format the called-from enum. More... | |
static void | http_static_server_sessions_reader_lock (void) |
Acquire reader lock on the sessions pools. More... | |
static void | http_static_server_sessions_reader_unlock (void) |
Drop reader lock on the sessions pools. More... | |
static void | http_static_server_sessions_writer_lock (void) |
Acquire writer lock on the sessions pools. More... | |
static void | http_static_server_sessions_writer_unlock (void) |
Drop writer lock on the sessions pools. More... | |
static void | http_static_server_session_timer_start (http_session_t *hs) |
Start a session cleanup timer. More... | |
static void | http_static_server_session_timer_stop (http_session_t *hs) |
stop a session cleanup timer More... | |
static http_session_t * | http_static_server_session_alloc (u32 thread_index) |
Allocate an http session. More... | |
static http_session_t * | http_static_server_session_get (u32 thread_index, u32 hs_index) |
Get an http session by index. More... | |
static void | http_static_server_session_free (http_session_t *hs) |
Free an http session. More... | |
static void | http_static_server_session_lookup_add (u32 thread_index, u32 s_index, u32 hs_index) |
add a session to the vpp < – > http session index map More... | |
static void | http_static_server_session_lookup_del (u32 thread_index, u32 s_index) |
Remove a session from the vpp < – > http session index map. More... | |
static http_session_t * | http_static_server_session_lookup (u32 thread_index, u32 s_index) |
lookup a session in the vpp < – > http session index map More... | |
static void | http_static_server_detach_cache_entry (http_session_t *hs) |
Detach cache entry from session. More... | |
static void | http_static_server_session_cleanup (http_session_t *hs) |
clean up a session More... | |
static void | http_static_server_session_disconnect (http_session_t *hs) |
Disconnect a session. More... | |
static u32 | static_send_data (http_session_t *hs, u8 *data, u32 length, u32 offset) |
send http data More... | |
static void | send_error (http_session_t *hs, char *str) |
Send an http error string. More... | |
static int | session_rx_request (http_session_t *hs) |
Retrieve data from the application layer. More... | |
static void | lru_validate (http_static_server_main_t *hsm) |
Sanity-check the forward and reverse LRU lists. More... | |
static void | lru_remove (http_static_server_main_t *hsm, file_data_cache_t *ep) |
Remove a data cache entry from the LRU lists. More... | |
static void | lru_add (http_static_server_main_t *hsm, file_data_cache_t *ep, f64 now) |
Add an entry to the LRU lists, tag w/ supplied timestamp. More... | |
static void | lru_update (http_static_server_main_t *hsm, file_data_cache_t *ep, f64 now) |
Remove and re-add a cache entry from/to the LRU lists. More... | |
static int | state_closed (session_t *s, http_session_t *hs, http_state_machine_called_from_t cf) |
Session-layer (main) data rx callback. More... | |
static void | close_session (http_session_t *hs) |
void | http_static_server_register_builtin_handler (void *fp, char *url, int request_type) |
Register a builtin GET or POST handler. More... | |
static int | v_find_index (u8 *vec, char *str) |
static int | state_established (session_t *s, http_session_t *hs, http_state_machine_called_from_t cf) |
established state - waiting for GET, POST, etc. More... | |
static int | state_send_more_data (session_t *s, http_session_t *hs, http_state_machine_called_from_t cf) |
static int | state_sent_ok (session_t *s, http_session_t *hs, http_state_machine_called_from_t cf) |
static int | http_static_server_rx_tx_callback (session_t *s, http_state_machine_called_from_t cf) |
static int | http_static_server_rx_callback (session_t *s) |
static int | http_static_server_tx_callback (session_t *s) |
static int | http_static_server_session_accept_callback (session_t *s) |
Session accept callback. More... | |
static void | http_static_server_session_disconnect_callback (session_t *s) |
Session disconnect callback. More... | |
static void | http_static_server_session_reset_callback (session_t *s) |
Session reset callback. More... | |
static int | http_static_server_session_connected_callback (u32 app_index, u32 api_context, session_t *s, u8 is_fail) |
static int | http_static_server_add_segment_callback (u32 client_index, u64 segment_handle) |
static int | http_static_server_attach () |
static int | http_static_server_listen () |
static void | http_static_server_session_cleanup_cb (void *hs_handlep) |
static void | http_expired_timers_dispatch (u32 *expired_timers) |
Expired session timer-wheel callback. More... | |
static uword | http_static_server_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f) |
Timer-wheel expiration process. More... | |
static int | http_static_server_create (vlib_main_t *vm) |
int | http_static_server_enable_api (u32 fifo_size, u32 cache_limit, u32 prealloc_fifos, u32 private_segment_size, u8 *www_root, u8 *uri) |
API helper function for vl_api_http_static_enable_t messages. More... | |
static clib_error_t * | http_static_server_create_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
u8 * | format_hsm_cache_entry (u8 *s, va_list *args) |
format a file cache entry More... | |
u8 * | format_http_session_state (u8 *s, va_list *args) |
u8 * | format_http_session (u8 *s, va_list *args) |
static clib_error_t * | http_show_static_server_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
static clib_error_t * | http_static_server_main_init (vlib_main_t *vm) |
Variables | |
http_static_server_main_t | http_static_server_main |
static const char * | http_error_template |
http error boilerplate More... | |
static const char * | http_response_template |
http response boilerplate More... | |
static void * | state_funcs [HTTP_STATE_N_STATES] |
static session_cb_vft_t | http_static_server_session_cb_vft |
Session-layer virtual function table. More... | |
vlib_node_registration_t | http_static_server_process_node |
(constructor) VLIB_REGISTER_NODE (http_static_server_process_node) More... | |
static vlib_cli_command_t | http_static_server_create_command |
(constructor) VLIB_CLI_COMMAND (http_static_server_create_command) More... | |
static vlib_cli_command_t | http_show_static_server_command |
(constructor) VLIB_CLI_COMMAND (http_show_static_server_command) More... | |
|
static |
Definition at line 531 of file static_server.c.
format a file cache entry
Definition at line 1486 of file static_server.c.
Definition at line 1530 of file static_server.c.
Definition at line 1503 of file static_server.c.
Format the called-from enum.
Definition at line 39 of file static_server.c.
|
static |
Expired session timer-wheel callback.
Definition at line 1234 of file static_server.c.
|
static |
Definition at line 1126 of file static_server.c.
|
static |
Definition at line 1146 of file static_server.c.
|
static |
Definition at line 1287 of file static_server.c.
|
static |
|
static |
Detach cache entry from session.
Definition at line 219 of file static_server.c.
int http_static_server_enable_api | ( | u32 | fifo_size, |
u32 | cache_limit, | ||
u32 | prealloc_fifos, | ||
u32 | private_segment_size, | ||
u8 * | www_root, | ||
u8 * | uri | ||
) |
API helper function for vl_api_http_static_enable_t messages.
Definition at line 1333 of file static_server.c.
|
static |
Definition at line 1199 of file static_server.c.
|
static |
|
static |
Timer-wheel expiration process.
Definition at line 1252 of file static_server.c.
void http_static_server_register_builtin_handler | ( | void * | fp, |
char * | url, | ||
int | request_type | ||
) |
Register a builtin GET or POST handler.
Definition at line 540 of file static_server.c.
|
static |
|
inlinestatic |
Definition at line 992 of file static_server.c.
|
static |
Session accept callback.
Definition at line 1047 of file static_server.c.
|
static |
Allocate an http session.
Definition at line 132 of file static_server.c.
|
static |
clean up a session
Definition at line 250 of file static_server.c.
|
static |
Definition at line 1212 of file static_server.c.
|
static |
Definition at line 1118 of file static_server.c.
|
static |
Disconnect a session.
Definition at line 267 of file static_server.c.
|
static |
Session disconnect callback.
Definition at line 1077 of file static_server.c.
|
static |
Free an http session.
Definition at line 159 of file static_server.c.
|
static |
Get an http session by index.
Definition at line 148 of file static_server.c.
|
static |
lookup a session in the vpp < – > http session index map
Definition at line 202 of file static_server.c.
|
static |
add a session to the vpp < – > http session index map
Definition at line 181 of file static_server.c.
Remove a session from the vpp < – > http session index map.
Definition at line 192 of file static_server.c.
|
static |
Session reset callback.
Definition at line 1099 of file static_server.c.
|
static |
Start a session cleanup timer.
Definition at line 101 of file static_server.c.
|
static |
stop a session cleanup timer
Definition at line 120 of file static_server.c.
|
static |
Acquire reader lock on the sessions pools.
Definition at line 69 of file static_server.c.
|
static |
Drop reader lock on the sessions pools.
Definition at line 77 of file static_server.c.
|
static |
Acquire writer lock on the sessions pools.
Definition at line 85 of file static_server.c.
|
static |
Drop writer lock on the sessions pools.
Definition at line 93 of file static_server.c.
|
static |
|
inlinestatic |
Add an entry to the LRU lists, tag w/ supplied timestamp.
Definition at line 467 of file static_server.c.
|
inlinestatic |
Remove a data cache entry from the LRU lists.
Definition at line 433 of file static_server.c.
|
inlinestatic |
Remove and re-add a cache entry from/to the LRU lists.
Definition at line 504 of file static_server.c.
|
inlinestatic |
Sanity-check the forward and reverse LRU lists.
Definition at line 388 of file static_server.c.
|
static |
Send an http error string.
hs | - the http session |
str | - the error string, e.g. "404 Not Found" |
Definition at line 349 of file static_server.c.
|
static |
Retrieve data from the application layer.
Definition at line 364 of file static_server.c.
|
static |
Session-layer (main) data rx callback.
Parse the http request, and reply to it. Future extensions might include POST processing, active content, etc.closed state - should never really get here
Definition at line 522 of file static_server.c.
|
static |
established state - waiting for GET, POST, etc.
Definition at line 594 of file static_server.c.
|
static |
|
static |
|
static |
send http data
hs | - http session |
data | - the data vector to transmit |
offset | - transmit offset for this operation |
Definition at line 305 of file static_server.c.
|
static |
Definition at line 571 of file static_server.c.
|
static |
http error boilerplate
Definition at line 278 of file static_server.c.
|
static |
http response boilerplate
Definition at line 288 of file static_server.c.
|
static |
(constructor) VLIB_CLI_COMMAND (http_show_static_server_command)
Definition at line 1651 of file static_server.c.
|
static |
(constructor) VLIB_CLI_COMMAND (http_static_server_create_command)
Definition at line 1473 of file static_server.c.
http_static_server_main_t http_static_server_main |
Definition at line 33 of file static_server.c.
vlib_node_registration_t http_static_server_process_node |
(constructor) VLIB_REGISTER_NODE (http_static_server_process_node)
Definition at line 1277 of file static_server.c.
|
static |
Session-layer virtual function table.
Definition at line 1134 of file static_server.c.
|
static |
Definition at line 981 of file static_server.c.