MaraDNS is a fully open-sourced DNS server that strives to be secure. It is written in C (no C++) and is suitable for embedded systems.