jabberd2  2.3.1
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
util.h File Reference
#include "ac-stdint.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <time.h>
#include <errno.h>
#include <assert.h>
#include <expat.h>
#include <ctype.h>
#include "util/util_compat.h"
#include "sha1.h"
#include "md5.h"
#include <util/nad.h>
#include <util/pool.h>
#include <util/xhash.h>
#include "util/uri.h"
#include "util/jid.h"
#include "inaddr.h"
#include "xdata.h"

Go to the source code of this file.

Data Structures

struct  spool_node
 
struct  spool_struct
 
struct  log_st
 
struct  log_facility_st
 
struct  config_st
 holder for the config hash and nad More...
 
struct  config_elem_st
 a single element More...
 
struct  access_rule_st
 
struct  access_st
 
struct  rate_st
 
struct  _jqueue_node_st
 
struct  _jqueue_st
 
struct  _stanza_error_st
 

Macros

#define PATH_MAX   512
 
#define INCL_UTIL_H
 
#define JABBERD2_API   extern
 
#define stanza_err_BAD_REQUEST   (100)
 
#define stanza_err_CONFLICT   (101)
 
#define stanza_err_FEATURE_NOT_IMPLEMENTED   (102)
 
#define stanza_err_FORBIDDEN   (103)
 
#define stanza_err_GONE   (104)
 
#define stanza_err_INTERNAL_SERVER_ERROR   (105)
 
#define stanza_err_ITEM_NOT_FOUND   (106)
 
#define stanza_err_JID_MALFORMED   (107)
 
#define stanza_err_NOT_ACCEPTABLE   (108)
 
#define stanza_err_NOT_ALLOWED   (109)
 
#define stanza_err_PAYMENT_REQUIRED   (110)
 
#define stanza_err_RECIPIENT_UNAVAILABLE   (111)
 
#define stanza_err_REDIRECT   (112)
 
#define stanza_err_REGISTRATION_REQUIRED   (113)
 
#define stanza_err_REMOTE_SERVER_NOT_FOUND   (114)
 
#define stanza_err_REMOTE_SERVER_TIMEOUT   (115)
 
#define stanza_err_RESOURCE_CONSTRAINT   (116)
 
#define stanza_err_SERVICE_UNAVAILABLE   (117)
 
#define stanza_err_SUBSCRIPTION_REQUIRED   (118)
 
#define stanza_err_UNDEFINED_CONDITION   (119)
 
#define stanza_err_UNEXPECTED_REQUEST   (120)
 
#define stanza_err_OLD_UNAUTH   (121)
 
#define stanza_err_UNKNOWN_SENDER   (122)
 
#define stanza_err_LAST   (123)
 
#define ZONE   __FILE__,__LINE__
 
#define MAX_DEBUG   8192
 
#define log_debug   if(0) debug_log
 
#define JABBER_MAIN(name, display, description, depends)   int main(int argc, char** argv)
 

Typedefs

typedef struct spool_structspool
 
typedef struct log_stlog_t
 
typedef struct log_facility_st log_facility_t
 
typedef struct config_elem_stconfig_elem_t
 
typedef struct config_stconfig_t
 
typedef struct access_rule_staccess_rule_t
 
typedef struct access_staccess_t
 
typedef struct rate_strate_t
 
typedef struct _jqueue_node_st_jqueue_node_t
 
typedef struct _jqueue_stjqueue_t
 
typedef struct _stanza_error_ststanza_error_t
 
typedef void jsighandler_t (int)
 

Enumerations

enum  log_type_t {
  log_STDOUT, log_SYSLOG, log_FILE, log_STDOUT,
  log_SYSLOG, log_FILE
}
 
enum  datetime_t {
  dt_DATE = 1, dt_TIME = 2, dt_DATETIME = 3, dt_LEGACY = 4,
  dt_DATE = 1, dt_TIME = 2, dt_DATETIME = 3, dt_LEGACY = 4
}
 

Functions

JABBERD2_API char * j_strdup (const char *str)
 
More...
 
JABBERD2_API char * j_strcat (char *dest, const char *txt)
 
