jabberd2
2.3.6
|
Go to the source code of this file.
Functions | |
static void | _s2s_signal (int signum) |
static void | _s2s_signal_hup (int signum) |
static void | _s2s_signal_usr1 (int signum) |
static void | _s2s_signal_usr2 (int signum) |
static int | _s2s_populate_whitelist_domains (s2s_t s2s, const char **values, int nvalues) |
static void | _s2s_pidfile (s2s_t s2s) |
store the process id More... | |
static void | _s2s_config_expand (s2s_t s2s) |
pull values out of the config file More... | |
static void | _s2s_hosts_expand (s2s_t s2s) |
static int | _s2s_router_connect (s2s_t s2s) |
int | _s2s_check_conn_routes (s2s_t s2s, conn_t conn, const char *direction) |
static void | _s2s_time_checks (s2s_t s2s) |
static void | _s2s_dns_expiry (s2s_t s2s) |
static int | _mio_resolver_callback (mio_t m, mio_action_t a, mio_fd_t fd, void *data, void *arg) |
responses from the resolver More... | |
int | s2s_domain_in_whitelist (s2s_t s2s, const char *in_domain) |
JABBER_MAIN ("jabberd2s2s","Jabber 2 S2S","Jabber Open Source Server: Server to Server","jabberd2router\0") | |
Variables | |
static sig_atomic_t | s2s_shutdown = 0 |
sig_atomic_t | s2s_lost_router = 0 |
static sig_atomic_t | s2s_logrotate = 0 |
|
static |
Definition at line 33 of file main.c.
References s2s_lost_router, and s2s_shutdown.
Referenced by JABBER_MAIN().
|
static |
|
static |
|
static |
|
static |
Definition at line 648 of file main.c.
References log_debug, MAX_DOMAIN_LEN, s2s_st::n_whitelist_domains, s2s_st::whitelist_domains, and ZONE.
Referenced by _s2s_config_expand().
|
static |
store the process id
Definition at line 56 of file main.c.
References s2s_st::config, config_get_one(), s2s_st::log, and log_write().
Referenced by JABBER_MAIN().
|
static |
pull values out of the config file
Definition at line 84 of file main.c.
References _s2s_populate_whitelist_domains(), s2s_st::check_dnscache, s2s_st::check_idle, s2s_st::check_interval, s2s_st::check_keepalive, s2s_st::check_queue, s2s_st::compression, s2s_st::config, config_count(), config_get(), config_get_attr(), config_get_one(), s2s_st::dns_bad_timeout, s2s_st::dns_cache_enabled, s2s_st::dns_max_ttl, s2s_st::dns_min_ttl, s2s_st::enable_whitelist, s2s_st::etc_hosts_ttl, s2s_st::id, s2s_st::io_max_fds, j_atoi(), s2s_st::local_cachain, s2s_st::local_ciphers, s2s_st::local_ip, s2s_st::local_pemfile, s2s_st::local_port, s2s_st::local_private_key_password, s2s_st::local_secret, s2s_st::local_verify_mode, s2s_st::log, s2s_st::log_facility, log_FILE, s2s_st::log_ident, log_STDOUT, log_SYSLOG, s2s_st::log_type, log_write(), s2s_st::lookup_nsrv, s2s_st::lookup_srv, config_elem_st::nvalues, s2s_st::origin_ips, s2s_st::origin_nips, s2s_st::out_reuse, s2s_st::packet_stats, s2s_st::require_tls, s2s_st::resolve_aaaa, s2s_st::retry_init, s2s_st::retry_limit, s2s_st::retry_lost, s2s_st::retry_sleep, s2s_st::router_cachain, s2s_st::router_ciphers, s2s_st::router_default, s2s_st::router_ip, s2s_st::router_pass, s2s_st::router_pemfile, s2s_st::router_port, s2s_st::router_private_key_password, s2s_st::router_user, set_debug_log_from_config(), s2s_st::stanza_size_limit, and config_elem_st::values.
Referenced by JABBER_MAIN().
|
static |
Definition at line 229 of file main.c.
References config_elem_st::attrs, s2s_st::config, config_get(), host_st::host_cachain, host_st::host_ciphers, host_st::host_pemfile, host_st::host_private_key_password, host_st::host_verify_mode, s2s_st::hosts, j_atoi(), j_attr(), s2s_st::log, log_write(), config_elem_st::nvalues, pmalloco(), pstrdup(), host_st::realm, s2s_st::sx_env, sx_env_plugin(), s2s_st::sx_ssl, sx_ssl_init(), sx_ssl_server_addcert(), config_elem_st::values, xhash_pool(), and xhash_put().
Referenced by JABBER_MAIN().
|
static |
Definition at line 291 of file main.c.
References s2s_st::fd, mio_fd_st::fd, s2s_st::log, log_write(), s2s_st::mio, mio_connect, MIO_ERROR, MIO_STRERROR, s2s_st::router, s2s_st::router_ip, s2s_st::router_port, s2s_lost_router, s2s_router_mio_callback(), s2s_router_sx_callback(), sx_client_init(), s2s_st::sx_env, and sx_new().
Referenced by JABBER_MAIN().
Definition at line 308 of file main.c.
References s2s_st::check_queue, conn_INPROGRESS, mio_fd_st::fd, conn_st::fd, conn_st::ip, s2s_st::log, log_write(), conn_st::port, conn_st::s, conn_st::states, conn_st::states_time, stream_err_CONNECTION_TIMEOUT, sx_close(), sx_error(), xhash_getx(), xhash_iter_first(), xhash_iter_get(), xhash_iter_next(), and xhash_zapx().
Referenced by _s2s_time_checks().
|
static |
Definition at line 349 of file main.c.
References _s2s_check_conn_routes(), s2s_st::check_idle, s2s_st::check_keepalive, s2s_st::check_queue, xhashv::conn_val, conn_st::dkey, s2s_st::dns_bad, s2s_st::dns_bad_timeout, dns_make_ipport(), s2s_st::dnscache, dnsres_st::expiry, mio_fd_st::fd, conn_st::fd, s2s_st::in, s2s_st::in_accept, conn_st::init_time, conn_st::ip, xhashv::jq_val, jqueue_size(), conn_st::key, dnsres_st::key, conn_st::last_activity, conn_st::last_packet, conn_st::last_verify, s2s_st::log, log_debug, log_write(), conn_st::online, out_bounce_route_queue(), s2s_st::out_dest, s2s_st::out_host, s2s_st::out_reuse, s2s_st::outq, conn_st::port, conn_st::s, stanza_err_REMOTE_SERVER_NOT_FOUND, stanza_err_REMOTE_SERVER_TIMEOUT, _sx_st::state, state_STREAM, conn_st::states, stream_err_CONNECTION_TIMEOUT, sx_close(), sx_error(), sx_raw_write(), xhashv::val, conn_st::verify, xhash_count(), xhash_free(), xhash_get(), xhash_getx(), xhash_iter_first(), xhash_iter_get(), xhash_iter_next(), xhash_put(), xhash_zap(), and ZONE.
Referenced by JABBER_MAIN().
|
static |
Definition at line 582 of file main.c.
References s2s_st::dns_bad, xhashv::dns_val, s2s_st::dnscache, xhashv::dnsres_val, dnscache_st::expiry, dnsres_st::expiry, dnsquery_st::hosts, dnsres_st::key, log_debug, dnsquery_st::name, dnscache_st::name, dnscache_st::pending, dnsquery_st::query, dnscache_st::query, dnsquery_st::results, dnscache_st::results, xhashv::val, xhash_free(), xhash_iter_first(), xhash_iter_get(), xhash_iter_next(), xhash_iter_zap(), and ZONE.
Referenced by JABBER_MAIN().
|
static |
responses from the resolver
Definition at line 632 of file main.c.
References action_READ, mio_fd_st::fd, log_debug, and ZONE.
Referenced by JABBER_MAIN().
int s2s_domain_in_whitelist | ( | s2s_t | s2s, |
const char * | in_domain | ||
) |
Definition at line 680 of file main.c.
References s2s_st::log, log_debug, log_write(), MAX_DOMAIN_LEN, s2s_st::n_whitelist_domains, s2s_st::whitelist_domains, and ZONE.
Referenced by _in_sx_callback(), and out_packet().
JABBER_MAIN | ( | "jabberd2s2s" | , |
"Jabber 2 S2S" | , | ||
"Jabber Open Source Server: Server to Server" | , | ||
"jabberd2router\0" | |||
) |
Definition at line 836 of file main.c.
References _mio_resolver_callback(), _s2s_config_expand(), _s2s_dns_expiry(), _s2s_hosts_expand(), _s2s_pidfile(), _s2s_router_connect(), _s2s_signal(), _s2s_signal_hup(), _s2s_signal_usr1(), _s2s_signal_usr2(), _s2s_time_checks(), s2s_st::check_dnscache, s2s_st::check_idle, s2s_st::check_interval, s2s_st::check_keepalive, s2s_st::check_queue, s2s_st::compression, s2s_st::config, config_file, config_free(), config_load_with_id(), config_new(), xhashv::conn_val, s2s_st::dead, s2s_st::dead_conn, conn_st::dkey, s2s_st::dns_bad, xhashv::dns_val, s2s_st::dnscache, xhashv::dnsres_val, s2s_st::fd, s2s_st::hosts, dnsquery_st::hosts, s2s_st::in, s2s_st::in_accept, s2s_st::io_max_fds, jabber_signal(), xhashv::jq_val, jqueue_free(), jqueue_new(), jqueue_pull(), jqueue_size(), conn_st::key, _jqueue_st::key, dnsres_st::key, s2s_st::local_cachain, s2s_st::local_ciphers, s2s_st::local_pemfile, s2s_st::local_private_key_password, s2s_st::local_secret, s2s_st::local_verify_mode, s2s_st::log, log_debug, s2s_st::log_facility, log_free(), s2s_st::log_ident, log_new(), s2s_st::log_type, log_write(), s2s_st::mio, mio_close, mio_free, mio_new(), mio_read, mio_register, mio_run, dnsquery_st::name, s2s_st::next_check, s2s_st::next_expiry, out_bounce_conn_queues(), s2s_st::out_dest, s2s_st::out_host, out_pkt_free(), s2s_st::out_reuse, s2s_st::outq, s2s_st::packet_count, s2s_st::packet_stats, pool_stat(), dnsquery_st::query, dnscache_st::query, dnsquery_st::results, dnscache_st::results, s2s_st::retry_init, s2s_st::retry_left, s2s_st::retry_sleep, s2s_st::router, s2s_st::router_cachain, s2s_st::router_ciphers, s2s_st::router_pemfile, s2s_st::router_private_key_password, conn_st::routes, conn_st::s, s2s_db_init(), s2s_logrotate, s2s_lost_router, s2s_shutdown, s2s_st::server_fd, set_debug_flag(), set_debug_log_from_config(), stanza_err_SERVICE_UNAVAILABLE, conn_st::states, conn_st::states_time, stream_err_SYSTEM_SHUTDOWN, sx_close(), sx_compress_init(), s2s_st::sx_db, s2s_st::sx_env, sx_env_free(), sx_env_new(), sx_env_plugin(), sx_error(), sx_free(), s2s_st::sx_sasl, sx_sasl_init(), s2s_st::sx_ssl, sx_ssl_init(), s2s_st::udns_fd, s2s_st::udns_mio_fd, xhashv::val, xhash_free(), xhash_iter_first(), xhash_iter_get(), xhash_iter_next(), xhash_new(), and ZONE.
|
static |
Definition at line 29 of file main.c.
Referenced by _s2s_signal(), and JABBER_MAIN().
sig_atomic_t s2s_lost_router = 0 |
Definition at line 30 of file main.c.
Referenced by _s2s_router_connect(), _s2s_signal(), JABBER_MAIN(), and s2s_router_mio_callback().
|
static |
Definition at line 31 of file main.c.
Referenced by _s2s_signal_hup(), and JABBER_MAIN().