On 3/30/06, Alexander Lazic <[EMAIL PROTECTED]> wrote: > Hi, > > On Mit 29.03.2006 12:36, Rian A Hunter wrote: > > > >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? > > howabout to add/use a yet available lib such as: > > UDNS: DNS Resolver Library > http://www.corpit.ru/mjt/udns.html > > or similar libs?
Well, for UDNS and ADNS the problem is one of licensing (LGPL and GPL respectively), and for Ares and C-Ares it's one of reliance on select baked into the core of the code. You could probably migrate the ares code to a model that used APR pollsets, but it's not trivial. -garrett