JABBERD2_API int j_strcmp (const char *a, const char *b)
 
JABBERD2_API int j_strcasecmp (const char *a, const char *b)
 
JABBERD2_API int j_strncmp (const char *a, const char *b, int i)
 
JABBERD2_API int j_strncasecmp (const char *a, const char *b, int i)
 
JABBERD2_API int j_strlen (const char *a)
 
JABBERD2_API int j_atoi (const char *a, int def)
 
JABBERD2_API char * j_attr (const char **atts, const char *attr)
 
JABBERD2_API char * j_strnchr (const char *s, int c, int n)
 like strchr, but only searches n chars More...
 
JABBERD2_API void shahash_r (const char *str, char hashbuf[41])
 old convenience function, now in str.c More...
 
JABBERD2_API void shahash_raw (const char *str, unsigned char hashval[20])
 
JABBERD2_API char * strescape (pool_t p, const char *buf, int len)
 
JABBERD2_API char * strunescape (pool_t p, char *buf)
 
JABBERD2_API spool spool_new (pool_t p)
 
JABBERD2_API void spooler (spool s,...)
 
JABBERD2_API const char * spool_print (spool s)
 
JABBERD2_API void spool_add (spool s, const char *str)
 
JABBERD2_API void spool_escape (spool s, const char *raw, int len)
 
JABBERD2_API const char * spools (pool_t p,...)
 convenience :) More...
 
JABBERD2_API log_t log_new (log_type_t type, const char *ident, const char *facility)
 
JABBERD2_API void log_write (log_t log, int level, const char *msgfmt,...)
 
JABBERD2_API void log_free (log_t log)
 
JABBERD2_API config_t config_new (void)
 new config structure More...
 
JABBERD2_API int config_load (config_t c, const char *file)
 turn an xml file into a config hash More...
 
JABBERD2_API int config_load_with_id (config_t c, const char *file, const char *id)
 turn an xml file into a config hash More...
 
JABBERD2_API config_elem_t config_get (config_t c, const char *key)
 get the config element for this key More...
 
JABBERD2_API const char * config_get_one (config_t c, const char *key, int num)
 get config value n for this key More...
 
JABBERD2_API const char * config_get_one_default (config_t c, const char *key, int num, const char *default_value)
 get config value n for this key, returns default_value if not found More...
 
JABBERD2_API int config_count (config_t c, const char *key)
 how many values for this key? More...
 
JABBERD2_API char * config_get_attr (config_t c, const char *key, int num, const char *attr)
 get an attr for this value More...
 
JABBERD2_API char * config_expand (config_t c, const char *value)
 
JABBERD2_API void config_free (config_t)
 Replaces $(some.value) with config_get_one(c, "some.value", 0) More...
 
JABBERD2_API access_t access_new (int order)
 
JABBERD2_API void access_free (access_t access)
 
JABBERD2_API int access_allow (access_t access, const char *ip, const char *mask)
 
JABBERD2_API int access_deny (access_t access, const char *ip, const char *mask)
 
JABBERD2_API int access_check (access_t access, const char *ip)
 
JABBERD2_API rate_t rate_new (int total, int seconds, int wait)
 
JABBERD2_API void rate_free (rate_t rt)
 
JABBERD2_API void rate_reset (rate_t rt)
 
JABBERD2_API void rate_add (rate_t rt, int count)
 Add a number of events to the counter. More...
 
JABBERD2_API int rate_left (rate_t rt)
 
JABBERD2_API int rate_check (rate_t rt)
 
JABBERD2_API int ser_string_get (char **dest, int *source, const char *buf, int len)
 
JABBERD2_API int ser_int_get (int *dest, int *source, const char *buf, int len)
 
JABBERD2_API void ser_string_set (const char *source, int *dest, char **buf, int *len)
 
JABBERD2_API void ser_int_set (int source, int *dest, char **buf, int *len)
 
JABBERD2_API jqueue_t jqueue_new (void)
 
JABBERD2_API void jqueue_free (jqueue_t q)
 
JABBERD2_API void jqueue_push (jqueue_t q, void *data, int pri)
 
