Strophe: resolver.h File Reference

Strophe 0.9 XMPP client library

Data Structures | Enumerations | Functions
resolver.h File Reference

DNS resolver. More...

## Data Structures
struct | resolver_srv_rr_t

## Enumerations
enum | xmpp_domain_state_t { XMPP_DOMAIN_NOT_FOUND, XMPP_DOMAIN_FOUND, XMPP_DOMAIN_ALTDOMAIN }

## Functions
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

enum xmpp_domain_state_t

Enumerator
XMPP_DOMAIN_NOT_FOUND |
XMPP_DOMAIN_FOUND |
XMPP_DOMAIN_ALTDOMAIN |

## Function Documentation

## ◆ 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

  ctx | a Strophe context object
  buf | message in RFC1035 format
  len | length of the message
  srv_rr_list | is 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

  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

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

  ctx | a Strophe context object
  srv_rr_list | a list allocated by lookup functions