jabberd2
2.2.16
|
Go to the source code of this file.
Functions | |
static void | _c2s_signal (int signum) |
static void | _c2s_signal_hup (int signum) |
static void | _c2s_signal_usr1 (int signum) |
static void | _c2s_signal_usr2 (int signum) |
static void | _c2s_pidfile (c2s_t c2s) |
store the process id | |
static void | _c2s_config_expand (c2s_t c2s) |
pull values out of the config file | |
static void | _c2s_hosts_expand (c2s_t c2s) |
static int | _c2s_router_connect (c2s_t c2s) |
static int | _c2s_sx_sasl_callback (int cb, void *arg, void **res, sx_t s, void *cbarg) |
static void | _c2s_time_checks (c2s_t c2s) |
JABBER_MAIN ("jabberd2c2s","Jabber 2 C2S","Jabber Open Source Server: Client to Server","jabberd2router\0") | |
Variables | |
static sig_atomic_t | c2s_shutdown = 0 |
sig_atomic_t | c2s_lost_router = 0 |
static sig_atomic_t | c2s_logrotate = 0 |
static sig_atomic_t | c2s_sighup = 0 |
static void _c2s_signal | ( | int | signum | ) | [static] |
Definition at line 30 of file main.c.
References c2s_shutdown, and c2s_lost_router.
Referenced by JABBER_MAIN().
static void _c2s_signal_hup | ( | int | signum | ) | [static] |
Definition at line 36 of file main.c.
References c2s_logrotate, and c2s_sighup.
Referenced by JABBER_MAIN().
static void _c2s_signal_usr1 | ( | int | signum | ) | [static] |
static void _c2s_signal_usr2 | ( | int | signum | ) | [static] |
static void _c2s_pidfile | ( | c2s_t | c2s | ) | [static] |
store the process id
Definition at line 53 of file main.c.
References config_get_one(), c2s_st::config, log_write(), and c2s_st::log.
Referenced by JABBER_MAIN().
static void _c2s_config_expand | ( | c2s_t | c2s | ) | [static] |
pull values out of the config file
Definition at line 80 of file main.c.
References set_debug_log_from_config(), c2s_st::config, c2s_st::id, config_get_one(), c2s_st::router_ip, c2s_st::router_port, j_atoi(), c2s_st::router_user, c2s_st::router_pass, c2s_st::router_pemfile, c2s_st::retry_init, c2s_st::retry_lost, c2s_st::retry_sleep, c2s_st::log_type, log_STDOUT, config_get(), config_get_attr(), log_FILE, log_SYSLOG, c2s_st::log_facility, c2s_st::log_ident, c2s_st::packet_stats, c2s_st::local_ip, c2s_st::local_port, c2s_st::local_pemfile, c2s_st::local_cachain, c2s_st::local_verify_mode, c2s_st::local_ssl_port, c2s_st::http_forward, c2s_st::io_max_fds, c2s_st::compression, c2s_st::io_check_interval, c2s_st::io_check_idle, c2s_st::io_check_keepalive, c2s_st::pbx_pipe, config_elem_st::nvalues, pmalloco(), xhash_pool(), c2s_st::stream_redirects, log_write(), c2s_st::log, j_attr(), config_elem_st::attrs, stream_redirect_st::to_address, stream_redirect_st::to_port, xhash_put(), pstrdup(), c2s_st::ar_module_name, c2s_st::ar_mechanisms, AR_MECH_TRAD_PLAIN, AR_MECH_TRAD_DIGEST, c2s_st::ar_ssl_mechanisms, c2s_st::byte_rate_total, config_elem_st::values, 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, c2s_st::conn_rate_total, c2s_st::conn_rate_seconds, c2s_st::conn_rate_wait, c2s_st::stanza_size_limit, c2s_st::access, access_new(), access_allow(), and access_deny().
Referenced by JABBER_MAIN().
static void _c2s_hosts_expand | ( | c2s_t | c2s | ) | [static] |
Definition at line 282 of file main.c.
References config_get(), c2s_st::config, log_write(), c2s_st::log, config_elem_st::nvalues, pmalloco(), xhash_pool(), c2s_st::hosts, j_attr(), config_elem_st::attrs, config_elem_st::values, host_st::realm, pstrdup(), host_st::host_pemfile, host_st::host_cachain, host_st::host_verify_mode, j_atoi(), c2s_st::sx_ssl, sx_env_plugin(), c2s_st::sx_env, sx_ssl_init(), sx_ssl_server_addcert(), host_st::host_require_starttls, host_st::ar_register_enable, host_st::ar_register_oob, host_st::ar_register_instructions, host_st::ar_register_password, c2s_st::vhost, and xhash_put().
Referenced by JABBER_MAIN().
static int _c2s_router_connect | ( | c2s_t | c2s | ) | [static] |
Definition at line 373 of file main.c.
References log_write(), c2s_st::log, c2s_st::router_ip, c2s_st::router_port, c2s_st::fd, mio_connect, c2s_st::mio, c2s_router_mio_callback(), c2s_lost_router, MIO_STRERROR, MIO_ERROR, sx_new(), c2s_router_sx_callback(), and sx_client_init().
Referenced by JABBER_MAIN().
static int _c2s_sx_sasl_callback | ( | int | cb, |
void * | arg, | ||
void ** | res, | ||
sx_t | s, | ||
void * | cbarg | ||
) | [static] |
Definition at line 390 of file main.c.
References jid_static(), sx_sasl_cb_GET_REALM, _sx_st::req_to, xhash_get(), c2s_st::hosts, log_write(), c2s_st::log, sx_sasl_ret_FAIL, host_st::realm, log_debug, ZONE, sx_sasl_ret_OK, sx_sasl_cb_GET_PASS, sx_sasl_creds_st::authnid, sx_sasl_creds_st::realm, c2s_st::ar, authreg_st::get_password, sx_sasl_cb_CHECK_PASS, authreg_st::check_password, sx_sasl_creds_st::pass, sx_sasl_cb_CHECK_AUTHZID, sx_sasl_creds_st::authzid, jid_reset(), jid_st::domain, jid_st::resource, authreg_st::user_authz_allowed, jid_st::node, authreg_st::user_exists, sx_sasl_cb_GEN_AUTHZID, jid_random_part(), jid_NODE, sx_sasl_cb_CHECK_MECH, _sx_st::ssf, config_get(), and c2s_st::config.
Referenced by JABBER_MAIN().
static void _c2s_time_checks | ( | c2s_t | c2s | ) | [static] |
Definition at line 561 of file main.c.
References xhash_iter_first(), c2s_st::sessions, xhashv::sess_val, xhash_iter_get(), xhashv::val, c2s_st::io_check_idle, sess_st::s, sess_st::last_activity, log_write(), c2s_st::log, sess_st::fd, mio_fd_st::fd, sess_st::ip, sess_st::port, sx_error(), stream_err_HOST_GONE, sx_close(), c2s_st::io_check_keepalive, _sx_st::state, state_STREAM, log_debug, ZONE, sx_raw_write(), sess_st::rate, rate_st::bad, rate_check(), _sx_st::want_read, sx_can_read(), and xhash_iter_next().
Referenced by JABBER_MAIN().
JABBER_MAIN | ( | "jabberd2c2s" | , |
"Jabber 2 C2S" | , | ||
"Jabber Open Source Server: Client to Server" | , | ||
"jabberd2router\0" | |||
) |
Definition at line 598 of file main.c.
References config_file, jabber_signal(), _c2s_signal(), _c2s_signal_hup(), _c2s_signal_usr1(), _c2s_signal_usr2(), c2s_st::config, config_new(), set_debug_flag(), config_free(), config_load_with_id(), c2s_st::stream_redirects, xhash_new(), _c2s_config_expand(), c2s_st::log, log_new(), c2s_st::log_type, c2s_st::log_ident, c2s_st::log_facility, log_write(), _c2s_pidfile(), c2s_st::ar_module_name, c2s_st::ar, authreg_init(), access_free(), c2s_st::access, log_free(), c2s_st::sessions, c2s_st::conn_rates, c2s_st::dead, jqueue_new(), c2s_st::dead_sess, c2s_st::sx_env, sx_env_new(), c2s_st::local_pemfile, c2s_st::sx_ssl, sx_env_plugin(), sx_ssl_init(), c2s_st::local_cachain, c2s_st::local_verify_mode, c2s_st::router_pemfile, c2s_st::compression, sx_compress_init(), sx_ack_init(), sx_address_init(), c2s_st::sx_sasl, sx_sasl_init(), _c2s_sx_sasl_callback(), bind_init(), mio_new(), _c2s_hosts_expand(), _c2s_router_connect(), c2s_shutdown, mio_run, c2s_logrotate, set_debug_log_from_config(), c2s_sighup, config_load(), xhash_free(), config_get(), config_elem_st::nvalues, pmalloco(), xhash_pool(), j_attr(), config_elem_st::attrs, stream_redirect_st::to_address, stream_redirect_st::to_port, xhash_put(), pstrdup(), c2s_lost_router, sx_free(), jqueue_size(), jqueue_pull(), sess_st::ip, sess_st::smcomp, sess_st::result, nad_free(), sess_st::resources, bres_st::next, jid_free(), bres_st::jid, sess_st::rate, rate_free(), sess_st::stanza_rate, log_debug, ZONE, _c2s_time_checks(), pool_stat(), xhash_iter_first(), xhashv::sess_val, xhash_iter_get(), xhashv::val, sess_st::active, sess_st::s, sx_close(), xhash_iter_next(), mio_close, sx_env_free(), mio_free, authreg_free(), and jqueue_free().
sig_atomic_t c2s_shutdown = 0 [static] |
Definition at line 25 of file main.c.
Referenced by _c2s_signal(), and JABBER_MAIN().
sig_atomic_t c2s_lost_router = 0 |
Definition at line 26 of file main.c.
Referenced by c2s_router_mio_callback(), _c2s_signal(), _c2s_router_connect(), and JABBER_MAIN().
sig_atomic_t c2s_logrotate = 0 [static] |
Definition at line 27 of file main.c.
Referenced by _c2s_signal_hup(), and JABBER_MAIN().
sig_atomic_t c2s_sighup = 0 [static] |
Definition at line 28 of file main.c.
Referenced by _c2s_signal_hup(), and JABBER_MAIN().