cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: c-ares

From: codemastr <codemstr_at_ptd.net>
Date: Thu, 18 Mar 2004 18:11:05 -0500

> Does c-ares supports caching ?
> Does c-ares supports SRV queries ?

To answer both of your questions, it depends on what you mean.

Caching is up to you. If you want caching, you need to keep the cache
yourself and check that before making an ares query.

As for SRV records, the ares_mkquery and ares_query functions will let you
send any query you want. The thing is, the library itself does not parse the
SRV reply so you'd have to deal with that on your own as well. I did a
little googling, and
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/resolve.c?rev=1.2
has a function called dns_srv_parser which should give you some insight.

I personally would not mind seeing the ability to lookup SRV records in
c-ares. It kind of makes sense for libcurl as well. I mean the SRV record
was designed so that you could find common services such as HTTP and FTP
servers, so having an option in libcurl that would, in addition to
A/CNAME/etc. lookups, would also check SRV records, would make a nice
addition (especially useful for people who don't have their servers running
on the well-known-port number). But since SRV records are not commonly used,
it should, in my mind, be made optional in libcurl if this were ever added.

Anyone else have any opinions on that?

Dominick Meglio
Received on 2004-03-19