jabberd2
2.2.16
|
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 void | _s2s_pidfile (s2s_t s2s) |
store the process id | |
static void | _s2s_config_expand (s2s_t s2s) |
pull values out of the config file | |
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 | |
int | _s2s_populate_whitelist_domains (s2s_t s2s, char **values, int nvalues) |
int | s2s_domain_in_whitelist (s2s_t s2s, 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 void _s2s_signal | ( | int | signum | ) | [static] |
Definition at line 29 of file main.c.
References s2s_shutdown, and s2s_lost_router.
Referenced by JABBER_MAIN().
static void _s2s_signal_hup | ( | int | signum | ) | [static] |
static void _s2s_signal_usr1 | ( | int | signum | ) | [static] |
static void _s2s_signal_usr2 | ( | int | signum | ) | [static] |
static void _s2s_pidfile | ( | s2s_t | s2s | ) | [static] |
store the process id
Definition at line 49 of file main.c.
References config_get_one(), s2s_st::config, log_write(), and s2s_st::log.
Referenced by JABBER_MAIN().
static void _s2s_config_expand | ( | s2s_t | s2s | ) | [static] |
pull values out of the config file
Definition at line 77 of file main.c.
References set_debug_log_from_config(), s2s_st::config, s2s_st::id, config_get_one(), s2s_st::router_ip, s2s_st::router_port, j_atoi(), s2s_st::router_user, s2s_st::router_pass, s2s_st::router_pemfile, s2s_st::retry_init, s2s_st::retry_lost, s2s_st::retry_sleep, s2s_st::router_default, config_count(), s2s_st::log_type, log_STDOUT, config_get(), config_get_attr(), log_FILE, log_SYSLOG, s2s_st::log_facility, s2s_st::log_ident, s2s_st::packet_stats, s2s_st::local_ip, s2s_st::origin_ips, config_elem_st::values, s2s_st::origin_nips, config_elem_st::nvalues, s2s_st::local_port, s2s_st::local_secret, s2s_st::local_pemfile, s2s_st::local_cachain, s2s_st::local_verify_mode, s2s_st::io_max_fds, s2s_st::compression, s2s_st::stanza_size_limit, s2s_st::require_tls, s2s_st::enable_whitelist, _s2s_populate_whitelist_domains(), s2s_st::check_interval, s2s_st::check_queue, s2s_st::check_keepalive, s2s_st::check_idle, s2s_st::check_dnscache, s2s_st::retry_limit, s2s_st::lookup_srv, s2s_st::lookup_nsrv, s2s_st::resolve_aaaa, s2s_st::dns_cache_enabled, s2s_st::dns_bad_timeout, s2s_st::dns_min_ttl, s2s_st::dns_max_ttl, s2s_st::etc_hosts_ttl, and s2s_st::out_reuse.
Referenced by JABBER_MAIN().
static void _s2s_hosts_expand | ( | s2s_t | s2s | ) | [static] |
Definition at line 204 of file main.c.
References config_get(), s2s_st::config, config_elem_st::nvalues, pmalloco(), xhash_pool(), s2s_st::hosts, log_write(), s2s_st::log, 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(), s2s_st::sx_ssl, sx_env_plugin(), s2s_st::sx_env, sx_ssl_init(), sx_ssl_server_addcert(), and xhash_put().
Referenced by JABBER_MAIN().
static int _s2s_router_connect | ( | s2s_t | s2s | ) | [static] |
Definition at line 262 of file main.c.
References log_write(), s2s_st::log, s2s_st::router_ip, s2s_st::router_port, s2s_st::fd, mio_connect, s2s_st::mio, s2s_router_mio_callback(), s2s_lost_router, MIO_STRERROR, MIO_ERROR, sx_new(), s2s_router_sx_callback(), and sx_client_init().
Referenced by JABBER_MAIN().
Definition at line 279 of file main.c.
References xhash_iter_first(), conn_st::states, xhash_iter_get(), xhash_getx(), conn_INPROGRESS, conn_st::states_time, s2s_st::check_queue, log_write(), s2s_st::log, conn_st::fd, mio_fd_st::fd, conn_st::ip, conn_st::port, xhash_zapx(), sx_error(), conn_st::s, stream_err_CONNECTION_TIMEOUT, sx_close(), and xhash_iter_next().
Referenced by _s2s_time_checks().
static void _s2s_time_checks | ( | s2s_t | s2s | ) | [static] |
Definition at line 320 of file main.c.
References s2s_st::check_queue, xhash_iter_first(), s2s_st::outq, xhashv::jq_val, xhash_iter_get(), xhashv::val, log_debug, ZONE, xhash_getx(), s2s_st::dnscache, log_write(), s2s_st::log, out_bounce_route_queue(), stanza_err_REMOTE_SERVER_NOT_FOUND, xhash_zap(), xhash_free(), s2s_st::out_dest, jqueue_size(), stanza_err_REMOTE_SERVER_TIMEOUT, conn_st::online, conn_st::init_time, conn_st::fd, mio_fd_st::fd, conn_st::ip, conn_st::port, s2s_st::dns_bad_timeout, dns_make_ipport(), xhash_get(), s2s_st::dns_bad, dnsres_st::key, xhash_put(), dnsres_st::expiry, sx_close(), conn_st::s, xhash_iter_next(), s2s_st::out_reuse, s2s_st::out_host, xhashv::conn_val, _s2s_check_conn_routes(), conn_st::verify, conn_st::last_verify, sx_error(), stream_err_CONNECTION_TIMEOUT, conn_st::dkey, conn_st::key, s2s_st::in, xhash_count(), conn_st::states, s2s_st::in_accept, s2s_st::check_keepalive, conn_st::last_activity, _sx_st::state, state_STREAM, sx_raw_write(), s2s_st::check_idle, and conn_st::last_packet.
Referenced by JABBER_MAIN().
static void _s2s_dns_expiry | ( | s2s_t | s2s | ) | [static] |
Definition at line 553 of file main.c.
References xhash_iter_first(), s2s_st::dnscache, xhashv::dns_val, xhash_iter_get(), xhashv::val, dnscache_st::pending, dnscache_st::expiry, log_debug, ZONE, dnscache_st::name, xhash_iter_zap(), xhash_free(), dnscache_st::results, dnscache_st::query, dnsquery_st::query, dnsquery_st::hosts, dnsquery_st::results, dnsquery_st::name, xhash_iter_next(), s2s_st::dns_bad, xhashv::dnsres_val, dnsres_st::expiry, and dnsres_st::key.
Referenced by JABBER_MAIN().
static int _mio_resolver_callback | ( | mio_t | m, |
mio_action_t | a, | ||
mio_fd_t | fd, | ||
void * | data, | ||
void * | arg | ||
) | [static] |
responses from the resolver
Definition at line 603 of file main.c.
References action_READ, log_debug, ZONE, and mio_fd_st::fd.
Referenced by JABBER_MAIN().
int _s2s_populate_whitelist_domains | ( | s2s_t | s2s, |
char ** | values, | ||
int | nvalues | ||
) |
Definition at line 619 of file main.c.
References s2s_st::whitelist_domains, MAX_DOMAIN_LEN, log_debug, ZONE, and s2s_st::n_whitelist_domains.
Referenced by _s2s_config_expand().
int s2s_domain_in_whitelist | ( | s2s_t | s2s, |
char * | in_domain | ||
) |
Definition at line 652 of file main.c.
References MAX_DOMAIN_LEN, log_write(), s2s_st::log, s2s_st::n_whitelist_domains, s2s_st::whitelist_domains, log_debug, 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 808 of file main.c.
References config_file, jabber_signal(), _s2s_signal(), _s2s_signal_hup(), _s2s_signal_usr1(), _s2s_signal_usr2(), s2s_st::config, config_new(), set_debug_flag(), config_free(), config_load_with_id(), _s2s_config_expand(), s2s_st::log, log_new(), s2s_st::log_type, s2s_st::log_ident, s2s_st::log_facility, log_write(), s2s_st::check_interval, s2s_st::check_queue, s2s_st::check_keepalive, s2s_st::check_idle, _s2s_pidfile(), s2s_st::outq, xhash_new(), s2s_st::out_host, s2s_st::out_dest, s2s_st::in, s2s_st::in_accept, s2s_st::dnscache, s2s_st::dns_bad, s2s_st::dead, jqueue_new(), s2s_st::dead_conn, s2s_st::sx_env, sx_env_new(), s2s_st::local_pemfile, s2s_st::sx_ssl, sx_env_plugin(), sx_ssl_init(), s2s_st::local_cachain, s2s_st::local_verify_mode, log_debug, ZONE, s2s_st::router_pemfile, s2s_st::compression, sx_compress_init(), s2s_st::sx_sasl, sx_sasl_init(), s2s_st::hosts, _s2s_hosts_expand(), s2s_st::sx_db, s2s_db_init(), s2s_st::mio, mio_new(), s2s_st::io_max_fds, s2s_st::udns_fd, s2s_st::udns_mio_fd, mio_register, _mio_resolver_callback(), _s2s_router_connect(), s2s_shutdown, mio_run, s2s_logrotate, set_debug_log_from_config(), log_free(), s2s_lost_router, sx_free(), mio_read, jqueue_size(), jqueue_pull(), xhash_free(), conn_st::states, conn_st::states_time, conn_st::routes, conn_st::key, conn_st::dkey, _s2s_time_checks(), _s2s_dns_expiry(), pool_stat(), xhashv::conn_val, xhash_iter_first(), xhash_iter_get(), xhashv::val, sx_error(), conn_st::s, stream_err_SYSTEM_SHUTDOWN, out_bounce_conn_queues(), stanza_err_SERVICE_UNAVAILABLE, sx_close(), xhash_iter_next(), xhashv::jq_val, out_pkt_free(), _jqueue_st::key, jqueue_free(), xhashv::dns_val, dnscache_st::results, dnscache_st::query, dnsquery_st::query, dnsquery_st::hosts, dnsquery_st::results, dnsquery_st::name, xhashv::dnsres_val, dnsres_st::key, mio_close, sx_env_free(), and mio_free.
sig_atomic_t s2s_shutdown = 0 [static] |
Definition at line 25 of file main.c.
Referenced by _s2s_signal(), and JABBER_MAIN().
sig_atomic_t s2s_lost_router = 0 |
Definition at line 26 of file main.c.
Referenced by _s2s_signal(), _s2s_router_connect(), JABBER_MAIN(), and s2s_router_mio_callback().
sig_atomic_t s2s_logrotate = 0 [static] |
Definition at line 27 of file main.c.
Referenced by _s2s_signal_hup(), and JABBER_MAIN().