srv_resolv.h File Reference

Go to the source code of this file.

Functions

char * srv_lookup (pool p, const char *service, const char *domain)


Function Documentation

char* srv_lookup ( pool  p,
const char *  service,
const char *  domain 
)

do a DNS lookup

This function implements a SRV DNS lookup and falls back to normal AAAA/A resolution if no service has been given by the caller.

Parameters:
p memory pool to be used by this function
service which service should be looked up (e.g. "_xmpp-server._tcp")
domain which domain should be looked up
Returns:
comma separated list of results containing IPv4 and IPv6 addresses with or without ports
Todo:
The function honors the priority values of a SRV record but not the weight values. Implement handling of weights!

References __srv_list::host, j_strlen(), __srv_list::last, log_debug2, LOGT_IO, __srv_list::next, pmalloco(), __srv_list::port, __srv_list::priority, pstrdup(), srv_inet_ntoa(), srv_port2str(), srv_xhash_join(), T_SRV, xhash_get(), xhash_new(), and ZONE.

Referenced by dnsrv_child_process_xstream_io().


Generated on Wed Sep 10 01:59:47 2008 for jabberd14 by  doxygen 1.5.5