FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
http_static.h File Reference

Static http server definitions. More...

+ Include dependency graph for http_static.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  http_static_main_t
 
struct  http_session_t
 Application session. More...
 
struct  file_data_cache_t
 In-memory file data cache entry. More...
 
struct  http_static_server_main_t
 Main data structure. More...
 

Enumerations

enum  http_session_state_t {
  HTTP_STATE_CLOSED, HTTP_STATE_ESTABLISHED, HTTP_STATE_OK_SENT, HTTP_STATE_CLOSED,
  HTTP_STATE_ESTABLISHED, HTTP_STATE_OK_SENT, HTTP_STATE_SEND_MORE_DATA, HTTP_STATE_N_STATES
}
 Session States. More...
 
enum  http_state_machine_called_from_t { CALLED_FROM_RX, CALLED_FROM_TX, CALLED_FROM_TIMER }
 
enum  http_builtin_method_type_t { HTTP_BUILTIN_METHOD_GET = 0, HTTP_BUILTIN_METHOD_POST }
 

Functions

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...
 
void http_static_server_register_builtin_handler (void *fp, char *url, int type)
 Register a builtin GET or POST handler. More...
 

Variables

http_static_main_t http_static_main
 
http_static_server_main_t http_static_server_main
 

Detailed Description

Static http server definitions.

Definition in file http_static.h.

Enumeration Type Documentation

◆ http_builtin_method_type_t

Enumerator
HTTP_BUILTIN_METHOD_GET 
HTTP_BUILTIN_METHOD_POST 

Definition at line 74 of file http_static.h.

◆ http_session_state_t

Session States.

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 53 of file http_static.h.

◆ http_state_machine_called_from_t

Enumerator
CALLED_FROM_RX 
CALLED_FROM_TX 
CALLED_FROM_TIMER 

Definition at line 67 of file http_static.h.

Function Documentation

◆ http_static_server_enable_api()

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 1338 of file static_server.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ http_static_server_register_builtin_handler()

void http_static_server_register_builtin_handler ( void *  fp,
char *  url,
int  type 
)

Register a builtin GET or POST handler.

Definition at line 544 of file static_server.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ http_static_main

http_static_main_t http_static_main

Definition at line 37 of file http_static.c.

◆ http_static_server_main

http_static_server_main_t http_static_server_main

Definition at line 34 of file static_server.c.