jabberd2
2.2.16
|
#include "sx.h"
Go to the source code of this file.
Functions | |
static void | _sx_compress_notify_compress (sx_t s, void *arg) |
this plugin implements the XEP-0138: Stream Compression | |
static int | _sx_compress_process (sx_t s, sx_plugin_t p, nad_t nad) |
static void | _sx_compress_features (sx_t s, sx_plugin_t p, nad_t nad) |
static int | _sx_compress_wio (sx_t s, sx_plugin_t p, sx_buf_t buf) |
static int | _sx_compress_rio (sx_t s, sx_plugin_t p, sx_buf_t buf) |
static void | _sx_compress_new (sx_t s, sx_plugin_t p) |
static void | _sx_compress_free (sx_t s, sx_plugin_t p) |
cleanup | |
int | sx_compress_init (sx_env_t env, sx_plugin_t p, va_list args) |
args: none | |
int | sx_compress_client_compress (sx_plugin_t p, sx_t s, char *pemfile) |
static void _sx_compress_notify_compress | ( | sx_t | s, |
void * | arg | ||
) | [static] |
this plugin implements the XEP-0138: Stream Compression
Definition at line 25 of file compress.c.
References _sx_debug, ZONE, _sx_reset(), sx_server_init(), _sx_st::flags, and SX_COMPRESS_WRAPPER.
Referenced by _sx_compress_process().
static int _sx_compress_process | ( | sx_t | s, |
sx_plugin_t | p, | ||
nad_t | nad | ||
) | [static] |
Definition at line 35 of file compress.c.
References _sx_st::type, type_SERVER, _sx_st::flags, SX_COMPRESS_OFFER, NAD_ENS, NAD_NURI_L, uri_COMPRESS, NAD_NURI, NAD_ENAME_L, NAD_ENAME, nad_free(), _sx_st::compressed, _sx_debug, ZONE, jqueue_push(), _sx_st::wbufq, _sx_buffer_new(), _sx_compress_notify_compress(), _sx_st::want_write, type_CLIENT, _sx_st::ns, _sx_st::req_to, _sx_st::req_from, _sx_st::req_version, _sx_reset(), sx_client_init(), SX_COMPRESS_WRAPPER, _sx_gen_error, SX_ERR_COMPRESS_FAILURE, _sx_event, and event_ERROR.
Referenced by sx_compress_init().
static void _sx_compress_features | ( | sx_t | s, |
sx_plugin_t | p, | ||
nad_t | nad | ||
) | [static] |
Definition at line 119 of file compress.c.
References _sx_st::compressed, _sx_st::flags, SX_COMPRESS_OFFER, SX_SSL_STARTTLS_REQUIRE, _sx_st::ssf, _sx_debug, ZONE, nad_add_namespace(), uri_COMPRESS_FEATURE, nad_append_elem(), and nad_append_cdata().
Referenced by sx_compress_init().
static int _sx_compress_wio | ( | sx_t | s, |
sx_plugin_t | p, | ||
sx_buf_t | buf | ||
) | [static] |
Definition at line 135 of file compress.c.
References _sx_st::plugin_data, _sx_plugin_st::index, _sx_st::flags, SX_COMPRESS_WRAPPER, _sx_st::compressed, _sx_debug, ZONE, _sx_buf_st::len, _sx_buffer_alloc_margin(), _sx_buf_st::data, _sx_buffer_clear(), _sx_gen_error, SX_ERR_COMPRESS, _sx_event, event_ERROR, sx_error(), stream_err_INTERNAL_SERVER_ERROR, and sx_close().
Referenced by sx_compress_init().
static int _sx_compress_rio | ( | sx_t | s, |
sx_plugin_t | p, | ||
sx_buf_t | buf | ||
) | [static] |
Definition at line 196 of file compress.c.
References _sx_st::plugin_data, _sx_plugin_st::index, _sx_st::flags, SX_COMPRESS_WRAPPER, _sx_st::compressed, _sx_debug, ZONE, _sx_buf_st::len, _sx_buffer_alloc_margin(), _sx_buf_st::data, _sx_buffer_clear(), _sx_gen_error, SX_ERR_COMPRESS, _sx_event, event_ERROR, sx_error(), stream_err_INVALID_XML, sx_close(), and _sx_st::want_read.
Referenced by sx_compress_init().
static void _sx_compress_new | ( | sx_t | s, |
sx_plugin_t | p | ||
) | [static] |
Definition at line 266 of file compress.c.
References _sx_st::flags, SX_COMPRESS_WRAPPER, _sx_st::compressed, _sx_debug, ZONE, _sx_st::tag, _sx_buffer_new(), _sx_st::plugin_data, _sx_plugin_st::index, and _sx_chain_io_plugin().
Referenced by sx_compress_init().
static void _sx_compress_free | ( | sx_t | s, |
sx_plugin_t | p | ||
) | [static] |
cleanup
Definition at line 304 of file compress.c.
References _sx_st::plugin_data, _sx_plugin_st::index, log_debug, ZONE, _sx_st::type, type_NONE, and _sx_buffer_free().
Referenced by sx_compress_init().
int sx_compress_init | ( | sx_env_t | env, |
sx_plugin_t | p, | ||
va_list | args | ||
) |
args: none
Definition at line 331 of file compress.c.
References _sx_debug, ZONE, _sx_plugin_st::client, _sx_compress_new(), _sx_plugin_st::server, _sx_plugin_st::rio, _sx_compress_rio(), _sx_plugin_st::wio, _sx_compress_wio(), _sx_plugin_st::features, _sx_compress_features(), _sx_plugin_st::process, _sx_compress_process(), _sx_plugin_st::free, and _sx_compress_free().
Referenced by JABBER_MAIN().
int sx_compress_client_compress | ( | sx_plugin_t | p, |
sx_t | s, | ||
char * | pemfile | ||
) |
Definition at line 346 of file compress.c.
References _sx_st::type, type_CLIENT, _sx_st::state, state_STREAM, _sx_debug, ZONE, _sx_st::flags, SX_COMPRESS_WRAPPER, _sx_st::compressed, jqueue_push(), _sx_st::wbufq, _sx_buffer_new(), uri_COMPRESS, _sx_st::want_write, _sx_event, and event_WANT_WRITE.