|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
18 #ifndef __included_http_static_h__
19 #define __included_http_static_h__
87 #define _(type, name) type name;
95 u32 vpp_session_index;
96 u64 vpp_session_handle;
152 BVT (clib_bihash) name_to_data;
188 tw_timer_wheel_2t_1w_2048sl_t
tw;
209 u32 private_segment_size,
210 u8 * www_root,
u8 * uri);
213 (
void *fp,
char *url,
int type);
@ HTTP_BUILTIN_METHOD_GET
u32 data_offset
Current data send offset.
@ HTTP_STATE_CLOSED
Session is closed.
http_builtin_method_type_t
void http_static_server_register_builtin_handler(void *fp, char *url, int type)
Register a builtin GET or POST handler.
clib_timebase_t timebase
Time base, so we can generate browser cache control http spew.
svm_msg_q_t ** vpp_queue
vpp message/event queue
@ HTTP_BUILTIN_METHOD_POST
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
@ HTTP_STATE_OK_SENT
Session has sent an OK response.
u32 ckpair_index
Cert and key pair for tls.
u8 * path
Fully-resolved file path.
struct _svm_queue svm_queue_t
u8 * uri
The bind URI, defaults to tcp://0.0.0.0/80.
u32 node_index
Process node index for event scheduling.
@ HTTP_STATE_SEND_MORE_DATA
Session has sent an HTML response.
u64 cache_limit
Max cache size in bytes.
u32 next_index
Cache LRU links.
u32 fifo_size
Size of the allocated rx, tx fifos, roughly 8K or so.
u32 private_segment_size
Private segment size, usually 0.
int debug_level
Enable debug messages.
u8 * data
Contents of the file, as a u8 * vector.
http_static_main_t http_static_main
uword * get_url_handlers
Hash tables for built-in GET and POST handlers.
@ HTTP_STATE_N_STATES
Number of states.
@ HTTP_STATE_ESTABLISHED
Session is established.
u32 app_index
Application index.
int free_data
Need to free data in detach_cache_entry.
BVT(clib_bihash)
The table of adjacencies indexed by the rewrite string.
u8 * data
File data, a vector.
u32 first_index
Cache LRU listheads.
u32 cache_pool_index
File cache pool index.
file_data_cache_t * cache_pool
Unified file data cache pool.
clib_rwlock_t sessions_lock
Session pool reader writer lock.
u32 prealloc_fifos
Number of preallocated fifos, usually 0.
http_state_machine_called_from_t called_from
state machine called from...
http_session_t ** sessions
Per thread vector of session pools.
u8 * www_root
root path to be served
http_static_server_main_t http_static_server_main
svm_queue_t * vl_input_queue
Server's event queue.
u64 cache_evictions
Number of cache evictions.
#define foreach_app_session_field
flag for dgram mode
uword * post_url_handlers
u64 cache_size
Current cache size.
http_session_state_t
Session States.
u8 * filename
Name of the file.
u32 ** session_to_http_session
vpp session to http session index map
tw_timer_wheel_2t_1w_2048sl_t tw
Session cleanup timer wheel.
http_state_machine_called_from_t
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.
u32 my_client_index
API client handle.
int inuse
Reference count, so we don't recycle while referenced.
f64 last_used
Last time the cache entry was used.
vl_api_fib_path_type_t type
In-memory file data cache entry.