jabberd2
2.2.16
|
Go to the source code of this file.
Functions | |
static int | _c2s_client_sx_callback (sx_t s, sx_event_t e, void *data, void *arg) |
static int | _c2s_client_accept_check (c2s_t c2s, mio_fd_t fd, char *ip) |
static int | _c2s_client_mio_callback (mio_t m, mio_action_t a, mio_fd_t fd, void *data, void *arg) |
static void | _c2s_component_presence (c2s_t c2s, nad_t nad) |
int | c2s_router_sx_callback (sx_t s, sx_event_t e, void *data, void *arg) |
int | c2s_router_mio_callback (mio_t m, mio_action_t a, mio_fd_t fd, void *data, void *arg) |
static int _c2s_client_sx_callback | ( | sx_t | s, |
sx_event_t | e, | ||
void * | data, | ||
void * | arg | ||
) | [static] |
Definition at line 25 of file c2s.c.
References event_WANT_READ, log_debug, ZONE, mio_read, sess_st::c2s, c2s_st::mio, sess_st::fd, event_WANT_WRITE, mio_write, event_READ, mio_fd_st::fd, sess_st::rate, rate_check(), sess_st::rate_log, _sx_st::state, state_STREAM, sess_st::resources, log_write(), c2s_st::log, jid_user(), bres_st::jid, sess_st::ip, sess_st::port, rate_left(), _sx_buf_st::len, _sx_buf_st::data, rate_add(), MIO_WOULDBLOCK, MIO_STRERROR, MIO_ERROR, sx_kill(), c2s_st::http_forward, sess_st::active, sess_st::sasl_authd, sess_st::result, event_WRITE, state_OPEN, event_ERROR, _sx_error_st::generic, _sx_error_st::specific, event_STREAM, _sx_st::req_to, sx_error(), stream_err_HOST_UNKNOWN, sx_close(), xhash_get(), c2s_st::stream_redirects, stream_redirect_st::to_address, stream_redirect_st::to_port, sx_error_extended(), stream_err_SEE_OTHER_HOST, sess_st::host, c2s_st::hosts, c2s_st::vhost, c2s_st::sm_avail, stream_err_HOST_GONE, pmalloc(), xhash_pool(), host_st::realm, pstrdup(), xhash_put(), host_st::host_pemfile, sess_st::s, _sx_st::flags, SX_SSL_STARTTLS_OFFER, host_st::host_require_starttls, SX_SSL_STARTTLS_REQUIRE, event_PACKET, sess_st::packet_count, c2s_st::packet_count, sess_st::stanza_rate, sess_st::stanza_rate_log, NAD_ENAME_L, NAD_ENAME, NAD_ENS, nad_find_namespace(), uri_CLIENT, nad_free(), nad_find_scoped_namespace(), uri_BIND, nad_find_elem(), nad_find_attr(), jid_new(), _sx_st::auth_id, NAD_CDATA_L, sx_nad_write, stanza_error(), stanza_err_BAD_REQUEST, NAD_CDATA, jid_reset_components(), jid_st::node, jid_st::domain, bres_st::next, jid_st::resource, jid_random_part(), jid_RESOURCE, sess_st::bound, _sx_st::tag, jid_full(), nad_new(), nad_add_namespace(), nad_append_elem(), nad_set_attr(), NAD_AVAL, NAD_AVAL_L, nad_append_cdata(), bres_st::c2s_id, sm_start(), stanza_err_ITEM_NOT_FOUND, sm_end(), stream_err_NOT_AUTHORIZED, _sx_st::ssf, stream_err_POLICY_VIOLATION, authreg_process(), stanza_err_UNKNOWN_SENDER, sm_packet(), event_OPEN, _sx_st::auth_method, _sx_st::ip, _sx_st::port, _sx_st::compressed, event_CLOSED, and mio_close.
Referenced by _c2s_client_mio_callback().
Definition at line 510 of file c2s.c.
References access_check(), c2s_st::access, log_write(), c2s_st::log, mio_fd_st::fd, c2s_st::conn_rate_total, xhash_get(), c2s_st::conn_rates, rate_new(), c2s_st::conn_rate_seconds, c2s_st::conn_rate_wait, xhash_put(), pstrdup(), xhash_pool(), pool_cleanup(), rate_free(), rate_check(), and rate_add().
Referenced by _c2s_client_mio_callback().
static int _c2s_client_mio_callback | ( | mio_t | m, |
mio_action_t | a, | ||
mio_fd_t | fd, | ||
void * | data, | ||
void * | arg | ||
) | [static] |
Definition at line 537 of file c2s.c.
References action_READ, log_debug, ZONE, mio_fd_st::fd, sess_st::last_activity, sx_kill(), sess_st::s, sx_can_read(), action_WRITE, sx_can_write(), action_CLOSE, log_write(), sess_st::c2s, c2s_st::log, sess_st::fd, sess_st::ip, sess_st::port, sess_st::resources, jid_full(), bres_st::jid, sess_st::packet_count, sess_st::active, bres_st::next, sm_end(), jqueue_push(), c2s_st::dead, xhash_zap(), c2s_st::sessions, sess_st::skey, c2s_st::dead_sess, action_ACCEPT, j_inet_getport(), _c2s_client_accept_check(), c2s_st::fd, sx_new(), c2s_st::sx_env, _c2s_client_sx_callback(), mio_app, c2s_st::stanza_size_limit, c2s_st::byte_rate_total, rate_new(), c2s_st::byte_rate_seconds, c2s_st::byte_rate_wait, c2s_st::stanza_rate_total, c2s_st::stanza_rate_seconds, c2s_st::stanza_rate_wait, xhash_put(), SX_SASL_OFFER, c2s_st::local_ssl_port, SX_SSL_WRAPPER, c2s_st::compression, SX_COMPRESS_OFFER, and sx_server_init().
Referenced by c2s_router_sx_callback().
Definition at line 647 of file c2s.c.
References nad_find_attr(), nad_free(), NAD_AVAL, NAD_AVAL_L, log_debug, ZONE, xhash_put(), c2s_st::sm_avail, pstrdup(), xhash_pool(), xhash_get(), xhash_iter_first(), c2s_st::sessions, xhashv::sess_val, xhash_iter_get(), xhashv::val, sess_st::resources, bres_st::jid, jid_st::domain, jid_user(), sess_st::active, sess_st::s, sx_close(), xhash_iter_next(), and xhash_zap().
Referenced by c2s_router_sx_callback().
int c2s_router_sx_callback | ( | sx_t | s, |
sx_event_t | e, | ||
void * | data, | ||
void * | arg | ||
) |
Definition at line 699 of file c2s.c.
References event_WANT_READ, log_debug, ZONE, mio_read, c2s_st::mio, c2s_st::fd, event_WANT_WRITE, mio_write, event_READ, mio_fd_st::fd, _sx_buf_st::data, _sx_buf_st::len, MIO_WOULDBLOCK, log_write(), c2s_st::log, MIO_STRERROR, MIO_ERROR, sx_kill(), event_WRITE, event_ERROR, _sx_error_st::generic, _sx_error_st::specific, _sx_error_st::code, SX_ERR_AUTH, sx_close(), event_STREAM, event_OPEN, c2s_st::retry_left, c2s_st::retry_lost, nad_new(), nad_add_namespace(), uri_COMPONENT, nad_append_elem(), nad_append_attr(), c2s_st::id, sx_nad_write, c2s_st::router, event_PACKET, NAD_ENS, nad_free(), _sx_st::state, state_STREAM, NAD_NURI_L, uri_STREAMS, NAD_NURI, NAD_ENAME_L, NAD_ENAME, c2s_st::sx_ssl, c2s_st::router_pemfile, _sx_st::ssf, nad_find_scoped_namespace(), uri_TLS, nad_find_elem(), sx_ssl_client_starttls(), sx_sasl_auth(), c2s_st::sx_sasl, c2s_st::router_user, c2s_st::router_pass, state_OPEN, c2s_st::online, nad_find_attr(), NAD_AVAL_L, NAD_AVAL, c2s_st::server_fd, c2s_st::local_port, mio_listen, c2s_st::local_ip, _c2s_client_mio_callback(), c2s_st::local_ssl_port, c2s_st::local_pemfile, c2s_st::pbx_pipe, c2s_pbx_init(), c2s_st::started, _c2s_component_presence(), nad_st::ecur, nad_find_namespace(), uri_SESSION, xhash_get(), c2s_st::sessions, nad_print(), bres_st::jid, jid_new(), bres_st::c2s_id, bres_st::sm_id, sess_st::c2s, sess_st::result, sess_st::skey, sm_end(), jid_free(), sess_st::s, sx_error(), stream_err_INTERNAL_SERVER_ERROR, sess_st::resources, bres_st::next, _sx_st::auth_id, _sx_st::tag, sess_st::active, sess_st::bound, stream_err_CONFLICT, jid_full(), bres_st::sm_request, c2s_st::ar, authreg_st::delete_user, jid_st::node, sess_st::host, host_st::realm, stanza_error(), stanza_err_INTERNAL_SERVER_ERROR, sess_st::smcomp, sess_st::sasl_authd, sx_auth(), sm_packet(), uri_CLIENT, sess_st::packet_count, c2s_st::packet_count, nad_set_attr(), nad_st::elems, nad_elem_st::ns, nad_st::nss, nad_ns_st::next, sx_nad_write_elem(), event_CLOSED, and mio_close.
Referenced by _c2s_router_connect().
int c2s_router_mio_callback | ( | mio_t | m, |
mio_action_t | a, | ||
mio_fd_t | fd, | ||
void * | data, | ||
void * | arg | ||
) |
Definition at line 1356 of file c2s.c.
References action_READ, log_debug, ZONE, mio_fd_st::fd, sx_kill(), c2s_st::router, sx_can_read(), action_WRITE, sx_can_write(), action_CLOSE, log_write(), c2s_st::log, c2s_lost_router, c2s_st::online, and action_ACCEPT.
Referenced by _c2s_router_connect().