JABBERD2_API void * jqueue_pull (jqueue_t q)
 
JABBERD2_API int jqueue_size (jqueue_t q)
 
JABBERD2_API time_t jqueue_age (jqueue_t q)
 
JABBERD2_API time_t datetime_in (char *date)
 
JABBERD2_API void datetime_out (time_t t, datetime_t type, char *date, int datelen)
 
JABBERD2_API int apr_base64_decode_len (const char *bufcoded, int buflen)
 
JABBERD2_API int apr_base64_decode (char *bufplain, const char *bufcoded, int buflen)
 
JABBERD2_API int apr_base64_encode_len (int len)
 
JABBERD2_API int apr_base64_encode (char *encoded, const char *string, int len)
 
JABBERD2_API char * b64_encode (char *buf, int len)
 
JABBERD2_API char * b64_decode (char *buf)
 
JABBERD2_API nad_t stanza_error (nad_t nad, int elem, int err)
 error the packet More...
 
JABBERD2_API nad_t stanza_tofrom (nad_t nad, int elem)
 flip the to and from attributes on this elem More...
 
JABBERD2_API void hex_from_raw (const unsigned char *in, int inlen, char *out)
 turn raw into hex - out must be (inlen*2)+1 More...
 
JABBERD2_API int hex_to_raw (const char *in, int inlen, char *out)
 turn hex into raw - out must be (inlen/2) More...
 
JABBERD2_API int get_debug_flag (void)
 
JABBERD2_API void set_debug_flag (int v)
 
JABBERD2_API void debug_log (const char *file, int line, const char *msgfmt,...)
 
JABBERD2_API void set_debug_file (const char *filename)
 
JABBERD2_API void set_debug_log_from_config (config_t c)
 
JABBERD2_API jsighandler_tjabber_signal (int signo, jsighandler_t *func)
 

Variables

JABBERD2_API struct
_stanza_error_st 
_stanza_errors []
 

Macro Definition Documentation

#define PATH_MAX   512

Definition at line 69 of file util.h.

Referenced by authreg_init(), and mm_new().

#define INCL_UTIL_H

Definition at line 82 of file util.h.

#define JABBERD2_API   extern

Definition at line 93 of file util.h.

#define stanza_err_BAD_REQUEST   (100)
#define stanza_err_CONFLICT   (101)

Definition at line 368 of file util.h.

Referenced by _authreg_register_set().

#define stanza_err_FEATURE_NOT_IMPLEMENTED   (102)
#define stanza_err_FORBIDDEN   (103)
#define stanza_err_GONE   (104)

Definition at line 371 of file util.h.

#define stanza_err_INTERNAL_SERVER_ERROR   (105)
#define stanza_err_ITEM_NOT_FOUND   (106)
#define stanza_err_JID_MALFORMED   (107)

Definition at line 374 of file util.h.

Referenced by _authreg_auth_get(), _authreg_auth_set(), and _authreg_register_set().

#define stanza_err_NOT_ACCEPTABLE   (108)

Definition at line 375 of file util.h.

Referenced by _privacy_out_router(), and _roster_in_sess_s10n().

#define stanza_err_NOT_ALLOWED   (109)
#define stanza_err_PAYMENT_REQUIRED   (110)

Definition at line 377 of file util.h.

#define stanza_err_RECIPIENT_UNAVAILABLE   (111)

Definition at line 378 of file util.h.

#define stanza_err_REDIRECT   (112)

Definition at line 379 of file util.h.

Referenced by _router_process_route(), and filter_load().

#define stanza_err_REGISTRATION_REQUIRED   (113)

Definition at line 380 of file util.h.

#define stanza_err_REMOTE_SERVER_NOT_FOUND   (114)

Definition at line 381 of file util.h.

Referenced by _s2s_time_checks(), dispatch(), out_resolve(), and s2s_router_sx_callback().

#define stanza_err_REMOTE_SERVER_TIMEOUT   (115)

Definition at line 382 of file util.h.

Referenced by _out_mio_callback(), and _s2s_time_checks().

