jabberd2  2.3.4
Functions | Variables
main.c File Reference
#include "s2s.h"
#include <stringprep.h>
#include <unistd.h>

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
 

Function Documentation

static void _s2s_signal ( int  signum)
static

Definition at line 30 of file main.c.

References s2s_lost_router, and s2s_shutdown.

Referenced by JABBER_MAIN().

static void _s2s_signal_hup ( int  signum)
static

Definition at line 35 of file main.c.

References s2s_logrotate.

Referenced by JABBER_MAIN().

static void _s2s_signal_usr1 ( int  signum)
static

Definition at line 39 of file main.c.

References set_debug_flag().

Referenced by JABBER_MAIN().

static void _s2s_signal_usr2 ( int  signum)
static

Definition at line 44 of file main.c.

References set_debug_flag().

Referenced by JABBER_MAIN().

int _s2s_populate_whitelist_domains ( s2s_t  s2s,
const char **  values,
int  nvalues 
)
static

Definition at line 633 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 void _s2s_pidfile ( s2s_t  s2s)
static

store the process id

Definition at line 53 of file main.c.

References s2s_st::config, config_get_one(), s2s_st::log, and log_write().

Referenced by JABBER_MAIN().

static void _s2s_config_expand ( s2s_t  s2s)
static
static void _s2s_hosts_expand ( s2s_t  s2s)
static
static int _s2s_router_connect ( s2s_t  s2s)
static
int _s2s_check_conn_routes ( s2s_t  s2s,
conn_t  conn,
const char *  direction 
)
static void _s2s_time_checks ( s2s_t  s2s)
static
static void _s2s_dns_expiry ( s2s_t  s2s)
static
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 617 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 
)
JABBER_MAIN ( "jabberd2s2s"  ,
"Jabber 2 S2S"  ,
"Jabber Open Source Server: Server to Server"  ,
"jabberd2router\0"   
)

Definition at line 821 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.

Variable Documentation

sig_atomic_t s2s_shutdown = 0
static

Definition at line 26 of file main.c.

Referenced by _s2s_signal(), and JABBER_MAIN().

sig_atomic_t s2s_lost_router = 0

Definition at line 27 of file main.c.

Referenced by _s2s_router_connect(), _s2s_signal(), JABBER_MAIN(), and s2s_router_mio_callback().

sig_atomic_t s2s_logrotate = 0
static

Definition at line 28 of file main.c.

Referenced by _s2s_signal_hup(), and JABBER_MAIN().