jabberd2
2.3.3
|
Go to the source code of this file.
Data Structures | |
struct | bres_st |
list of resources bound to session More... | |
struct | sess_st |
There is one instance of this struct per user who is logged in to this c2s instance. More... | |
struct | host_st |
struct | c2s_st |
struct | authreg_st |
union | xhashv |
session packet handling More... | |
struct | stream_redirect_st |
Macros | |
#define | DLLEXPORT |
#define | C2S_API |
#define | AR_MECH_TRAD_PLAIN (1<<0) |
#define | AR_MECH_TRAD_DIGEST (1<<1) |
#define | AR_MECH_TRAD_CRAMMD5 (1<<2) |
Typedefs | |
typedef struct host_st * | host_t |
typedef struct c2s_st * | c2s_t |
typedef struct bres_st * | bres_t |
typedef struct sess_st * | sess_t |
typedef struct authreg_st * | authreg_t |
typedef int(* | ar_module_init_fn) (authreg_t) |
type for the module init function More... | |
typedef struct stream_redirect_st * | stream_redirect_t |
Functions | |
C2S_API int | c2s_router_mio_callback (mio_t m, mio_action_t a, mio_fd_t fd, void *data, void *arg) |
C2S_API int | c2s_router_sx_callback (sx_t s, sx_event_t e, void *data, void *arg) |
C2S_API void | sm_start (sess_t sess, bres_t res) |
C2S_API void | sm_end (sess_t sess, bres_t res) |
C2S_API void | sm_create (sess_t sess, bres_t res) |
C2S_API void | sm_delete (sess_t sess, bres_t res) |
C2S_API void | sm_packet (sess_t sess, bres_t res, nad_t nad) |
C2S_API int | bind_init (sx_env_t env, sx_plugin_t p, va_list args) |
plugin initialiser More... | |
C2S_API void | c2s_pbx_init (c2s_t c2s) |
JABBERD2_API int | address_init (sx_env_t env, sx_plugin_t p, va_list args) |
args: none More... | |
C2S_API authreg_t | authreg_init (c2s_t c2s, const char *name) |
get a handle for a single module More... | |
C2S_API void | authreg_free (authreg_t ar) |
shut down More... | |
C2S_API int | authreg_process (c2s_t c2s, sess_t sess, nad_t nad) |
the main authreg processor More... | |
Variables | |
sig_atomic_t | c2s_lost_router |
#define AR_MECH_TRAD_PLAIN (1<<0) |
Definition at line 120 of file c2s.h.
Referenced by _authreg_auth_get(), _authreg_auth_set(), and _c2s_config_expand().
#define AR_MECH_TRAD_DIGEST (1<<1) |
Definition at line 121 of file c2s.h.
Referenced by _authreg_auth_get(), _authreg_auth_set(), and _c2s_config_expand().
#define AR_MECH_TRAD_CRAMMD5 (1<<2) |
Definition at line 122 of file c2s.h.
Referenced by _authreg_auth_get(), _authreg_auth_set(), and _c2s_config_expand().
typedef struct authreg_st* authreg_t |
typedef int(* ar_module_init_fn) (authreg_t) |
typedef struct stream_redirect_st * stream_redirect_t |
C2S_API int c2s_router_mio_callback | ( | mio_t | m, |
mio_action_t | a, | ||
mio_fd_t | fd, | ||
void * | data, | ||
void * | arg | ||
) |
Definition at line 1376 of file c2s.c.
References action_ACCEPT, action_CLOSE, action_READ, action_WRITE, c2s_lost_router, mio_fd_st::fd, c2s_st::log, log_debug, log_write(), c2s_st::online, c2s_st::router, sx_can_read(), sx_can_write(), sx_kill(), and ZONE.
Referenced by _c2s_router_connect().
C2S_API int c2s_router_sx_callback | ( | sx_t | s, |
sx_event_t | e, | ||
void * | data, | ||
void * | arg | ||
) |
Definition at line 711 of file c2s.c.
References _c2s_client_mio_callback(), _c2s_component_presence(), sess_st::active, c2s_st::ar, _sx_st::auth_id, sess_st::bound, sess_st::c2s, bres_st::c2s_id, c2s_pbx_init(), _sx_error_st::code, _sx_buf_st::data, authreg_st::delete_user, nad_st::ecur, nad_st::elems, event_CLOSED, event_ERROR, event_OPEN, event_PACKET, event_READ, event_STREAM, event_WANT_READ, event_WANT_WRITE, event_WRITE, mio_fd_st::fd, c2s_st::fd, _sx_error_st::generic, sess_st::host, c2s_st::id, bres_st::jid, jid_free(), jid_full(), jid_new(), _sx_buf_st::len, c2s_st::local_ip, c2s_st::local_pemfile, c2s_st::local_port, c2s_st::local_ssl_port, c2s_st::log, log_debug, log_write(), c2s_st::mio, mio_close, MIO_ERROR, mio_listen, mio_read, MIO_STRERROR, MIO_WOULDBLOCK, mio_write, nad_add_namespace(), nad_append_attr(), nad_append_elem(), NAD_AVAL, NAD_AVAL_L, NAD_ENAME, NAD_ENAME_L, NAD_ENS, nad_find_attr(), nad_find_elem(), nad_find_namespace(), nad_find_scoped_namespace(), nad_free(), nad_new(), NAD_NURI, NAD_NURI_L, nad_print(), nad_set_attr(), bres_st::next, nad_ns_st::next, jid_st::node, nad_elem_st::ns, nad_st::nss, c2s_st::online, sess_st::packet_count, c2s_st::packet_count, c2s_st::pbx_pipe, host_st::realm, sess_st::resources, sess_st::result, c2s_st::retry_left, c2s_st::retry_lost, c2s_st::router, c2s_st::router_pass, c2s_st::router_pemfile, c2s_st::router_private_key_password, c2s_st::router_user, sess_st::s, sess_st::sasl_authd, c2s_st::server_fd, c2s_st::sessions, sess_st::skey, sm_end(), bres_st::sm_id, sm_packet(), bres_st::sm_request, sess_st::smcomp, _sx_error_st::specific, _sx_st::ssf, stanza_err_INTERNAL_SERVER_ERROR, stanza_error(), c2s_st::started, _sx_st::state, state_OPEN, state_STREAM, stream_err_CONFLICT, stream_err_INTERNAL_SERVER_ERROR, sx_auth(), sx_close(), SX_ERR_AUTH, sx_error(), sx_kill(), sx_nad_write, sx_nad_write_elem(), c2s_st::sx_sasl, sx_sasl_auth(), c2s_st::sx_ssl, sx_ssl_client_starttls(), _sx_st::tag, uri_CLIENT, uri_COMPONENT, uri_SESSION, uri_STREAMS, uri_TLS, xhash_get(), and ZONE.
Referenced by _c2s_router_connect().
Definition at line 66 of file sm.c.
References _sm_build_route(), _sm_generate_id(), sess_st::c2s, bres_st::jid, jid_full(), c2s_st::router, bres_st::sm_request, and sx_nad_write.
Referenced by _authreg_auth_set(), _c2s_client_sx_callback(), and _pbx_process_command().
Definition at line 72 of file sm.c.
References _sm_build_route(), sess_st::c2s, c2s_st::router, and sx_nad_write.
Referenced by _c2s_client_mio_callback(), _c2s_client_sx_callback(), _pbx_process_command(), and c2s_router_sx_callback().
Definition at line 76 of file sm.c.
References _sm_build_route(), _sm_generate_id(), sess_st::c2s, bres_st::jid, jid_user(), c2s_st::router, bres_st::sm_request, and sx_nad_write.
Referenced by _authreg_register_set().
Definition at line 82 of file sm.c.
References _sm_build_route(), sess_st::c2s, bres_st::jid, jid_user(), c2s_st::router, and sx_nad_write.
Referenced by _authreg_register_set().
Definition at line 86 of file sm.c.
References sess_st::c2s, bres_st::c2s_id, jid_st::domain, c2s_st::id, bres_st::jid, nad_add_namespace(), nad_append_namespace(), nad_set_attr(), nad_wrap_elem(), c2s_st::router, bres_st::sm_id, sess_st::smcomp, sx_nad_write, uri_COMPONENT, and uri_SESSION.
Referenced by _c2s_client_sx_callback(), _pbx_process_command(), and c2s_router_sx_callback().
C2S_API int bind_init | ( | sx_env_t | env, |
sx_plugin_t | p, | ||
va_list | args | ||
) |
plugin initialiser
args: c2s
Definition at line 69 of file bind.c.
References _bind_features(), _sx_plugin_st::features, log_debug, _sx_plugin_st::private, and ZONE.
Referenced by JABBER_MAIN().
Definition at line 120 of file pbx.c.
References _pbx_read_pipe(), c2s_st::log, log_debug, log_write(), c2s_st::pbx_pipe, and ZONE.
Referenced by c2s_router_sx_callback().
JABBERD2_API int address_init | ( | sx_env_t | env, |
sx_plugin_t | p, | ||
va_list | args | ||
) |
args: none
Definition at line 42 of file address.c.
References _address_features(), _sx_plugin_st::features, log_debug, and ZONE.
Referenced by JABBER_MAIN().
get a handle for a single module
get a handle for a single module
Definition at line 40 of file authreg.c.
References authreg_free(), authreg_st::c2s, c2s_st::config, config_get_one(), c2s_st::log, log_debug, log_write(), PATH_MAX, authreg_st::user_exists, and ZONE.
Referenced by JABBER_MAIN().
shut down
shut down
Definition at line 116 of file authreg.c.
References authreg_st::free.
Referenced by authreg_init(), and JABBER_MAIN().
the main authreg processor
the main authreg processor
Definition at line 668 of file authreg.c.
References _authreg_auth_get(), _authreg_auth_set(), _authreg_register_get(), _authreg_register_set(), log_debug, NAD_AVAL, NAD_AVAL_L, NAD_ENAME, NAD_ENAME_L, nad_find_attr(), nad_find_elem(), nad_find_scoped_namespace(), _sx_st::req_to, sess_st::s, sess_st::sasl_authd, stanza_err_BAD_REQUEST, stanza_err_NOT_ALLOWED, stanza_error(), stanza_tofrom(), sx_nad_write, uri_AUTH, uri_REGISTER, and ZONE.
Referenced by _c2s_client_sx_callback().
sig_atomic_t c2s_lost_router |
Definition at line 26 of file main.c.
Referenced by _c2s_router_connect(), _c2s_signal(), c2s_router_mio_callback(), and JABBER_MAIN().