#define stanza_err_RESOURCE_CONSTRAINT   (116)
#define stanza_err_SERVICE_UNAVAILABLE   (117)
#define stanza_err_SUBSCRIPTION_REQUIRED   (118)

Definition at line 385 of file util.h.

#define stanza_err_UNDEFINED_CONDITION   (119)

Definition at line 386 of file util.h.

#define stanza_err_UNEXPECTED_REQUEST   (120)

Definition at line 387 of file util.h.

#define stanza_err_OLD_UNAUTH   (121)

Definition at line 388 of file util.h.

Referenced by _authreg_auth_get(), _authreg_auth_set(), and _authreg_register_set().

#define stanza_err_UNKNOWN_SENDER   (122)

Definition at line 389 of file util.h.

Referenced by _c2s_client_sx_callback().

#define stanza_err_LAST   (123)

Definition at line 390 of file util.h.

Referenced by stanza_error().

#define ZONE   __FILE__,__LINE__

Definition at line 421 of file util.h.

#define MAX_DEBUG   8192

Definition at line 422 of file util.h.

Referenced by __sx_debug().

#define log_debug   if(0) debug_log

Definition at line 428 of file util.h.

#define JABBER_MAIN (   name,
  display,
  description,
  depends 
)    int main(int argc, char** argv)

Definition at line 443 of file util.h.

Typedef Documentation

typedef struct spool_struct * spool
typedef struct log_st * log_t
typedef struct config_elem_st* config_elem_t

Definition at line 196 of file util.h.

typedef struct config_st* config_t

Definition at line 197 of file util.h.

typedef struct access_rule_st * access_rule_t
typedef struct access_st * access_t
typedef struct rate_st * rate_t

Definition at line 313 of file util.h.

typedef struct _jqueue_st * jqueue_t
typedef struct _stanza_error_st * stanza_error_t
typedef void jsighandler_t(int)

Definition at line 432 of file util.h.

Enumeration Type Documentation

enum log_type_t
Enumerator
log_STDOUT 
log_SYSLOG 
log_FILE 
log_STDOUT 
log_SYSLOG 
log_FILE 

Definition at line 173 of file util.h.

enum datetime_t
Enumerator
dt_DATE 
dt_TIME 
dt_DATETIME 
dt_LEGACY 
dt_DATE 
dt_TIME 
dt_DATETIME 
dt_LEGACY 

Definition at line 344 of file util.h.

Function Documentation

JABBERD2_API char* j_strdup ( const char *  str)


Definition at line 24 of file str.c.

JABBERD2_API char* j_strcat ( char *  dest,
const char *  txt 
)

Definition at line 32 of file str.c.

Referenced by spool_print().

JABBERD2_API int j_strcmp ( const char *  a,
const char *  b 
)

Definition at line 43 of file str.c.

Referenced by j_attr().

JABBERD2_API int j_strcasecmp ( const char *  a,
const char *  b 
)

Definition at line 55 of file str.c.

JABBERD2_API int j_strncmp ( const char *  a,
const char *  b,
int  i 
)

Definition at line 63 of file str.c.

JABBERD2_API int j_strncasecmp ( const char *  a,
const char *  b,
int  i 
)

Definition at line 71 of file str.c.

JABBERD2_API int j_strlen ( const char *  a)

Definition at line 79 of file str.c.

JABBERD2_API int j_atoi ( const char *  a,
int  def 
)
JABBERD2_API char* j_attr ( const char **  atts,
const char *  attr 
)
JABBERD2_API char* j_strnchr ( const char *  s,
int  c,
int  n 
)

like strchr, but only searches n chars

Definition at line 109 of file str.c.

JABBERD2_API void shahash_r ( const char *  str,
char  hashbuf[41] 
)

old convenience function, now in str.c

old convenience function, now in str.c

Definition at line 358 of file str.c.

References hex_from_raw(), and shahash_raw().

Referenced by _authreg_auth_set(), _pbx_process_command(), _router_process_handshake(), _sm_generate_id(), jid_random_part(), and s2s_db_key().

JABBERD2_API void shahash_raw ( const char *  str,
unsigned char  hashval[20] 
)

Definition at line 364 of file str.c.

