Strophe  0.10
XMPP client library
Data Structures | Enumerations | Functions
resolver.h File Reference

Data Structures

struct  resolver_srv_rr_struc
 

Enumerations

enum  xmpp_domain_state_t { XMPP_DOMAIN_NOT_FOUND, XMPP_DOMAIN_FOUND, XMPP_DOMAIN_ALTDOMAIN }
 

Functions

void resolver_initialize (void)
 
void resolver_shutdown (void)
 
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...
 

Detailed Description

DNS resolver.

Enumeration Type Documentation

◆ xmpp_domain_state_t

Enumerator
XMPP_DOMAIN_NOT_FOUND 
XMPP_DOMAIN_FOUND 
XMPP_DOMAIN_ALTDOMAIN 

Function Documentation

◆ resolver_initialize()

void resolver_initialize ( void  )

◆ resolver_shutdown()

void resolver_shutdown ( void  )

◆ resolver_srv_lookup_buf()

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.

Parameters
ctxa Strophe context object
bufmessage in RFC1035 format
lenlength of the message
srv_rr_listis the result
Returns
XMPP_DOMAIN_FOUND on success or XMPP_DOMAIN_NOT_FOUND on fail

◆ resolver_srv_lookup()

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.

Parameters
ctxa Strophe context object
serviceservice of the SRV record
protoprotocol of the SRV record
domainresolving domain
srv_rr_listis the result
Returns
XMPP_DOMAIN_FOUND on success or XMPP_DOMAIN_NOT_FOUND on fail

◆ resolver_srv_free()

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().

Parameters
ctxa Strophe context object
srv_rr_lista list allocated by lookup functions