简体   繁体   中英

windows c++ DNS lookups

I have a windows C++ application (mingw, but I guess it doesn't matter). I need to do very occasional obscure types of DNS lookups, such as TXT and AXFR.

The best I can do at the moment is using gethostbyname in winsock, but that doesn't support the above types :(. Does anyone know of a nice library that runs on win32 for DNS lookups?

thanks

thn

I recommend using libunbound which is included in the source distribution of the Unbound recursive DNS server.

It's a full-feature recursive resolver bundled in a library. Alternatively the same group has a generic DNS library with a stub resolver called ldns .

ps are you sure mingw doesn't support the UNIX standard libresolv ? Check for a function called res_query .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM