Strophe 0.12
XMPP client library
|
DNS resolver. More...
Data Structures | |
struct | message_header |
Macros | |
#define | MESSAGE_HEADER_LEN 12 |
#define | MESSAGE_RESPONSE 1 |
#define | MESSAGE_T_SRV 33 |
#define | MESSAGE_C_IN 1 |
#define | RESOLVER_BUF_MAX 65536 |
#define | BUF_OVERFLOW_CHECK(ptr, len) |
Functions | |
static int | resolver_raw_srv_lookup_buf (xmpp_ctx_t *ctx, const unsigned char *buf, size_t len, resolver_srv_rr_t **srv_rr_list) |
void | resolver_initialize (void) |
void | resolver_shutdown (void) |
static void | resolver_srv_list_sort (resolver_srv_rr_t **srv_rr_list) |
int | resolver_srv_lookup_buf (xmpp_ctx_t *ctx, const unsigned char *buf, size_t len, resolver_srv_rr_t **srv_rr_list) |
Perform lookup for RFC1035 message format. More... | |
int | resolver_srv_lookup (xmpp_ctx_t *ctx, const char *service, const char *proto, const char *domain, resolver_srv_rr_t **srv_rr_list) |
Resolve SRV record. More... | |
void | resolver_srv_free (xmpp_ctx_t *ctx, resolver_srv_rr_t *srv_rr_list) |
Release a list returned by resolver_srv_lookup() or resolver_srv_lookup_buf(). More... | |
static uint16_t | xmpp_ntohs_ptr (const void *ptr) |
static uint8_t | message_header_qr (const struct message_header *header) |
static uint8_t | message_header_rcode (const struct message_header *header) |
static size_t | message_name_append_safe (char *name, size_t name_len, size_t name_max, const char *tail, size_t tail_len) |
static unsigned | message_name_get (const unsigned char *buf, size_t buf_len, unsigned buf_offset, char *name, size_t name_max) |
static unsigned | message_name_len (const unsigned char *buf, size_t buf_len, unsigned buf_offset) |
DNS resolver.
#define MESSAGE_HEADER_LEN 12 |
#define MESSAGE_RESPONSE 1 |
#define MESSAGE_T_SRV 33 |
#define MESSAGE_C_IN 1 |
#define RESOLVER_BUF_MAX 65536 |
#define BUF_OVERFLOW_CHECK | ( | ptr, | |
len | |||
) |
|
static |
void resolver_initialize | ( | void | ) |
void resolver_shutdown | ( | void | ) |
|
static |
int resolver_srv_lookup_buf | ( | xmpp_ctx_t * | ctx, |
const unsigned char * | buf, | ||
size_t | len, | ||
resolver_srv_rr_t ** | srv_rr_list | ||
) |
Perform lookup for RFC1035 message format.
This function allocates all elements.
ctx | a Strophe context object |
buf | message in RFC1035 format |
len | length of the message |
srv_rr_list | is the result |
int resolver_srv_lookup | ( | xmpp_ctx_t * | ctx, |
const char * | service, | ||
const char * | proto, | ||
const char * | domain, | ||
resolver_srv_rr_t ** | srv_rr_list | ||
) |
Resolve SRV record.
ctx | a Strophe context object |
service | service of the SRV record |
proto | protocol of the SRV record |
domain | resolving domain |
srv_rr_list | is the result |
void resolver_srv_free | ( | xmpp_ctx_t * | ctx, |
resolver_srv_rr_t * | srv_rr_list | ||
) |
Release a list returned by resolver_srv_lookup() or resolver_srv_lookup_buf().
ctx | a Strophe context object |
srv_rr_list | a list allocated by lookup functions |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |