< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] Windows Name Resolution in reSIP


I've been looking into a way to get reSIP to use windows name resolution along side with ares.  This would allow reSIP to resolve names using Netbios, WINS and hosts file on windows systems.  The problem is that these functions are synchronous and can block the stack. 

 

For now I've committed a solution that is synchronous - it works as follows:

-          to enable on a WIN32 system - add compile flag:  WIN32_SYNCRONOUS_RESOLUTION_ON_ARES_FAILURE

-          if ares DNS lookup fails then we fallback to Windows name resolution

 

Another draw back of this is that if a name really doesn't exist then it will take twice as long to detect it.  Ie. Ares needs to timeout then Win API needs to timeout.

 

If anyone has any bright idea's on a slick way to make these windows name resolution API's synchronous, then please share it.  Until I can find a good solution it will remain a compile flag.

 

Thanks,

 

Scott