jabberd2
2.2.16
|
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) | |
int | xhash_count (xht h) |
return the total number of entries in this xht | |
pool_t | xhash_pool (xht h) |
get our pool | |
int | xhash_iter_first (xht h) |
iteration | |
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 int _xhasher | ( | const char * | s, |
int | len | ||
) | [static] |
Definition at line 29 of file xhash.c.
Referenced by xhash_putx(), xhash_getx(), xhash_zapx(), and xhash_iter_zap().
Definition at line 49 of file xhash.c.
References xht_struct::prime, xht_struct::count, xht_struct::stat, xht_struct::zen, xhn_struct::key, xht_struct::free_list, xhn_struct::next, pmalloco(), xht_struct::p, and xhn_struct::prev.
Referenced by xhash_putx().
Definition at line 85 of file xhash.c.
References xht_struct::prime, xht_struct::zen, xhn_struct::next, xhn_struct::key, and xhn_struct::keylen.
Referenced by xhash_putx(), xhash_getx(), 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 pool_heap, pmalloco(), xht_struct::prime, xht_struct::p, xht_struct::zen, xht_struct::free_list, xht_struct::iter_bucket, xht_struct::iter_node, and xht_struct::stat.
Referenced by JABBER_MAIN(), aci_load(), router_mio_callback(), user_table_load(), in_mio_callback(), out_route(), _dns_result_a(), dns_resolve_domain(), mm_new(), _disco_unify_lists(), _disco_pkt_sm_populate(), module_init(), _iq_private_in_sess(), _privacy_user_load(), _roster_user_load(), _roster_publish_get_group_name(), _roster_publish_user_load(), _template_roster_reload(), sx_ssl_server_addcert(), config_new(), and _pool_new().
void xhash_putx | ( | xht | h, |
const char * | key, | ||
int | len, | ||
void * | val | ||
) |
Definition at line 130 of file xhash.c.
References _xhasher(), xht_struct::dirty, _xhash_node_get(), xhn_struct::key, xhn_struct::keylen, xhn_struct::val, and _xhash_node_new().
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_sx_callback(), _c2s_client_accept_check(), _c2s_client_mio_callback(), _c2s_component_presence(), _c2s_config_expand(), _c2s_hosts_expand(), JABBER_MAIN(), _sm_hosts_expand(), _s2s_hosts_expand(), _s2s_time_checks(), _pbx_process_command(), sm_register_ns(), sm_unregister_ns(), sm_storage_rate_limit(), aci_load(), _route_add(), _router_process_bind(), _router_sx_callback(), _router_accept_check(), router_mio_callback(), user_table_load(), user_load(), in_mio_callback(), _in_sx_callback(), _in_result(), _out_packet_queue(), _out_dialback(), _out_dns_mark_bad(), out_route(), _dns_add_result(), _dns_add_host(), _out_result(), _out_verify(), feature_register(), feature_unregister(), mm_new(), _disco_unify_walker(), _disco_pkt_sm_populate(), module_init(), _iq_private_in_sess(), _privacy_user_load(), _privacy_in_sess(), _roster_in_sess_s10n(), _roster_set_item(), _roster_user_load(), _roster_publish_get_group_name(), _roster_publish_user_load(), _template_roster_reload(), sess_start(), sx_ssl_server_addcert(), config_load_with_id(), nad_new(), nad_free(), and _pool_new().
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 _s2s_check_conn_routes(), _s2s_time_checks(), _router_route_unbind_walker(), dns_select(), out_route(), _out_mio_callback(), _out_verify(), out_bounce_route_queue(), out_flush_route_queue(), _privacy_in_sess(), _session_in_router(), 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_sx_callback(), _c2s_client_accept_check(), _c2s_component_presence(), c2s_router_sx_callback(), _c2s_sx_sasl_callback(), _router_sx_sasl_callback(), _s2s_time_checks(), _pbx_process_command(), sm_register_ns(), sm_unregister_ns(), sm_get_ns(), sm_storage_rate_limit(), aci_check(), _route_add(), _route_remove(), _router_process_bind(), _router_process_unbind(), _router_process_route(), _router_accept_check(), user_load(), user_create(), _in_result(), _in_packet(), _out_packet_queue(), _out_dns_mark_bad(), out_route(), out_packet(), _dns_add_result(), _dns_add_host(), out_resolve(), _out_mio_callback(), send_dialbacks(), feature_register(), feature_unregister(), mm_new(), _disco_unify_walker(), _disco_agents_result(), _disco_pkt_sm_populate(), _disco_pkt_sm(), _disco_pkt_router(), _help_pkt_sm(), _iq_private_in_sess(), _presence_in_router(), _privacy_user_load(), _privacy_action(), _privacy_in_sess(), _roster_in_sess_s10n(), _roster_set_item(), _roster_pkt_user(), _roster_user_load(), _roster_publish_get_group_name(), _roster_publish_user_load(), pres_trust(), sess_start(), _sx_ssl_client(), _sx_ssl_server(), sx_ssl_server_addcert(), config_load_with_id(), config_get(), config_get_one(), config_count(), and config_get_attr().
Definition at line 190 of file xhash.c.
References xht_struct::prime, xht_struct::zen, xht_struct::iter_node, xhn_struct::prev, xhn_struct::next, xht_struct::free_list, xhn_struct::key, xhn_struct::val, xht_struct::dirty, xht_struct::count, and xht_struct::stat.
Referenced by xhash_zapx(), and xhash_iter_zap().
void xhash_zapx | ( | xht | h, |
const char * | key, | ||
int | len | ||
) |
Definition at line 219 of file xhash.c.
References _xhasher(), _xhash_node_get(), and xhash_zap_inner().
Referenced by _s2s_check_conn_routes(), _router_route_unbind_walker(), _out_mio_callback(), 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(), _s2s_time_checks(), _pbx_process_command(), sm_unregister_ns(), _route_remove(), _router_process_unbind(), router_mio_callback(), user_free(), in_mio_callback(), _in_sx_callback(), out_route(), out_resolve(), _out_mio_callback(), send_dialbacks(), out_bounce_route_queue(), out_flush_route_queue(), feature_unregister(), mm_new(), _disco_pkt_router(), _privacy_in_sess(), _roster_set_item(), _roster_user_load(), _roster_publish_get_group_name(), _roster_publish_user_load(), _sess_end_guts(), nad_free(), and pool_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 pool_free(), and xht_struct::p.
Referenced by JABBER_MAIN(), _s2s_time_checks(), _s2s_dns_expiry(), aci_unload(), router_mio_callback(), user_table_load(), user_table_unload(), out_route(), _dns_result_a(), out_resolve(), mm_free(), _disco_unify_lists(), _disco_pkt_router(), _disco_free_walker(), _disco_free(), _iq_private_in_sess(), _privacy_free_z(), _roster_freeuser(), _roster_publish_free(), _template_roster_reload(), _template_roster_free(), _sx_ssl_unload(), sx_ssl_server_addcert(), and config_free().
void xhash_stat | ( | xht | h | ) |
Definition at line 250 of file xhash.c.
References xht_struct::prime, xht_struct::count, and xht_struct::stat.
void xhash_walk | ( | xht | h, |
xhash_walker | w, | ||
void * | arg | ||
) |
Definition at line 268 of file xhash.c.
References xht_struct::prime, xht_struct::zen, xhn_struct::next, xhn_struct::key, xhn_struct::val, and xhn_struct::keylen.
Referenced by _router_advertise(), _router_process_bind(), _router_process_route(), router_mio_callback(), mm_free(), _announce_pkt_sm(), _disco_unify_lists(), _disco_free(), _privacy_in_sess(), _roster_freeuser(), _roster_in_sess(), _roster_publish_free(), and config_free().
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 _s2s_time_checks(), sm_register_ns(), _router_process_route(), _dns_add_result(), _dns_add_host(), _dns_result_srv(), _dns_result_a(), and out_resolve().
get our pool
Definition at line 305 of file xhash.c.
References xht_struct::p.
Referenced by _c2s_client_sx_callback(), _c2s_client_accept_check(), _c2s_component_presence(), _c2s_config_expand(), _c2s_hosts_expand(), JABBER_MAIN(), _sm_hosts_expand(), _s2s_hosts_expand(), sm_register_ns(), sm_storage_rate_limit(), aci_load(), _router_process_bind(), _router_sx_callback(), _router_accept_check(), user_table_load(), in_mio_callback(), _in_result(), _out_dialback(), out_route(), _dns_add_result(), _dns_add_host(), _out_result(), _out_verify(), feature_register(), _disco_pkt_sm_populate(), module_init(), _template_roster_reload(), config_load_with_id(), _config_expandx(), nad_new(), and nad_free().
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(), JABBER_MAIN(), _router_time_checks(), _s2s_check_conn_routes(), _s2s_time_checks(), _s2s_dns_expiry(), sm_sx_callback(), sm_storage_rate_limit(), aci_unload(), _router_process_route(), dns_select(), _dns_result_a(), _out_mio_callback(), send_dialbacks(), out_bounce_domain_queues(), out_bounce_conn_queues(), out_flush_domain_queues(), _disco_items_result(), _disco_info_result(), _disco_agents_result(), _disco_sessions_result(), _privacy_free_z(), _session_pkt_router(), _template_roster_user_create(), pres_update(), pres_probe(), and _sx_ssl_unload().
int xhash_iter_next | ( | xht | h | ) |
Definition at line 320 of file xhash.c.
References xht_struct::iter_node, xhn_struct::next, xhn_struct::key, xhn_struct::val, xht_struct::zen, xht_struct::iter_bucket, xhn_struct::prev, xht_struct::free_list, and xht_struct::prime.
Referenced by _c2s_component_presence(), _c2s_time_checks(), JABBER_MAIN(), _router_time_checks(), _s2s_check_conn_routes(), _s2s_time_checks(), _s2s_dns_expiry(), sm_sx_callback(), sm_storage_rate_limit(), aci_unload(), _router_process_route(), dns_select(), _dns_result_a(), _out_mio_callback(), send_dialbacks(), out_bounce_domain_queues(), out_bounce_conn_queues(), out_flush_domain_queues(), _disco_items_result(), _disco_info_result(), _disco_agents_result(), _disco_sessions_result(), _privacy_free_z(), _session_pkt_router(), _template_roster_user_create(), pres_update(), pres_probe(), _sx_ssl_unload(), and xhash_iter_first().
void xhash_iter_zap | ( | xht | h | ) |
Definition at line 363 of file xhash.c.
References xht_struct::iter_node, _xhasher(), xhn_struct::key, xhn_struct::keylen, and xhash_zap_inner().
Referenced by _s2s_dns_expiry(), and _dns_result_a().
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(), JABBER_MAIN(), _router_time_checks(), _s2s_check_conn_routes(), _s2s_time_checks(), _s2s_dns_expiry(), sm_sx_callback(), sm_storage_rate_limit(), aci_unload(), _router_process_route(), dns_select(), _dns_result_a(), _out_mio_callback(), send_dialbacks(), out_bounce_domain_queues(), out_bounce_conn_queues(), out_flush_domain_queues(), _disco_items_result(), _disco_info_result(), _disco_agents_result(), _disco_sessions_result(), _privacy_free_z(), _session_pkt_router(), _template_roster_user_create(), pres_update(), pres_probe(), and _sx_ssl_unload().