HTTP Header Tables

HTTP header hash table.

YMO_FUNC_PURE ymo_http_hdr_id_t ymo_http_hdr_hash_init(void)

Default hash initialization function used by header table.

YMO_FUNC_PURE ymo_http_hdr_id_t ymo_http_hdr_hash(const char *str_in, size_t *len)

Default string hash function used by header table.

YMO_FUNC_PURE ymo_http_hdr_id_t ymo_http_hdr_hash_ch(ymo_http_hdr_id_t h, char c)

Default char hash function used by header table (i.e. given a hash and a character, compute the updated hash).

YMO_FUNC_PURE int ymo_http_hdr_cmp(ymo_http_hdr_table_node_t *current, const char *hdr, ymo_http_hdr_id_t h_id)

Default hash item comparison function used by header table.

YMO_HDR_HASH_FN

Hash function definition used to override hash function in the absence of weak linking facilities.

Definition
#    define YMO_HDR_HASH_FN ymo_http_hdr_hash_283_5
YMO_HDR_HASH_CH

Char hash function used by header table (i.e. given a hash and a character, compute the updated hash) used in the absence of weak links.

Definition
#    define YMO_HDR_HASH_CH(h,c) ((h*283) + (c & 0xdf))
YMO_HTTP_HDR_HASH_INIT

Default hash initialization function used by header table in the absence of weak links.

Definition
#    define YMO_HTTP_HDR_HASH_INIT() 5

Default hash item comparison function used by header table used when weak links are not available.

void ymo_http_hdr_table_init(ymo_http_hdr_table_t *table)
ymo_http_hdr_id_t ymo_http_hdr_table_insert_precompute(ymo_http_hdr_table_t *table, ymo_http_hdr_id_t h_id, const char *hdr, size_t hdr_len, const char *value)
ymo_http_hdr_id_t ymo_http_hdr_table_add_precompute(ymo_http_hdr_table_t *table, ymo_http_hdr_id_t h_id, const char *hdr, size_t hdr_len, const char *value)
const char *ymo_http_hdr_table_get_id(const ymo_http_hdr_table_t *table, ymo_http_hdr_id_t h_id)