jabberd2  2.3.6
Data Structures | Macros | Typedefs | Functions
plugins.h File Reference

Go to the source code of this file.

Data Structures

struct  sx_sasl_creds_st
 

Macros

#define SX_SSL_WRAPPER   (1<<0) /** SSL wrapper on legacy 5223 port */
 sx stream flags More...
 
#define SX_SSL_STARTTLS_OFFER   (1<<1) /** don't offer starttls without this */
 
#define SX_SSL_STARTTLS_REQUIRE   (1<<2) /** starttls is required on the stream */
 
#define SX_SASL_OFFER   (1<<3) /** don't offer sasl without this */
 
#define SX_COMPRESS_WRAPPER   (1<<4)
 
#define SX_COMPRESS_OFFER   (1<<5)
 
#define SX_WEBSOCKET_WRAPPER   (1<<6) /** indicates stream over WebSocket connection */
 
#define SX_SSL_MAGIC   (0x01)
 magic numbers, so plugins can find each other More...
 
#define SX_ERR_SSL   (0x010)
 error codes More...
 
#define SX_ERR_STARTTLS_FAILURE   (0x011)
 
#define SX_ERR_COMPRESS   (0x020)
 
#define SX_ERR_COMPRESS_FAILURE   (0x021)
 
#define SX_CONN_EXTERNAL_ID_MAX_COUNT   8
 
#define sx_sasl_cb_GET_REALM   (0x00)
 
#define sx_sasl_cb_GET_PASS   (0x01)
 
#define sx_sasl_cb_CHECK_PASS   (0x02)
 
#define sx_sasl_cb_CHECK_AUTHZID   (0x03)
 
#define sx_sasl_cb_GEN_AUTHZID   (0x04)
 
#define sx_sasl_cb_CHECK_MECH   (0x05)
 
#define sx_sasl_ret_OK   (0)
 
#define sx_sasl_ret_FAIL   (1)
 

Typedefs

typedef int(* sx_sasl_callback_t) (int cb, void *arg, void **res, sx_t s, void *cbarg)
 the callback function More...
 
typedef struct sx_sasl_creds_stsx_sasl_creds_t
 

Functions

JABBERD2_API int sx_sasl_init (sx_env_t env, sx_plugin_t p, va_list args)
 init function More...
 
JABBERD2_API int sx_sasl_auth (sx_plugin_t p, sx_t s, const char *appname, const char *mech, const char *user, const char *pass)
 trigger for client auth More...
 
JABBERD2_API int sx_ack_init (sx_env_t env, sx_plugin_t p, va_list args)
 init function More...
 

Macro Definition Documentation

#define SX_SSL_WRAPPER   (1<<0) /** SSL wrapper on legacy 5223 port */
#define SX_SSL_STARTTLS_OFFER   (1<<1) /** don't offer starttls without this */
#define SX_SSL_STARTTLS_REQUIRE   (1<<2) /** starttls is required on the stream */
#define SX_SASL_OFFER   (1<<3) /** don't offer sasl without this */
#define SX_COMPRESS_WRAPPER   (1<<4)
#define SX_COMPRESS_OFFER   (1<<5)
#define SX_WEBSOCKET_WRAPPER   (1<<6) /** indicates stream over WebSocket connection */
#define SX_SSL_MAGIC   (0x01)

magic numbers, so plugins can find each other

Definition at line 37 of file plugins.h.

Referenced by _sx_sasl_client_process(), and sx_ssl_init().

#define SX_ERR_SSL   (0x010)

error codes

Definition at line 42 of file plugins.h.

Referenced by _sx_ssl_handshake(), _sx_ssl_rio(), and _sx_ssl_wio().

#define SX_ERR_STARTTLS_FAILURE   (0x011)

Definition at line 43 of file plugins.h.

Referenced by _sx_ssl_process().

#define SX_ERR_COMPRESS   (0x020)

Definition at line 45 of file plugins.h.

Referenced by _sx_compress_rio(), and _sx_compress_wio().

#define SX_ERR_COMPRESS_FAILURE   (0x021)

Definition at line 46 of file plugins.h.

Referenced by _sx_compress_process().

#define SX_CONN_EXTERNAL_ID_MAX_COUNT   8
#define sx_sasl_cb_GET_REALM   (0x00)
#define sx_sasl_cb_GET_PASS   (0x01)
#define sx_sasl_cb_CHECK_PASS   (0x02)
#define sx_sasl_cb_CHECK_AUTHZID   (0x03)

Definition at line 113 of file plugins.h.

Referenced by _c2s_sx_sasl_callback(), _router_sx_sasl_callback(), and _sx_sasl_open().

#define sx_sasl_cb_GEN_AUTHZID   (0x04)

Definition at line 114 of file plugins.h.

Referenced by _c2s_sx_sasl_callback(), and _sx_sasl_client_process().

#define sx_sasl_cb_CHECK_MECH   (0x05)

Definition at line 115 of file plugins.h.

Referenced by _c2s_sx_sasl_callback(), _router_sx_sasl_callback(), and _sx_sasl_features().

#define sx_sasl_ret_OK   (0)
#define sx_sasl_ret_FAIL   (1)

Definition at line 119 of file plugins.h.

Referenced by _c2s_sx_sasl_callback(), and _router_sx_sasl_callback().

Typedef Documentation

typedef int(* sx_sasl_callback_t) (int cb, void *arg, void **res, sx_t s, void *cbarg)

the callback function

Definition at line 107 of file plugins.h.

Function Documentation

JABBERD2_API int sx_sasl_init ( sx_env_t  env,
sx_plugin_t  p,
va_list  args 
)
JABBERD2_API int sx_sasl_auth ( sx_plugin_t  p,
sx_t  s,
const char *  appname,
const char *  mech,
const char *  user,
const char *  pass 
)
JABBERD2_API int sx_ack_init ( sx_env_t  env,
sx_plugin_t  p,
va_list  args 
)

init function

init function

Definition at line 107 of file ack.c.

References _sx_ack_features(), _sx_ack_header(), _sx_ack_process(), _sx_plugin_st::features, _sx_plugin_st::header, log_debug, _sx_plugin_st::process, and ZONE.

Referenced by JABBER_MAIN().