References sha1_hash().

Referenced by _router_process_route(), and shahash_r().

JABBERD2_API char* strescape ( pool_t  p,
const char *  buf,
int  len 
)

Definition at line 285 of file str.c.

References pmalloc().

Referenced by spool_escape().

JABBERD2_API char* strunescape ( pool_t  p,
char *  buf 
)

Definition at line 238 of file str.c.

References pmalloc().

JABBERD2_API spool spool_new ( pool_t  p)

Definition at line 119 of file str.c.

References spool_struct::first, spool_struct::last, spool_struct::len, spool_struct::p, and pmalloc().

Referenced by spools().

JABBERD2_API void spooler ( spool  s,
  ... 
)

Definition at line 163 of file str.c.

References spool_add().

JABBERD2_API const char* spool_print ( spool  s)
JABBERD2_API void spool_add ( spool  s,
const char *  str 
)

Definition at line 147 of file str.c.

References _spool_add(), spool_struct::p, and pstrdup().

Referenced by spooler(), and spools().

JABBERD2_API void spool_escape ( spool  s,
const char *  raw,
int  len 
)

Definition at line 155 of file str.c.

References _spool_add(), spool_struct::p, and strescape().

JABBERD2_API const char* spools ( pool_t  p,
  ... 
)

convenience :)

Definition at line 209 of file str.c.

References spool_add(), spool_new(), and spool_print().

JABBERD2_API log_t log_new ( log_type_t  type,
const char *  ident,
const char *  facility 
)

Definition at line 69 of file log.c.

References _log_facility(), log_STDOUT, and log_SYSLOG.

Referenced by JABBER_MAIN().

JABBERD2_API void log_write ( log_t  log,
int  level,
const char *  msgfmt,
  ... 
)

Definition at line 104 of file log.c.

References _log_level, get_debug_flag(), log_STDOUT, log_SYSLOG, and MAX_LOG_LINE.

Referenced by _authreg_auth_log(), _authreg_auth_set(), _authreg_register_set(), _c2s_client_accept_check(), _c2s_client_mio_callback(), _c2s_client_sx_callback(), _c2s_config_expand(), _c2s_hosts_expand(), _c2s_pidfile(), _c2s_router_connect(), _c2s_sx_sasl_callback(), _c2s_time_checks(), _dns_result_a(), _help_pkt_sm(), _in_packet(), _in_result(), _in_sx_callback(), _in_verify(), _out_dialback(), _out_mio_callback(), _out_result(), _out_sx_callback(), _out_verify(), _pbx_open_pipe(), _pbx_process_command(), _roster_publish_user_load(), _route_add(), _router_accept_check(), _router_pidfile(), _router_process_bind(), _router_process_route(), _router_process_throttle(), _router_process_unbind(), _router_route_unbind_walker(), _router_sx_callback(), _s2s_check_conn_routes(), _s2s_hosts_expand(), _s2s_pidfile(), _s2s_router_connect(), _s2s_time_checks(), _sm_hosts_expand(), _sm_pidfile(), _sm_router_connect(), _sm_signal_hup(), _template_roster_reload(), authreg_init(), c2s_pbx_init(), c2s_router_mio_callback(), c2s_router_sx_callback(), dns_resolve_domain(), filter_load(), filter_packet(), in_mio_callback(), JABBER_MAIN(), message_log(), mm_new(), out_packet(), out_resolve(), out_route(), pkt_new(), router_mio_callback(), s2s_domain_in_whitelist(), s2s_router_mio_callback(), s2s_router_sx_callback(), sess_end(), sess_start(), sm_mio_callback(), sm_storage_rate_limit(), sm_sx_callback(), user_create(), user_delete(), and user_table_load().

JABBERD2_API void log_free ( log_t  log)

Definition at line 174 of file log.c.

References log_FILE, and log_SYSLOG.

Referenced by JABBER_MAIN().

JABBERD2_API config_t config_new ( void  )

new config structure

Definition at line 25 of file config.c.

References config_st::hash, and xhash_new().

Referenced by _sm_signal_hup(), and JABBER_MAIN().

