Apache2
|
Go to the source code of this file.
Data Structures | |
struct | h2_proxy_iqueue |
struct | h2_proxy_ngheader |
struct | h2_proxy_request |
Typedefs | |
typedef struct h2_proxy_ihash_t | h2_proxy_ihash_t |
typedef int | h2_proxy_ihash_iter_t(void *ctx, void *val) |
typedef struct h2_proxy_iqueue | h2_proxy_iqueue |
typedef int | h2_proxy_iq_cmp(int i1, int i2, void *ctx) |
typedef struct h2_proxy_ngheader | h2_proxy_ngheader |
typedef struct h2_proxy_request | h2_proxy_request |
typedef struct h2_proxy_fifo | h2_proxy_fifo |
typedef struct h2_proxy_fifo h2_proxy_fifo |
A thread-safe FIFO queue with some extra bells and whistles, if you do not need anything special, better use 'apr_queue'.
typedef int h2_proxy_ihash_iter_t(void *ctx, void *val) |
typedef struct h2_proxy_ihash_t h2_proxy_ihash_t |
Comparator for two int to determine their order.
i1 | first int to compare |
i2 | second int to compare |
ctx | provided user data |
typedef struct h2_proxy_iqueue h2_proxy_iqueue |
typedef struct h2_proxy_ngheader h2_proxy_ngheader |
typedef struct h2_proxy_request h2_proxy_request |
int h2_proxy_fifo_capacity | ( | h2_proxy_fifo * | fifo | ) |
int h2_proxy_fifo_count | ( | h2_proxy_fifo * | fifo | ) |
apr_status_t h2_proxy_fifo_create | ( | h2_proxy_fifo ** | pfifo, |
apr_pool_t * | pool, | ||
int | capacity | ||
) |
Create a FIFO queue that can hold up to capacity elements. Elements can appear several times.
apr_status_t h2_proxy_fifo_interrupt | ( | h2_proxy_fifo * | fifo | ) |
apr_status_t h2_proxy_fifo_pull | ( | h2_proxy_fifo * | fifo, |
void ** | pelem | ||
) |
apr_status_t h2_proxy_fifo_push | ( | h2_proxy_fifo * | fifo, |
void * | elem | ||
) |
Push en element into the queue. Blocks if there is no capacity left.
fifo | the FIFO queue |
elem | the element to push |
apr_status_t h2_proxy_fifo_remove | ( | h2_proxy_fifo * | fifo, |
void * | elem | ||
) |
Remove the elem from the queue, will remove multiple appearances.
elem | the element to remove |
apr_status_t h2_proxy_fifo_set_create | ( | h2_proxy_fifo ** | pfifo, |
apr_pool_t * | pool, | ||
int | capacity | ||
) |
Create a FIFO set that can hold up to capacity elements. Elements only appear once. Pushing an element already present does not change the queue and is successful.
apr_status_t h2_proxy_fifo_term | ( | h2_proxy_fifo * | fifo | ) |
apr_status_t h2_proxy_fifo_try_pull | ( | h2_proxy_fifo * | fifo, |
void ** | pelem | ||
) |
apr_status_t h2_proxy_fifo_try_push | ( | h2_proxy_fifo * | fifo, |
void * | elem | ||
) |
void h2_proxy_ihash_add | ( | h2_proxy_ihash_t * | ih, |
void * | val | ||
) |
void h2_proxy_ihash_clear | ( | h2_proxy_ihash_t * | ih | ) |
size_t h2_proxy_ihash_count | ( | h2_proxy_ihash_t * | ih | ) |
h2_proxy_ihash_t* h2_proxy_ihash_create | ( | apr_pool_t * | pool, |
size_t | offset_of_int | ||
) |
Create a hash for structures that have an identifying int member.
pool | the pool to use |
offset_of_int | the offsetof() the int member in the struct |
int h2_proxy_ihash_empty | ( | h2_proxy_ihash_t * | ih | ) |
void* h2_proxy_ihash_get | ( | h2_proxy_ihash_t * | ih, |
int | id | ||
) |
size_t h2_proxy_ihash_ishift | ( | h2_proxy_ihash_t * | ih, |
int * | buffer, | ||
size_t | max | ||
) |
int h2_proxy_ihash_iter | ( | h2_proxy_ihash_t * | ih, |
h2_proxy_ihash_iter_t * | fn, | ||
void * | ctx | ||
) |
Iterate over the hash members (without defined order) and invoke fn for each member until 0 is returned.
ih | the hash to iterate over |
fn | the function to invoke on each member |
ctx | user supplied data passed into each iteration call |
void h2_proxy_ihash_remove | ( | h2_proxy_ihash_t * | ih, |
int | id | ||
) |
void h2_proxy_ihash_remove_val | ( | h2_proxy_ihash_t * | ih, |
void * | val | ||
) |
size_t h2_proxy_ihash_shift | ( | h2_proxy_ihash_t * | ih, |
void ** | buffer, | ||
size_t | max | ||
) |
void h2_proxy_iq_add | ( | h2_proxy_iqueue * | q, |
int | sid, | ||
h2_proxy_iq_cmp * | cmp, | ||
void * | ctx | ||
) |
Add a stream id to the queue.
q | the queue to append the task to |
sid | the stream id to add |
cmp | the comparator for sorting |
ctx | user data for comparator |
void h2_proxy_iq_clear | ( | h2_proxy_iqueue * | q | ) |
Remove all entries in the queue.
int h2_proxy_iq_count | ( | h2_proxy_iqueue * | q | ) |
Return the number of int in the queue.
q | the queue to get size on |
h2_proxy_iqueue* h2_proxy_iq_create | ( | apr_pool_t * | pool, |
int | capacity | ||
) |
Allocate a new queue from the pool and initialize.
id | the identifier of the queue |
pool | the memory pool |
int h2_proxy_iq_empty | ( | h2_proxy_iqueue * | q | ) |
Return != 0 iff there are no tasks in the queue.
q | the queue to check |
int h2_proxy_iq_remove | ( | h2_proxy_iqueue * | q, |
int | sid | ||
) |
Remove the stream id from the queue. Return != 0 iff task was found in queue.
q | the task queue |
sid | the stream id to remove |
int h2_proxy_iq_shift | ( | h2_proxy_iqueue * | q | ) |
Get the first stream id from the queue or NULL if the queue is empty. The task will be removed.
q | the queue to get the first task from |
void h2_proxy_iq_sort | ( | h2_proxy_iqueue * | q, |
h2_proxy_iq_cmp * | cmp, | ||
void * | ctx | ||
) |
Sort the stream idqueue again. Call if the task ordering has changed.
q | the queue to sort |
cmp | the comparator for sorting |
ctx | user data for the comparator |
const char* h2_proxy_link_reverse_map | ( | request_rec * | r, |
proxy_dir_conf * | conf, | ||
const char * | real_server_uri, | ||
const char * | proxy_server_uri, | ||
const char * | s | ||
) |
unsigned char h2_proxy_log2 | ( | int | n | ) |
h2_proxy_request* h2_proxy_req_create | ( | int | id, |
apr_pool_t * | pool | ||
) |
apr_status_t h2_proxy_req_make | ( | h2_proxy_request * | req, |
apr_pool_t * | pool, | ||
const char * | method, | ||
const char * | scheme, | ||
const char * | authority, | ||
const char * | path, | ||
apr_table_t * | headers | ||
) |
int h2_proxy_res_ignore_header | ( | const char * | name, |
size_t | len | ||
) |
void h2_proxy_util_camel_case_header | ( | char * | s, |
size_t | len | ||
) |
int h2_proxy_util_frame_print | ( | const nghttp2_frame * | frame, |
char * | buffer, | ||
size_t | maxlen | ||
) |
h2_proxy_ngheader* h2_proxy_util_nghd_make | ( | apr_pool_t * | p, |
apr_table_t * | headers | ||
) |
h2_proxy_ngheader* h2_proxy_util_nghd_make_req | ( | apr_pool_t * | p, |
const struct h2_proxy_request * | req | ||
) |