jabberd2  2.2.17
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
#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_SSL_MAGIC   (0x01)
 magic numbers, so plugins can find each other
#define SX_ERR_SSL   (0x010)
 error codes
#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
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
JABBERD2_API int sx_sasl_auth (sx_plugin_t p, sx_t s, char *appname, char *mech, char *user, char *pass)
 trigger for client auth

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_SSL_MAGIC   (0x01)

magic numbers, so plugins can find each other

Definition at line 36 of file plugins.h.

Referenced by _sx_sasl_client_process(), _sx_sasl_stream(), and sx_ssl_init().

#define SX_ERR_SSL   (0x010)

error codes

Definition at line 41 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 42 of file plugins.h.

Referenced by _sx_ssl_process().

#define SX_ERR_COMPRESS   (0x020)

Definition at line 44 of file plugins.h.

Referenced by _sx_compress_rio(), and _sx_compress_wio().

#define SX_ERR_COMPRESS_FAILURE   (0x021)

Definition at line 45 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)
#define sx_sasl_cb_GEN_AUTHZID   (0x04)

Definition at line 111 of file plugins.h.

Referenced by _c2s_sx_sasl_callback(), _sx_sasl_canon_user(), and _sx_sasl_client_process().

#define sx_sasl_cb_CHECK_MECH   (0x05)

Definition at line 112 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 116 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 104 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,
char *  appname,
char *  mech,
char *  user,
char *  pass 
)