wahern / dns

dns.c: Single file non-blocking DNS C library without callbacks or external dependencies.
http://25thandclement.com/~william/projects/dns.c.html
MIT License
256 stars 64 forks source link

How to use dns.c do dns redirecting ? #18

Closed Pillar1989 closed 7 years ago

Pillar1989 commented 7 years ago

Hi, I want to use dns.c as my raspberry pi dns server, when the raspberry pi is offline , all of dns request will be redirected a IP which I pointed. now I use dnsmasq to do this function, I set "address=/#/172.1.8.1" on dnsmasq.conf. But I dont like dnsmasq. so how can I use dns.c do same job ?

wahern commented 7 years ago

dns.c is a low-level DNS library, not a standalone application or service. To replace dnsmasq you'd basically need to reimplement all of it (directly or by using other libraries), except the DNS portions.

wahern commented 7 years ago

Contact me by e-mail if you have more questions along those lines. I might be able to share some code for implementing a DNS server.