|
| typedef SSL_SESSION | evhtp_ssl_sess_t |
| |
| typedef SSL | evhtp_ssl_t |
| |
| typedef SSL_CTX | evhtp_ssl_ctx_t |
| |
| typedef X509 | evhtp_x509_t |
| |
| typedef X509_STORE_CTX | evhtp_x509_store_ctx_t |
| |
| typedef struct evbuffer | evbuf_t |
| |
| typedef struct event | event_t |
| |
| typedef struct evconnlistener | evserv_t |
| |
| typedef struct bufferevent | evbev_t |
| |
| typedef pthread_mutex_t | evhtp_mutex_t |
| |
| typedef struct evhtp_s | evhtp_t |
| |
| typedef struct evhtp_defaults_s | evhtp_defaults_t |
| |
| typedef struct evhtp_callbacks_s | evhtp_callbacks_t |
| |
| typedef struct evhtp_callback_s | evhtp_callback_t |
| |
| typedef struct evhtp_defaults_s | evhtp_defaults_5 |
| |
| typedef struct evhtp_kv_s | evhtp_kv_t |
| |
| typedef struct evhtp_kvs_s | evhtp_kvs_t |
| |
| typedef struct evhtp_uri_s | evhtp_uri_t |
| |
| typedef struct evhtp_path_s | evhtp_path_t |
| |
| typedef struct evhtp_authority_s | evhtp_authority_t |
| |
| typedef struct evhtp_request_s | evhtp_request_t |
| |
| typedef struct evhtp_hooks_s | evhtp_hooks_t |
| |
| typedef struct evhtp_connection_s | evhtp_connection_t |
| |
| typedef struct evhtp_ssl_cfg_s | evhtp_ssl_cfg_t |
| |
| typedef struct evhtp_alias_s | evhtp_alias_t |
| |
| typedef uint16_t | evhtp_res |
| |
| typedef uint8_t | evhtp_error_flags |
| |
| typedef enum evhtp_hook_type | evhtp_hook_type |
| |
| typedef enum evhtp_callback_type | evhtp_callback_type |
| |
| typedef enum evhtp_proto | evhtp_proto |
| |
| typedef enum evhtp_ssl_scache_type | evhtp_ssl_scache_type |
| |
| typedef enum evhtp_type | evhtp_type |
| |
| typedef void(* | evhtp_thread_init_cb )(evhtp_t *htp, evthr_t *thr, void *arg) |
| |
| typedef void(* | evhtp_callback_cb )(evhtp_request_t *req, void *arg) |
| |
| typedef void(* | evhtp_hook_err_cb )(evhtp_request_t *req, evhtp_error_flags errtype, void *arg) |
| |
| typedef evhtp_res(* | evhtp_hook )() |
| |
| typedef evhtp_res(* | evhtp_pre_accept_cb )(evhtp_connection_t *conn, void *arg) |
| |
| typedef evhtp_res(* | evhtp_post_accept_cb )(evhtp_connection_t *conn, void *arg) |
| |
| typedef evhtp_res(* | evhtp_hook_header_cb )(evhtp_request_t *req, evhtp_header_t *hdr, void *arg) |
| |
| typedef evhtp_res(* | evhtp_hook_headers_cb )(evhtp_request_t *req, evhtp_headers_t *hdr, void *arg) |
| |
| typedef evhtp_res(* | evhtp_hook_path_cb )(evhtp_request_t *req, evhtp_path_t *path, void *arg) |
| |
| typedef evhtp_res(* | evhtp_hook_read_cb )(evhtp_request_t *req, evbuf_t *buf, void *arg) |
| |
| typedef evhtp_res(* | evhtp_hook_request_fini_cb )(evhtp_request_t *req, void *arg) |
| |
| typedef evhtp_res(* | evhtp_hook_connection_fini_cb )(evhtp_connection_t *connection, void *arg) |
| |
| typedef evhtp_res(* | evhtp_hook_chunk_new_cb )(evhtp_request_t *r, uint64_t len, void *arg) |
| |
| typedef evhtp_res(* | evhtp_hook_chunk_fini_cb )(evhtp_request_t *r, void *arg) |
| |
| typedef evhtp_res(* | evhtp_hook_chunks_fini_cb )(evhtp_request_t *r, void *arg) |
| |
| typedef evhtp_res(* | evhtp_hook_headers_start_cb )(evhtp_request_t *r, void *arg) |
| |
| typedef evhtp_res(* | evhtp_hook_hostname_cb )(evhtp_request_t *r, const char *hostname, void *arg) |
| |
| typedef evhtp_res(* | evhtp_hook_write_cb )(evhtp_connection_t *conn, void *arg) |
| |
| typedef int(* | evhtp_kvs_iterator )(evhtp_kv_t *kv, void *arg) |
| |
| typedef int(* | evhtp_headers_iterator )(evhtp_header_t *header, void *arg) |
| |
| typedef int(* | evhtp_ssl_verify_cb )(int pre_verify, evhtp_x509_store_ctx_t *ctx) |
| |
| typedef int(* | evhtp_ssl_chk_issued_cb )(evhtp_x509_store_ctx_t *ctx, evhtp_x509_t *x, evhtp_x509_t *issuer) |
| |
| typedef int(* | evhtp_ssl_scache_add )(evhtp_connection_t *connection, unsigned char *sid, int sid_len, evhtp_ssl_sess_t *sess) |
| |
| typedef void(* | evhtp_ssl_scache_del )(evhtp_t *htp, unsigned char *sid, int sid_len) |
| |
| typedef evhtp_ssl_sess_t *(* | evhtp_ssl_scache_get )(evhtp_connection_t *connection, unsigned char *sid, int sid_len) |
| |
| typedef void *(* | evhtp_ssl_scache_init )(evhtp_t *) |
| |
|
| | TAILQ_HEAD (evhtp_callbacks_s, evhtp_callback_s) |
| |
| | TAILQ_HEAD (evhtp_kvs_s, evhtp_kv_s) |
| |
| evhtp_t * | evhtp_new (evbase_t *evbase, void *arg) |
| | creates a new evhtp_t instance More...
|
| |
| void | evhtp_free (evhtp_t *evhtp) |
| |
| void | evhtp_set_timeouts (evhtp_t *htp, const struct timeval *r, const struct timeval *w) |
| | set a read/write timeout on all things evhtp_t. When the timeout expires your error hook will be called with the libevent supplied event flags. More...
|
| |
| void | evhtp_set_bev_flags (evhtp_t *htp, int flags) |
| | set bufferevent flags, defaults to BEV_OPT_CLOSE_ON_FREE More...
|
| |
| int | evhtp_ssl_use_threads (void) |
| |
| int | evhtp_ssl_init (evhtp_t *htp, evhtp_ssl_cfg_t *ssl_cfg) |
| |
| void | evhtp_disable_100_continue (evhtp_t *htp) |
| | when a client sends an Expect: 100-continue, if this is function is called, evhtp will not send a HTTP/x.x continue response. More...
|
| |
| int | evhtp_use_callback_locks (evhtp_t *htp) |
| | creates a lock around callbacks and hooks, allowing for threaded applications to add/remove/modify hooks & callbacks in a thread-safe manner. More...
|
| |
| void | evhtp_set_gencb (evhtp_t *htp, evhtp_callback_cb cb, void *arg) |
| | sets a callback which is called if no other callbacks are matched More...
|
| |
| void | evhtp_set_pre_accept_cb (evhtp_t *htp, evhtp_pre_accept_cb, void *arg) |
| |
| void | evhtp_set_post_accept_cb (evhtp_t *htp, evhtp_post_accept_cb, void *arg) |
| |
| evhtp_callback_t * | evhtp_set_cb (evhtp_t *htp, const char *path, evhtp_callback_cb cb, void *arg) |
| | sets a callback to be executed on a specific path More...
|
| |
| evhtp_callback_t * | evhtp_set_regex_cb (evhtp_t *htp, const char *pattern, evhtp_callback_cb cb, void *arg) |
| | sets a callback to be executed based on a regex pattern More...
|
| |
| evhtp_callback_t * | evhtp_set_glob_cb (evhtp_t *htp, const char *pattern, evhtp_callback_cb cb, void *arg) |
| | sets a callback to to be executed on simple glob/wildcard patterns this is useful if the app does not care about what was matched, but just that it matched. This is technically faster than regex. More...
|
| |
| int | evhtp_set_hook (evhtp_hooks_t **hooks, evhtp_hook_type type, evhtp_hook cb, void *arg) |
| | sets a callback hook for either a connection or a path/regex . More...
|
| |
| int | evhtp_unset_hook (evhtp_hooks_t **hooks, evhtp_hook_type type) |
| | remove a specific hook from being called. More...
|
| |
| int | evhtp_unset_all_hooks (evhtp_hooks_t **hooks) |
| | removes all hooks. More...
|
| |
| int | evhtp_bind_socket (evhtp_t *htp, const char *addr, uint16_t port, int backlog) |
| | bind to a socket, optionally with specific protocol support formatting. The addr can be defined as one of the following: ipv6:<ipv6addr> for binding to an IPv6 address. unix:<named pipe>=""> for binding to a unix named socket ipv4:<ipv4addr> for binding to an ipv4 address Otherwise the addr is assumed to be ipv4. More...
|
| |
| void | evhtp_unbind_socket (evhtp_t *htp) |
| | stops the listening socket. More...
|
| |
| int | evhtp_bind_sockaddr (evhtp_t *htp, struct sockaddr *, size_t sin_len, int backlog) |
| | bind to an already allocated sockaddr. More...
|
| |
| int | evhtp_use_threads (evhtp_t *htp, evhtp_thread_init_cb init_cb, int nthreads, void *arg) |
| |
| void | evhtp_send_reply (evhtp_request_t *request, evhtp_res code) |
| |
| void | evhtp_send_reply_start (evhtp_request_t *request, evhtp_res code) |
| |
| void | evhtp_send_reply_body (evhtp_request_t *request, evbuf_t *buf) |
| |
| void | evhtp_send_reply_end (evhtp_request_t *request) |
| |
| int | evhtp_response_needs_body (const evhtp_res code, const htp_method method) |
| | Determine if a response should have a body. Follows the rules in RFC 2616 section 4.3. More...
|
| |
| void | evhtp_send_reply_chunk_start (evhtp_request_t *request, evhtp_res code) |
| | start a chunked response. If data already exists on the output buffer, this will be converted to the first chunk. More...
|
| |
| void | evhtp_send_reply_chunk (evhtp_request_t *request, evbuf_t *buf) |
| | send a chunk reply. More...
|
| |
| void | evhtp_send_reply_chunk_end (evhtp_request_t *request) |
| | call when all chunks have been sent and you wish to send the last bits. This will add the last 0CRLFCRCL and call send_reply_end(). More...
|
| |
| evhtp_callback_t * | evhtp_callback_new (const char *path, evhtp_callback_type type, evhtp_callback_cb cb, void *arg) |
| | creates a new evhtp_callback_t structure. More...
|
| |
| void | evhtp_callback_free (evhtp_callback_t *callback) |
| |
| int | evhtp_callbacks_add_callback (evhtp_callbacks_t *cbs, evhtp_callback_t *cb) |
| | Adds a evhtp_callback_t to the evhtp_callbacks_t list. More...
|
| |
| int | evhtp_add_vhost (evhtp_t *evhtp, const char *name, evhtp_t *vhost) |
| | add an evhtp_t structure (with its own callbacks) to a base evhtp_t structure for virtual hosts. It should be noted that if you enable SSL on the base evhtp_t and your version of OpenSSL supports SNI, the SNI hostname will always take precedence over the Host header value. More...
|
| |
| int | evhtp_add_alias (evhtp_t *evhtp, const char *name) |
| | Add an alias hostname for a virtual-host specific evhtp_t. This avoids having multiple evhtp_t virtual hosts with the same callback for the same vhost. More...
|
| |
| evhtp_kv_t * | evhtp_kv_new (const char *key, const char *val, char kalloc, char valloc) |
| | Allocates a new key/value structure. More...
|
| |
| evhtp_kvs_t * | evhtp_kvs_new (void) |
| |
| void | evhtp_kv_free (evhtp_kv_t *kv) |
| |
| void | evhtp_kvs_free (evhtp_kvs_t *kvs) |
| |
| void | evhtp_kv_rm_and_free (evhtp_kvs_t *kvs, evhtp_kv_t *kv) |
| |
| const char * | evhtp_kv_find (evhtp_kvs_t *kvs, const char *key) |
| |
| evhtp_kv_t * | evhtp_kvs_find_kv (evhtp_kvs_t *kvs, const char *key) |
| |
| void | evhtp_kvs_add_kv (evhtp_kvs_t *kvs, evhtp_kv_t *kv) |
| | appends a key/val structure to a evhtp_kvs_t tailq More...
|
| |
| void | evhtp_kvs_add_kvs (evhtp_kvs_t *dst, evhtp_kvs_t *src) |
| | appends all key/val structures from src tailq onto dst tailq More...
|
| |
| int | evhtp_kvs_for_each (evhtp_kvs_t *kvs, evhtp_kvs_iterator cb, void *arg) |
| |
| evhtp_query_t * | evhtp_parse_query (const char *query, size_t len) |
| | Parses the query portion of the uri into a set of key/values. More...
|
| |
| int | evhtp_unescape_string (unsigned char **out, unsigned char *str, size_t str_len) |
| | Unescapes strings like '%7B1,%202,%203%7D' would become '{1, 2, 3}'. More...
|
| |
| evhtp_header_t * | evhtp_header_new (const char *key, const char *val, char kalloc, char valloc) |
| | creates a new evhtp_header_t key/val structure More...
|
| |
| evhtp_header_t * | evhtp_header_key_add (evhtp_headers_t *headers, const char *key, char kalloc) |
| | creates a new evhtp_header_t, sets only the key, and adds to the evhtp_headers TAILQ More...
|
| |
| evhtp_header_t * | evhtp_header_val_add (evhtp_headers_t *headers, const char *val, char valloc) |
| | finds the last header in the headers tailq and adds the value More...
|
| |
| void | evhtp_headers_add_header (evhtp_headers_t *headers, evhtp_header_t *header) |
| | adds an evhtp_header_t to the end of the evhtp_headers_t tailq More...
|
| |
| const char * | evhtp_header_find (evhtp_headers_t *headers, const char *key) |
| | finds the value of a key in a evhtp_headers_t structure More...
|
| |
| htp_method | evhtp_request_get_method (evhtp_request_t *r) |
| | returns the htp_method enum version of the request method. More...
|
| |
| void | evhtp_connection_pause (evhtp_connection_t *connection) |
| | pauses a connection (disables reading) More...
|
| |
| void | evhtp_connection_resume (evhtp_connection_t *connection) |
| | resumes a connection (enables reading) and activates resume event. More...
|
| |
| void | evhtp_request_pause (evhtp_request_t *request) |
| | Wrapper around evhtp_connection_pause. More...
|
| |
| void | evhtp_request_resume (evhtp_request_t *request) |
| | Wrapper around evhtp_connection_resume. More...
|
| |
| evhtp_connection_t * | evhtp_request_get_connection (evhtp_request_t *request) |
| | returns the underlying evhtp_connection_t structure from a request More...
|
| |
| void | evhtp_connection_set_bev (evhtp_connection_t *conn, evbev_t *bev) |
| | Sets the connections underlying bufferevent. More...
|
| |
| void | evhtp_request_set_bev (evhtp_request_t *request, evbev_t *bev) |
| | sets the underlying bufferevent for a evhtp_request More...
|
| |
| evbev_t * | evhtp_connection_get_bev (evhtp_connection_t *conn) |
| | returns the underlying connections bufferevent More...
|
| |
| void | evhtp_connection_set_timeouts (evhtp_connection_t *conn, const struct timeval *r, const struct timeval *w) |
| | sets a connection-specific read/write timeout which overrides the global read/write settings. More...
|
| |
| evbev_t * | evhtp_request_get_bev (evhtp_request_t *request) |
| | returns the underlying requests bufferevent More...
|
| |
| evbev_t * | evhtp_connection_take_ownership (evhtp_connection_t *connection) |
| | let a user take ownership of the underlying bufferevent and free all other underlying resources. More...
|
| |
| void | evhtp_connection_free (evhtp_connection_t *connection) |
| | free's all connection related resources, this will also call your request fini hook and request fini hook. More...
|
| |
| void | evhtp_request_free (evhtp_request_t *request) |
| |
| void | evhtp_set_max_body_size (evhtp_t *htp, uint64_t len) |
| | set a max body size to accept for an incoming request, this will default to unlimited. More...
|
| |
| void | evhtp_connection_set_max_body_size (evhtp_connection_t *conn, uint64_t len) |
| | set a max body size for a specific connection, this will default to the size set by evhtp_set_max_body_size More...
|
| |
| void | evhtp_request_set_max_body_size (evhtp_request_t *request, uint64_t len) |
| | just calls evhtp_connection_set_max_body_size for the request. More...
|
| |
| void | evhtp_set_max_keepalive_requests (evhtp_t *htp, uint64_t num) |
| | sets a maximum number of requests that a single connection can make. More...
|
| |
| int | evhtp_connection_set_ratelimit (evhtp_connection_t *c, size_t read_rate, size_t read_burst, size_t write_rate, size_t write_burst, const struct timeval *tick) |
| | set a bufferevent ratelimit on a evhtp_connection_t structure. The logic is the same as libevent's rate-limiting code. More...
|
| |
| evhtp_connection_t * | evhtp_connection_new (evbase_t *evbase, const char *addr, uint16_t port) |
| | allocate a new connection More...
|
| |
| evhtp_request_t * | evhtp_request_new (evhtp_callback_cb cb, void *arg) |
| | allocate a new request More...
|
| |
| int | evhtp_make_request (evhtp_connection_t *c, evhtp_request_t *r, htp_method meth, const char *uri) |
| | make a client request More...
|
| |
| unsigned int | evhtp_request_status (evhtp_request_t *) |
| |