So I spent practically all day today writing a DNS resolver. There is literally no good code on the internet ready to go for this. There is lots of convoluted hard to read/understand code. I’ll walk a few steps back from that and say that DNS is somewhat complicated (although having figured it out, I can’t say its THAT complicated). One really has to read CAREFULLY through the RFC (1035 is what I’m working on) in order to understand exactly what gets transported over the network.
I was actually just about to post a rant on here when I ran my code one last time and voila, I recieved a valid response from a DNS server for my custom generated request. One step closer to finishing this.