[getdns-api] getdns_context_set_upstream_recursive_servers

Willem Toorop willem at nlnetlabs.nl
Tue May 10 07:52:13 UTC 2016


Hi Tom,

That is indeed the function you need to use to target servers directly.
  Don't forget to put the context in GETDNS_RESOLUTION_STUB mode with
getdns_context_set_resolution_type() too.  To not send the RD bit set
with your queries, you have to pass along an (unofficial) header
extension with the "rd" bit set to zero, ie:
	{ "header": { "rd": 0 } }.

But yes, function (and constant) names in getdns can be rather verbose.
 getdns_context_set_upstreams() would have worked just as well.  We
could add unofficial more concise aliases, but I don't want to bloat the
API.

Regards,


-- Willem

Op 10-05-16 om 00:56 schreef Tom Pusateri:
> If I want to send a query to the target of the result of an SRV query, do I use this function to set the target as the DNS server to query?
> 
> getdns_return_t
> getdns_context_set_upstream_recursive_servers( getdns_context *context, getdns_list *upstream_list );
> 
> The name is a little misleading since I don’t want to do a recursive resolve, just a direct query with no rd bit set but I don’t see any other way to set the DNS server to query.
> 
> If this is the right function, then maybe ‘recursive’ should be removed?
> 
> Thanks,
> Tom
> 
> 
> 
> 
> _______________________________________________
> spec mailing list
> spec at getdnsapi.net
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.getdnsapi.net/pipermail/users/attachments/20160510/c71de4c3/attachment.bin>


More information about the Users mailing list