jabberd2
2.3.1
|
Go to the source code of this file.
Functions | |
static int | _xhasher (const char *s, int len) |
static xhn | _xhash_node_new (xht h, int index) |
static xhn | _xhash_node_get (xht h, const char *key, int len, int index) |
xht | xhash_new (int prime) |
void | xhash_putx (xht h, const char *key, int len, void *val) |
void | xhash_put (xht h, const char *key, void *val) |
void * | xhash_getx (xht h, const char *key, int len) |
void * | xhash_get (xht h, const char *key) |
void | xhash_zap_inner (xht h, xhn n, int index) |
void | xhash_zapx (xht h, const char *key, int len) |
void | xhash_zap (xht h, const char *key) |
void | xhash_free (xht h) |
void | xhash_stat (xht h) |
void | xhash_walk (xht h, xhash_walker w, void *arg) |
int | xhash_dirty (xht h) |
return the dirty flag (and reset) More... | |
int | xhash_count (xht h) |
return the total number of entries in this xht More... | |
pool_t | xhash_pool (xht h) |
get our pool More... | |
int | xhash_iter_first (xht h) |
iteration More... | |
int | xhash_iter_next (xht h) |
void | xhash_iter_zap (xht h) |
int | xhash_iter_get (xht h, const char **key, int *keylen, void **val) |
|
static |
Definition at line 29 of file xhash.c.
Referenced by xhash_getx(), xhash_iter_zap(), xhash_putx(), and xhash_zapx().
Definition at line 49 of file xhash.c.
References xht_struct::count, xht_struct::free_list, xhn_struct::key, xhn_struct::next, xht_struct::p, pmalloco(), xhn_struct::prev, xht_struct::prime, xht_struct::stat, and xht_struct::zen.
Referenced by xhash_putx().
Definition at line 85 of file xhash.c.
References xhn_struct::key, xhn_struct::keylen, xhn_struct::next, xht_struct::prime, and xht_struct::zen.
Referenced by xhash_getx(), xhash_putx(), and xhash_zapx().
xht xhash_new | ( | int | prime | ) |
NOTE: all xhash's memory should be allocated from the pool by using pmalloco()/pmallocx(), so that the xhash_free() can just call pool_free() simply.
Definition at line 96 of file xhash.c.
References xht_struct::free_list, xht_struct::iter_bucket, xht_struct::iter_node, xht_struct::p, pmalloco(), pool_heap, xht_struct::prime, xht_struct::stat, and xht_struct::zen.
Referenced by _disco_pkt_sm_populate(), _disco_unify_lists(), _dns_result_a(), _iq_private_in_sess(), _pool_new(), _privacy_user_load(), _roster_publish_get_group_name(), _roster_publish_user_load(), _roster_user_load(), _template_roster_reload(), aci_load(), config_new(), dns_resolve_domain(), in_mio_callback(), JABBER_MAIN(), mm_new(), module_init(), out_route(), router_mio_callback(), sx_ssl_server_addcert(), and user_table_load().
void xhash_putx | ( | xht | h, |
const char * | key, | ||
int | len, | ||
void * | val | ||
) |
Definition at line 130 of file xhash.c.
References _xhash_node_get(), _xhash_node_new(), _xhasher(), xht_struct::dirty, xhn_struct::key, xhn_struct::keylen, and xhn_struct::val.
Referenced by xhash_put().
void xhash_put | ( | xht | h, |
const char * | key, | ||
void * | val | ||
) |
Definition at line 163 of file xhash.c.
References xhash_putx().
Referenced by _c2s_client_accept_check(), _c2s_client_mio_callback(), _c2s_client_sx_callback(), _c2s_component_presence(), _c2s_config_expand(), _c2s_hosts_expand(), _disco_pkt_sm_populate(), _disco_unify_walker(), _dns_add_host(), _dns_add_result(), _in_result(), _in_sx_callback(), _iq_private_in_sess(), _out_dialback(), _out_dns_mark_bad(), _out_packet_queue(), _out_result(), _out_verify(), _pbx_process_command(), _pool_new(), _privacy_in_sess(), _privacy_user_load(), _roster_in_sess_s10n(), _roster_publish_get_group_name(), _roster_publish_user_load(), _roster_set_item(), _roster_user_load(), _route_add(), _router_accept_check(), _router_process_bind(), _router_sx_callback(), _s2s_hosts_expand(), _s2s_time_checks(), _sm_hosts_expand(), _template_roster_reload(), aci_load(), config_load_with_id(), feature_register(), feature_unregister(), in_mio_callback(), JABBER_MAIN(), mm_new(), module_init(), nad_free(), nad_new(), out_route(), router_mio_callback(), sess_start(), sm_register_ns(), sm_storage_rate_limit(), sm_unregister_ns(), sx_ssl_server_addcert(), user_load(), and user_table_load().
void* xhash_getx | ( | xht | h, |
const char * | key, | ||
int | len | ||
) |
Definition at line 170 of file xhash.c.
References _xhash_node_get(), _xhasher(), and xhn_struct::val.
Referenced by _out_mio_callback(), _out_verify(), _privacy_in_sess(), _router_route_unbind_walker(), _s2s_check_conn_routes(), _s2s_time_checks(), _session_in_router(), dns_select(), out_bounce_route_queue(), out_flush_route_queue(), out_route(), pkt_new(), and xhash_get().
void* xhash_get | ( | xht | h, |
const char * | key | ||
) |
Definition at line 184 of file xhash.c.
References xhash_getx().
Referenced by _bind_features(), _c2s_client_accept_check(), _c2s_client_sx_callback(), _c2s_component_presence(), _c2s_sx_sasl_callback(), _disco_agents_result(), _disco_pkt_router(), _disco_pkt_sm(), _disco_pkt_sm_populate(), _disco_unify_walker(), _dns_add_host(), _dns_add_result(), _help_pkt_sm(), _in_packet(), _in_result(), _iq_private_in_sess(), _out_dns_mark_bad(), _out_mio_callback(), _out_packet_queue(), _out_result(), _out_verify(), _pbx_process_command(), _presence_in_router(), _privacy_action(), _privacy_in_sess(), _privacy_user_load(), _roster_in_sess_s10n(), _roster_pkt_user(), _roster_publish_get_group_name(), _roster_publish_user_load(), _roster_set_item(), _roster_user_load(), _route_add(), _route_remove(), _router_accept_check(), _router_process_bind(), _router_process_route(), _router_process_unbind(), _router_sx_sasl_callback(), _s2s_time_checks(), _sx_ssl_client(), _sx_ssl_server(), aci_check(), c2s_router_sx_callback(), config_count(), config_get(), config_get_attr(), config_get_one(), config_load_with_id(), feature_register(), feature_unregister(), mm_new(), out_packet(), out_resolve(), out_route(), pres_trust(), send_dialbacks(), sess_start(), sm_get_ns(), sm_register_ns(), sm_storage_rate_limit(), sm_unregister_ns(), sx_ssl_server_addcert(), user_create(), and user_load().
Definition at line 190 of file xhash.c.
References xht_struct::count, xht_struct::dirty, xht_struct::free_list, xht_struct::iter_node, xhn_struct::key, xhn_struct::next, xhn_struct::prev, xht_struct::prime, xht_struct::stat, xhn_struct::val, and xht_struct::zen.
Referenced by xhash_iter_zap(), and xhash_zapx().
void xhash_zapx | ( | xht | h, |
const char * | key, | ||
int | len | ||
) |
Definition at line 219 of file xhash.c.
References _xhash_node_get(), _xhasher(), and xhash_zap_inner().
Referenced by _out_mio_callback(), _router_route_unbind_walker(), _s2s_check_conn_routes(), and xhash_zap().
void xhash_zap | ( | xht | h, |
const char * | key | ||
) |
Definition at line 235 of file xhash.c.
References xhash_zapx().
Referenced by _c2s_client_mio_callback(), _c2s_component_presence(), _disco_pkt_router(), _in_sx_callback(), _out_mio_callback(), _pbx_process_command(), _privacy_in_sess(), _roster_publish_get_group_name(), _roster_publish_user_load(), _roster_set_item(), _roster_user_load(), _route_remove(), _router_process_unbind(), _s2s_time_checks(), _sess_end_guts(), feature_unregister(), in_mio_callback(), mm_new(), nad_free(), out_bounce_route_queue(), out_flush_route_queue(), out_resolve(), out_route(), pool_free(), router_mio_callback(), send_dialbacks(), sm_unregister_ns(), and user_free().
void xhash_free | ( | xht | h | ) |
want to do more things? Please see the note in xhash_new() first.
Definition at line 241 of file xhash.c.
References xht_struct::p, and pool_free().
Referenced by _disco_free(), _disco_free_walker(), _disco_pkt_router(), _disco_unify_lists(), _dns_result_a(), _iq_private_in_sess(), _privacy_free_z(), _roster_freeuser(), _roster_publish_free(), _s2s_dns_expiry(), _s2s_time_checks(), _sx_ssl_unload(), _template_roster_free(), _template_roster_reload(), aci_unload(), config_free(), JABBER_MAIN(), mm_free(), out_resolve(), out_route(), router_mio_callback(), sx_ssl_server_addcert(), user_table_load(), and user_table_unload().
void xhash_stat | ( | xht | h | ) |
Definition at line 250 of file xhash.c.
References xht_struct::count, xht_struct::prime, and xht_struct::stat.
void xhash_walk | ( | xht | h, |
xhash_walker | w, | ||
void * | arg | ||
) |
Definition at line 268 of file xhash.c.
References xhn_struct::key, xhn_struct::keylen, xhn_struct::next, xht_struct::prime, xhn_struct::val, and xht_struct::zen.
Referenced by _announce_pkt_sm(), _disco_free(), _disco_unify_lists(), _privacy_in_sess(), _roster_freeuser(), _roster_in_sess(), _roster_publish_free(), _router_advertise(), _router_process_bind(), _router_process_route(), config_free(), mm_free(), and router_mio_callback().
int xhash_dirty | ( | xht | h | ) |
return the dirty flag (and reset)
Definition at line 285 of file xhash.c.
References xht_struct::dirty.
int xhash_count | ( | xht | h | ) |
return the total number of entries in this xht
Definition at line 297 of file xhash.c.
References xht_struct::count.
Referenced by _dns_add_host(), _dns_add_result(), _dns_result_a(), _dns_result_srv(), _router_process_route(), _s2s_time_checks(), out_resolve(), and sm_register_ns().
get our pool
Definition at line 305 of file xhash.c.
References xht_struct::p.
Referenced by _c2s_client_accept_check(), _c2s_client_sx_callback(), _c2s_component_presence(), _c2s_config_expand(), _c2s_hosts_expand(), _config_expandx(), _disco_pkt_sm_populate(), _dns_add_host(), _dns_add_result(), _in_result(), _out_dialback(), _out_result(), _out_verify(), _router_accept_check(), _router_process_bind(), _router_sx_callback(), _s2s_hosts_expand(), _sm_hosts_expand(), _template_roster_reload(), aci_load(), config_load_with_id(), feature_register(), in_mio_callback(), JABBER_MAIN(), module_init(), nad_free(), nad_new(), out_route(), sm_register_ns(), sm_storage_rate_limit(), and user_table_load().
int xhash_iter_first | ( | xht | h | ) |
iteration
Definition at line 311 of file xhash.c.
References xht_struct::iter_bucket, xht_struct::iter_node, and xhash_iter_next().
Referenced by _c2s_component_presence(), _c2s_time_checks(), _disco_agents_result(), _disco_info_result(), _disco_items_result(), _disco_sessions_result(), _dns_result_a(), _out_mio_callback(), _privacy_free_z(), _router_process_route(), _router_time_checks(), _s2s_check_conn_routes(), _s2s_dns_expiry(), _s2s_time_checks(), _session_pkt_router(), _sx_ssl_unload(), _template_roster_user_create(), aci_unload(), dns_select(), JABBER_MAIN(), out_bounce_conn_queues(), out_bounce_domain_queues(), out_flush_domain_queues(), pres_probe(), pres_update(), send_dialbacks(), sm_storage_rate_limit(), and sm_sx_callback().
int xhash_iter_next | ( | xht | h | ) |
Definition at line 320 of file xhash.c.
References xht_struct::free_list, xht_struct::iter_bucket, xht_struct::iter_node, xhn_struct::key, xhn_struct::next, xhn_struct::prev, xht_struct::prime, xhn_struct::val, and xht_struct::zen.
Referenced by _c2s_component_presence(), _c2s_time_checks(), _disco_agents_result(), _disco_info_result(), _disco_items_result(), _disco_sessions_result(), _dns_result_a(), _out_mio_callback(), _privacy_free_z(), _router_process_route(), _router_time_checks(), _s2s_check_conn_routes(), _s2s_dns_expiry(), _s2s_time_checks(), _session_pkt_router(), _sx_ssl_unload(), _template_roster_user_create(), aci_unload(), dns_select(), JABBER_MAIN(), out_bounce_conn_queues(), out_bounce_domain_queues(), out_flush_domain_queues(), pres_probe(), pres_update(), send_dialbacks(), sm_storage_rate_limit(), sm_sx_callback(), and xhash_iter_first().
void xhash_iter_zap | ( | xht | h | ) |
Definition at line 363 of file xhash.c.
References _xhasher(), xht_struct::iter_node, xhn_struct::key, xhn_struct::keylen, and xhash_zap_inner().
Referenced by _dns_result_a(), and _s2s_dns_expiry().
int xhash_iter_get | ( | xht | h, |
const char ** | key, | ||
int * | keylen, | ||
void ** | val | ||
) |
Definition at line 374 of file xhash.c.
References xht_struct::iter_node, xhn_struct::key, xhn_struct::keylen, and xhn_struct::val.
Referenced by _c2s_component_presence(), _c2s_time_checks(), _disco_agents_result(), _disco_info_result(), _disco_items_result(), _disco_sessions_result(), _dns_result_a(), _out_mio_callback(), _privacy_free_z(), _router_process_route(), _router_time_checks(), _s2s_check_conn_routes(), _s2s_dns_expiry(), _s2s_time_checks(), _session_pkt_router(), _sx_ssl_unload(), _template_roster_user_create(), aci_unload(), dns_select(), JABBER_MAIN(), out_bounce_conn_queues(), out_bounce_domain_queues(), out_flush_domain_queues(), pres_probe(), pres_update(), send_dialbacks(), sm_storage_rate_limit(), and sm_sx_callback().