Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Querying custom DNS Server using C

Tags:

c

dns

winapi

I want to make a DNS query to my own DNS server instead the default one.

Which api can I use to do that ?

I know getaddrinfo (which ping.exe using), but how can i make this function query my dns server, instead the default one ?

Thanks!

like image 940
john terry Avatar asked Jun 16 '26 09:06

john terry


1 Answers

Take a look at the adns resolver library.

Another option is to use the c-ares library, which works on Windows and allows you to use alternative nameservers.

like image 94
0xfe Avatar answered Jun 18 '26 21:06

0xfe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!