[asterisk-dev] [Code Review] 4437: dns: Define a core DNS API with examples.

Olle E. Johansson oej at edvina.net
Tue Mar 3 15:35:23 CST 2015


On 03 Mar 2015, at 22:30, Joshua Colp <jcolp at digium.com> wrote:

> Olle E. Johansson wrote:
>> 
>> On 03 Mar 2015, at 21:10, Mark Michelson <reviewboard at asterisk.org
>> <mailto:reviewboard at asterisk.org>> wrote:
>> 
>>> for (i = 0; i<  ast_query_set_num_queries(query_set); ++i) {
>>>     struct ast_dns_query *query = ast_dns_query_set_get(query_set, i);
>>>     ...do stuff...
>>> }
>>> 
>> Why not use DNS terminology?
> 
> Can you elaborate on what you mean? Are you referring to query set as a concept (I'm unaware if there's a specific term for a group of queries in DNS) or to other stuff in the DNS API itself?
> 
queries are what you send. This seems to handle a result set.

I may have misunderstood.

You have queries and result sets that contain records.

In some cases you use that to create a SRV list of servers - handling the weights for load balancing and priorities. This is a sorted list that is not the same as the result set of an SRV query. One SRV record can lead to multiple IP addresses of different families - so you have four entries in your list for one single hostname.

I would recommend trying to align the names with the DNS terminology so we don't invent new stuff or misunderstandings. 

Like in the usage of "AOR" in the PJSIP config file... But I don't want to open that discussion again. ;-)

/O




More information about the asterisk-dev mailing list