APR resolver?

2006-03-28 Thread Rian A Hunter
While implementing the message bounce in mod_smtpd I ran into a snag. I need to
get mx records for host names!! There seems to be no portable DNS resolver
library/interface. For UNIX there is at least res_search() and dn_expand()
except on BSD this is in the standard library and in linux you need -lresolv.

I know there is apr_sockaddr_info_get but this doesn't handle getting mx records
(or other DNS record types). Should a resolver API be added to APR. Actually I
think yes and I think I'm going to implement this. Any objections?

Rian


Re: APR resolver?

2006-03-28 Thread Garrett Rooney
On 3/28/06, Rian A Hunter [EMAIL PROTECTED] wrote:

 I know there is apr_sockaddr_info_get but this doesn't handle getting mx 
 records
 (or other DNS record types). Should a resolver API be added to APR. 
 Actually I
 think yes and I think I'm going to implement this. Any objections?

A resolver API would be great to have.  Some people have talked in the
past about implementing an asynchronous DNS resolver in APR, since the
existing Async resolver libraries out there are not especially easy to
use with an APR app, if you felt like taking that additional step I'm
sure it would be welcome.

That said, this should really be discussed on [EMAIL PROTECTED], not [EMAIL 
PROTECTED] ;-)

-garrett