JABBERD2_API int config_load ( config_t  c,
const char *  file 
)

turn an xml file into a config hash

Definition at line 74 of file config.c.

References config_load_with_id().

Referenced by _sm_signal_hup(), and JABBER_MAIN().

JABBERD2_API int config_load_with_id ( config_t  c,
const char *  file,
const char *  id 
)
JABBERD2_API config_elem_t config_get ( config_t  c,
const char *  key 
)
JABBERD2_API const char* config_get_one ( config_t  c,
const char *  key,
int  num 
)
JABBERD2_API const char* config_get_one_default ( config_t  c,
const char *  key,
int  num,
const char *  default_value 
)

get config value n for this key, returns default_value if not found

Definition at line 291 of file config.c.

References config_get_one().

JABBERD2_API int config_count ( config_t  c,
const char *  key 
)

how many values for this key?

Definition at line 303 of file config.c.

References config_st::hash, config_elem_st::nvalues, and xhash_get().

Referenced by _s2s_config_expand().

JABBERD2_API char* config_get_attr ( config_t  c,
const char *  key,
int  num,
const char *  attr 
)
JABBERD2_API char* config_expand ( config_t  c,
const char *  value 
)

Definition at line 333 of file config.c.

References _config_expandx().

JABBERD2_API void config_free ( config_t  c)

Replaces $(some.value) with config_get_one(c, "some.value", 0)

Replaces $(some.value) with config_get_one(c, "some.value", 0)

Definition at line 410 of file config.c.

References _config_reaper(), config_st::hash, config_st::nad, nad_free(), xhash_free(), and xhash_walk().

Referenced by _sm_signal_hup(), and JABBER_MAIN().

JABBERD2_API access_t access_new ( int  order)

Definition at line 25 of file access.c.

References access_st::order.

Referenced by _c2s_config_expand(), and _router_config_expand().

JABBERD2_API void access_free ( access_t  access)

Definition at line 34 of file access.c.

References access_st::allow, and access_st::deny.

Referenced by JABBER_MAIN().

JABBERD2_API int access_allow ( access_t  access,
const char *  ip,
const char *  mask 
)
JABBERD2_API int access_deny ( access_t  access,
const char *  ip,
const char *  mask 
)
JABBERD2_API int access_check ( access_t  access,
const char *  ip 
)
JABBERD2_API rate_t rate_new ( int  total,
int  seconds,
int  wait 
)
JABBERD2_API void rate_free ( rate_t  rt)
JABBERD2_API void rate_reset ( rate_t  rt)

Definition at line 41 of file rate.c.

References rate_st::bad, rate_st::count, and rate_st::time.

Referenced by rate_add(), and rate_check().

JABBERD2_API void rate_add ( rate_t  rt,
int  count 
)

Add a number of events to the counter.

This takes care of moving the sliding window, if we've moved outside the previous window.

Definition at line 48 of file rate.c.

References rate_st::bad, rate_st::count, rate_reset(), rate_st::seconds, rate_st::time, and rate_st::total.

Referenced by _c2s_client_accept_check(), _c2s_client_sx_callback(), _router_accept_check(), _router_sx_callback(), and sm_storage_rate_limit().

JABBERD2_API int rate_left ( rate_t  rt)
Returns
The amount of events we have left before we hit the rate limit. This could be number of bytes, or number of connection attempts, etc.

Definition at line 69 of file rate.c.

References rate_st::bad, rate_st::count, and rate_st::total.

Referenced by _c2s_client_sx_callback(), and _router_sx_callback().

JABBERD2_API int rate_check ( rate_t  rt)
Returns
1 if we're under the rate limit and everything is fine or 0 if the rate limit has been exceeded and we should throttle something.

Definition at line 78 of file rate.c.

References rate_st::bad, rate_st::count, rate_reset(), rate_st::time, rate_st::total, and rate_st::wait.

Referenced by _c2s_client_accept_check(), _c2s_client_sx_callback(), _c2s_time_checks(), _router_accept_check(), _router_sx_callback(), and sm_storage_rate_limit().

