jabberd2
2.3.6
|
Go to the source code of this file.
Functions | |
static jid_t | jid_reset_components_internal (jid_t jid, const char *node, const char *domain, const char *resource, int prepare) |
Forward declaration. More... | |
static int | jid_prep_pieces (char *node, char *domain, char *resource) |
do stringprep on the pieces More... | |
int | jid_prep (jid_t jid) |
do stringprep on the piece More... | |
jid_t | jid_new (const char *id, int len) |
make a new jid More... | |
void | jid_static (jid_t jid, jid_static_buf *buf) |
Make jid to use static buffer (jid data won't be allocated dynamically, but given buffer will be always used. More... | |
jid_t | jid_reset (jid_t jid, const char *id, int len) |
build a jid from an id More... | |
jid_t | jid_reset_components (jid_t jid, const char *node, const char *domain, const char *resource) |
build a jid from components More... | |
void | jid_free (jid_t jid) |
free a jid More... | |
void | jid_expand (jid_t jid) |
build user and full if they're out of date More... | |
const char * | jid_user (jid_t jid) |
expand and return the user More... | |
const char * | jid_full (jid_t jid) |
expand and return the full More... | |
int | jid_compare_user (jid_t a, jid_t b) |
compare the user portion of two jids More... | |
int | jid_compare_full (jid_t a, jid_t b) |
compare two full jids More... | |
jid_t | jid_dup (jid_t jid) |
duplicate a jid More... | |
int | jid_search (jid_t list, jid_t jid) |
util to search through jids More... | |
jid_t | jid_zap (jid_t list, jid_t jid) |
remove a jid_t from a list, returning the new list More... | |
jid_t | jid_append (jid_t list, jid_t jid) |
make a copy of jid, link into list (avoiding dups) More... | |
void | jid_random_part (jid_t jid, jid_part_t part) |
create random resource More... | |
|
static |
Forward declaration.
build a jid from components - internal version
Definition at line 199 of file jid.c.
References jid_st::_full, jid_st::_user, jid_st::dirty, jid_st::domain, jid_st::jid_data, jid_st::jid_data_len, jid_prep(), MAXLEN_JID_COMP, jid_st::node, and jid_st::resource.
Referenced by jid_prep(), and jid_reset_components().
|
static |
int jid_prep | ( | jid_t | jid | ) |
do stringprep on the piece
do string preparation on a jid
Definition at line 44 of file jid.c.
References jid_st::domain, jid_prep_pieces(), jid_reset_components_internal(), MAXLEN_JID_COMP, jid_st::node, and jid_st::resource.
Referenced by jid_random_part(), jid_reset(), and jid_reset_components_internal().
jid_t jid_new | ( | const char * | id, |
int | len | ||
) |
make a new jid
make a new jid, and call jid_reset() to populate it
Definition at line 81 of file jid.c.
References jid_st::jid_data, jid_reset(), log_debug, and ZONE.
Referenced by _announce_pkt_sm(), _authreg_auth_set(), _authreg_register_set(), _c2s_client_sx_callback(), _echo_pkt_sm(), _help_pkt_sm(), _in_packet(), _in_result(), _in_sx_callback(), _in_verify(), _out_result(), _out_verify(), _pbx_process_command(), _presence_pkt_sm(), _privacy_in_sess(), _privacy_user_load(), _roster_in_sess_s10n(), _roster_publish_user_load(), _roster_set_item(), _roster_user_load(), _router_process_bind(), _router_process_route(), _router_process_unbind(), _session_in_router(), _status_pkt_sm(), _template_roster_reload(), aci_load(), c2s_router_sx_callback(), module_init(), pkt_dup(), pkt_new(), pkt_router(), pkt_sess(), pres_update(), and s2s_router_sx_callback().
void jid_static | ( | jid_t | jid, |
jid_static_buf * | buf | ||
) |
Make jid to use static buffer (jid data won't be allocated dynamically, but given buffer will be always used.
JID may not be previously used!
Definition at line 102 of file jid.c.
References jid_st::jid_data.
Referenced by _c2s_sx_sasl_callback(), _router_process_route(), and _router_sx_callback().
build a jid from an id
clear and populate the jid with the given id.
Definition at line 113 of file jid.c.
References jid_st::dirty, jid_st::domain, jid_st::jid_data, jid_st::jid_data_len, jid_prep(), MAXLEN_JID, jid_st::node, and jid_st::resource.
Referenced by _c2s_sx_sasl_callback(), _router_process_route(), _router_sx_callback(), jid_new(), pres_deliver(), and pres_update().
jid_t jid_reset_components | ( | jid_t | jid, |
const char * | node, | ||
const char * | domain, | ||
const char * | resource | ||
) |
build a jid from components
Definition at line 281 of file jid.c.
References jid_reset_components_internal().
Referenced by _announce_pkt_sm(), _authreg_auth_set(), _authreg_register_set(), _c2s_client_sx_callback(), _echo_pkt_sm(), _help_pkt_sm(), _status_pkt_sm(), and jid_random_part().
void jid_free | ( | jid_t | jid | ) |
free a jid
free the jid
Definition at line 286 of file jid.c.
References jid_st::_full, jid_st::_user, jid_st::jid_data, and jid_st::jid_data_len.
Referenced by _announce_pkt_sm(), _deliver_in_sess(), _disco_free_walker(), _disco_pkt_router(), _echo_pkt_sm(), _help_pkt_sm(), _in_packet(), _in_result(), _in_sx_callback(), _in_verify(), _iq_private_in_sess(), _out_result(), _out_verify(), _presence_in_sess(), _presence_pkt_sm(), _privacy_in_sess(), _privacy_user_load(), _roster_freeuser_walker(), _roster_in_sess_s10n(), _roster_publish_free_walker(), _roster_publish_user_load(), _roster_set_item(), _router_process_bind(), _router_process_route(), _router_process_unbind(), _session_in_router(), _status_pkt_sm(), _template_roster_reload(), _user_alloc(), aci_check(), aci_load(), aci_unload(), c2s_router_sx_callback(), JABBER_MAIN(), jid_zap(), out_bounce_route_queue(), out_packet(), out_pkt_free(), pkt_free(), pkt_router(), pkt_sess(), pres_update(), sess_route(), and sess_start().
void jid_expand | ( | jid_t | jid | ) |
build user and full if they're out of date
expands user and full if the dirty flag is set
Definition at line 299 of file jid.c.
References jid_st::_full, jid_st::_user, jid_st::dirty, jid_st::domain, jid_st::node, and jid_st::resource.
Referenced by _vacation_pkt_user(), jid_compare_full(), jid_compare_user(), jid_full(), and jid_user().
const char* jid_user | ( | jid_t | jid | ) |
expand and return the user
return the user or full jid.
Definition at line 339 of file jid.c.
References jid_st::_user, and jid_expand().
Referenced by _active_user_create(), _active_user_delete(), _active_user_load(), _amp_in_sess(), _announce_broadcast_user(), _announce_in_sess(), _announce_pkt_sm(), _announce_user_delete(), _authreg_register_set(), _c2s_client_sx_callback(), _c2s_component_presence(), _disco_in_sess(), _echo_pkt_sm(), _help_pkt_sm(), _iq_last_pkt_user(), _iq_last_sess_end(), _iq_last_user_delete(), _iq_private_in_sess(), _iq_private_user_delete(), _iq_vcard_in_sess(), _iq_vcard_pkt_user(), _iq_vcard_user_delete(), _offline_in_sess(), _offline_pkt_user(), _offline_user_delete(), _pbx_process_command(), _pep_in_sess(), _pep_out_sess(), _pres_top(), _presence_in_router(), _presence_pkt_sm(), _privacy_action(), _privacy_in_router(), _privacy_in_sess(), _privacy_out_router(), _privacy_user_delete(), _privacy_user_load(), _roster_freeuser(), _roster_in_sess_s10n(), _roster_pkt_user(), _roster_publish_save_item(), _roster_publish_user_load(), _roster_save_item(), _roster_set_item(), _roster_user_delete(), _roster_user_load(), _router_process_route(), _status_in_sess(), _status_pkt_sm(), _status_sess_end(), _status_sess_start(), _status_user_delete(), _template_roster_save_item(), _unblock_jid(), _vacation_in_sess(), _vacation_user_delete(), _vacation_user_load(), _verify_user_delete(), _verify_user_load(), aci_check(), aci_load(), check_code(), pres_in(), pres_probe(), pres_trust(), pres_update(), send_email(), sess_end(), sess_start(), sm_create(), sm_delete(), user_create(), user_delete(), user_free(), and user_load().
const char* jid_full | ( | jid_t | jid | ) |
expand and return the full
Definition at line 347 of file jid.c.
References jid_st::_full, and jid_expand().
Referenced by _amp_pkt_sm(), _announce_broadcast_user(), _announce_in_sess(), _announce_pkt_sm(), _authreg_auth_set(), _authreg_register_set(), _c2s_client_mio_callback(), _c2s_client_sx_callback(), _deliver_in_sess(), _disco_agents_result(), _disco_in_sess(), _disco_items_result(), _disco_pkt_router(), _disco_pkt_sm(), _disco_pkt_sm_populate(), _disco_sessions_result(), _disco_unify_walker(), _disco_user_result(), _echo_pkt_sm(), _help_pkt_sm(), _iq_private_in_sess(), _iq_vcard_pkt_sm(), _iq_vcard_pkt_user(), _offline_in_sess(), _offline_pkt_user(), _offline_user_delete(), _pbx_process_command(), _pep_out_sess(), _pres_top(), _presence_in_sess(), _presence_pkt_sm(), _privacy_action(), _privacy_in_sess(), _privacy_result_builder(), _privacy_user_load(), _roster_in_sess_s10n(), _roster_insert_item(), _roster_pkt_user(), _roster_publish_save_item(), _roster_publish_user_load(), _roster_push(), _roster_save_item(), _roster_set_item(), _roster_user_load(), _router_process_route(), _session_in_router(), _session_pkt_router(), _sm_build_route(), _sm_generate_id(), _status_pkt_sm(), _template_roster_reload(), _template_roster_save_item(), _unblock_jid(), _vacation_pkt_user(), _verify_in_sess(), aci_check(), amp_build_response_pkt(), c2s_router_sx_callback(), dispatch(), module_init(), pkt_dup(), pkt_sess(), pkt_tofrom(), pres_deliver(), pres_error(), pres_in(), pres_probe(), pres_roster(), pres_trust(), pres_update(), sess_end(), sess_route(), sess_start(), sm_start(), and sm_storage_rate_limit().
compare the user portion of two jids
compare two user or full jids.
Definition at line 355 of file jid.c.
References jid_st::_user, and jid_expand().
Referenced by _amp_in_sess(), _deliver_in_sess(), _iq_private_in_sess(), _pep_in_sess(), _presence_in_sess(), pres_deliver(), and pres_trust().
compare two full jids
Definition at line 364 of file jid.c.
References jid_st::_full, and jid_expand().
Referenced by _deliver_in_sess(), _help_pkt_sm(), _privacy_action(), _privacy_in_sess(), _unblock_jid(), jid_append(), jid_search(), jid_zap(), pres_in(), and sess_start().
duplicate a jid
Definition at line 373 of file jid.c.
References jid_st::_full, jid_st::_user, jid_st::domain, jid_st::jid_data, jid_st::jid_data_len, jid_st::node, and jid_st::resource.
Referenced by _deliver_in_sess(), _disco_pkt_sm_populate(), _iq_vcard_pkt_sm(), _iq_vcard_pkt_user(), _presence_in_sess(), _roster_in_sess_s10n(), _user_alloc(), aci_check(), jid_append(), pkt_dup(), pkt_error(), and sess_start().
util to search through jids
list helpers
Definition at line 413 of file jid.c.
References jid_compare_full(), and jid_st::next.
Referenced by _help_pkt_sm(), _privacy_in_sess(), _unblock_jid(), aci_check(), pres_roster(), and pres_update().
remove a jid_t from a list, returning the new list
remove a jid from a list, and return the new list
Definition at line 423 of file jid.c.
References jid_compare_full(), jid_free(), and jid_st::next.
Referenced by pres_deliver(), pres_error(), and pres_in().
make a copy of jid, link into list (avoiding dups)
insert of a copy of jid into list, avoiding dups
Definition at line 464 of file jid.c.
References jid_compare_full(), jid_dup(), and jid_st::next.
Referenced by aci_load(), pres_deliver(), and pres_error().
void jid_random_part | ( | jid_t | jid, |
jid_part_t | part | ||
) |
create random resource
fill jid's resource with a random string
Definition at line 492 of file jid.c.
References jid_st::domain, jid_DOMAIN, jid_NODE, jid_prep(), jid_reset_components(), jid_RESOURCE, jid_st::node, jid_st::resource, and shahash_r().
Referenced by _c2s_client_sx_callback(), and _c2s_sx_sasl_callback().