34 #ifdef HAVE_SYS_STAT_H 35 # include <sys/stat.h> 40 #define DLLEXPORT __declspec(dllexport) 41 #define C2S_API __declspec(dllimport) 43 #define DLLEXPORT __declspec(dllimport) 44 #define C2S_API __declspec(dllexport) 113 char auth_challenge[65];
120 #define AR_MECH_TRAD_PLAIN (1<<0) 121 #define AR_MECH_TRAD_DIGEST (1<<1) 122 #define AR_MECH_TRAD_CRAMMD5 (1<<2) 348 int (*user_exists)(authreg_t ar, sess_t sess,
const char *username,
const char *realm);
351 int (*get_password)(authreg_t ar, sess_t sess,
const char *username,
const char *realm,
char password[257]);
354 int (*check_password)(authreg_t ar, sess_t sess,
const char *username,
const char *realm,
char password[257]);
357 int (*set_password)(authreg_t ar, sess_t sess,
const char *username,
const char *realm,
char password[257]);
360 int (*create_user)(authreg_t ar, sess_t sess,
const char *username,
const char *realm);
361 int (*delete_user)(authreg_t ar, sess_t sess,
const char *username,
const char *realm);
367 void (*free)(authreg_t ar);
372 int (*user_authz_allowed)(authreg_t ar, sess_t sess,
const char *username,
const char *realm,
const char *requested_user);
375 int (*create_challenge)(authreg_t ar, sess_t sess,
const char *username,
const char *realm,
char *challenge,
int maxlen);
376 int (*check_response)(authreg_t ar, sess_t sess,
const char *username,
const char *realm,
const char *challenge,
const char *response);
C2S_API void sm_create(sess_t sess, bres_t res)
int io_check_interval
time checks
C2S_API void sm_end(sess_t sess, bres_t res)
struct stream_redirect_st * stream_redirect_t
const char * log_facility
C2S_API int c2s_router_mio_callback(mio_t m, mio_action_t a, mio_fd_t fd, void *data, void *arg)
char sm_request[41]
this holds the id of the current pending SM request
const char * http_forward
http forwarding URL
xht ar_modules
loaded auth/reg modules
int ar_register_enable
registration
int started
this is true if we've connected to the router at least once
unsigned int packet_count
access_t access
access controls
const char * router_ciphers
const char * host_ciphers
list of TLS ciphers
int compression
enable Stream Compression
int(* ar_module_init_fn)(authreg_t)
type for the module init function
C2S_API void sm_packet(sess_t sess, bres_t res, nad_t nad)
list of resources bound to session
int io_max_fds
max file descriptors
char * host_private_key_password
private key password
int ar_mechanisms
allowed mechanisms
holder for the config hash and nad
const char * id
our id (hostname) with the router
int initialized
loaded module handle
mio_action_t
these are the actions and a handler type assigned by the applicaiton using mio
int host_verify_mode
verify-mode
int stanza_size_limit
maximum stanza size
sx_t router
router's conn
mio_fd_t server_fd
listening sockets
const char * router_pemfile
C2S_API int authreg_process(c2s_t c2s, sess_t sess, nad_t nad)
the main authreg processor
JABBERD2_API int address_init(sx_env_t env, sx_plugin_t p, va_list args)
args: none
const char * router_cachain
const char * router_ip
how to connect to the router
const char * local_ip
ip to listen on
const char * router_private_key_password
void sess_end(sess_t sess)
holds the state for a single stream
const char * ar_register_instructions
C2S_API authreg_t authreg_init(c2s_t c2s, const char *name)
get a handle for a single module
const char * realm
our realm (SASL)
host_t host
host this session belongs to
int local_verify_mode
verify-mode
int local_port
unencrypted port
const char * host_pemfile
starttls pemfile
int conn_rate_total
connection rates
struct authreg_st * authreg_t
sx_env_t sx_env
sx environment
int retry_init
connect retry
char c2s_id[44]
session id for this jid for us and them
xht sm_avail
availability of sms that we are servicing
C2S_API void sm_start(sess_t sess, bres_t res)
const char * ar_module_name
xht stream_redirects
stream redirection (see-other-host) on session connect
log_type_t log_type
log data
sig_atomic_t c2s_lost_router
jqueue_t dead_sess
list of sess on the way out
There is one instance of this struct per user who is logged in to this c2s instance.
C2S_API void c2s_pbx_init(c2s_t c2s)
long long int packet_count
packet counter
int websocket
websocket support
const char * local_ciphers
list of TLS ciphers
const char * packet_stats
const char * ar_module_name
default auth/reg module
int local_ssl_port
encrypted port
sx_event_t
things that can happen
C2S_API void authreg_free(authreg_t ar)
shut down
const char * ar_register_oob
jqueue_t dead
list of sx_t on the way out
C2S_API int bind_init(sx_env_t env, sx_plugin_t p, va_list args)
plugin initialiser
const char * pbx_pipe
PBX integration named pipe.
int host_require_starttls
require starttls
const char * local_private_key_password
private key password
int online
true if we're bound in the router
C2S_API void sm_delete(sess_t sess, bres_t res)
int stanza_rate_total
stanza rates
const char * local_pemfile
encrypted port pemfile
const char * local_cachain
encrypted port cachain file
C2S_API int c2s_router_sx_callback(sx_t s, sx_event_t e, void *data, void *arg)
const char * host_cachain
certificate chain
int byte_rate_total
byte rates (karma)