JABBERD2_API int ser_string_get ( char **  dest,
int *  source,
const char *  buf,
int  len 
)

Definition at line 35 of file serial.c.

JABBERD2_API int ser_int_get ( int *  dest,
int *  source,
const char *  buf,
int  len 
)

Definition at line 58 of file serial.c.

JABBERD2_API void ser_string_set ( const char *  source,
int *  dest,
char **  buf,
int *  len 
)

Definition at line 111 of file serial.c.

References SER_SAFE.

JABBERD2_API void ser_int_set ( int  source,
int *  dest,
char **  buf,
int *  len 
)

Definition at line 125 of file serial.c.

References SER_SAFE.

JABBERD2_API jqueue_t jqueue_new ( void  )
JABBERD2_API void jqueue_free ( jqueue_t  q)
JABBERD2_API void jqueue_push ( jqueue_t  q,
void *  data,
int  pri 
)
JABBERD2_API void* jqueue_pull ( jqueue_t  q)
JABBERD2_API int jqueue_size ( jqueue_t  q)
JABBERD2_API time_t jqueue_age ( jqueue_t  q)

Definition at line 130 of file jqueue.c.

References _jqueue_st::init_time.

Referenced by _out_mio_callback().

JABBERD2_API time_t datetime_in ( char *  date)
JABBERD2_API void datetime_out ( time_t  t,
datetime_t  type,
char *  date,
int  datelen 
)

Definition at line 114 of file datetime.c.

References dt_DATE, dt_DATETIME, dt_LEGACY, and dt_TIME.

Referenced by _iq_time_pkt_sm(), _vacation_in_sess(), pkt_delay(), and sess_start().

JABBERD2_API int apr_base64_decode_len ( const char *  bufcoded,
int  buflen 
)

Definition at line 47 of file base64.c.

References pr2six.

Referenced by b64_decode().

JABBERD2_API int apr_base64_decode ( char *  bufplain,
const char *  bufcoded,
int  buflen 
)

Definition at line 64 of file base64.c.

References apr_base64_decode_binary().

Referenced by b64_decode().

JABBERD2_API int apr_base64_encode_len ( int  len)

Definition at line 121 of file base64.c.

Referenced by b64_encode().

JABBERD2_API int apr_base64_encode ( char *  encoded,
const char *  string,
int  len 
)

Definition at line 128 of file base64.c.

References apr_base64_encode_binary().

Referenced by b64_encode().

JABBERD2_API char* b64_encode ( char *  buf,
int  len 
)

Definition at line 167 of file base64.c.

References apr_base64_encode(), and apr_base64_encode_len().

JABBERD2_API char* b64_decode ( char *  buf)

Definition at line 182 of file base64.c.

References apr_base64_decode(), and apr_base64_decode_len().

JABBERD2_API nad_t stanza_error ( nad_t  nad,
int  elem,
int  err 
)
JABBERD2_API nad_t stanza_tofrom ( nad_t  nad,
int  elem 
)
JABBERD2_API void hex_from_raw ( const unsigned char *  in,
int  inlen,
char *  out 
)

turn raw into hex - out must be (inlen*2)+1

Definition at line 26 of file hex.c.

Referenced by sess_start(), and shahash_r().

JABBERD2_API int hex_to_raw ( const char *  in,
int  inlen,
char *  out 
)

turn hex into raw - out must be (inlen/2)

Definition at line 40 of file hex.c.

JABBERD2_API int get_debug_flag ( void  )

Referenced by log_write().

JABBERD2_API void set_debug_flag ( int  v)
JABBERD2_API void debug_log ( const char *  file,
int  line,
const char *  msgfmt,
  ... 
)

Definition at line 261 of file log.c.

JABBERD2_API void set_debug_file ( const char *  filename)
JABBERD2_API void set_debug_log_from_config ( config_t  c)
JABBERD2_API jsighandler_t* jabber_signal ( int  signo,
jsighandler_t func 
)

Definition at line 33 of file jsignal.c.

Referenced by JABBER_MAIN().

Variable Documentation

JABBERD2_API struct _stanza_error_st _stanza_errors[]

Definition at line 401 of file util.h.