I’ve got a little DNS client/server library in Go [1], and I’m curious whether there’s a minimal subset of the binary format I could handle myself so my library only depends on the Go standard library. Any tips?
At this point I have this tangled web of custom IoT devices (motion sensors, lightbulbs, smart plugs, thermostat, etc) that I build and write all the firmware and orchestration software for. I have them all do autoconf and service discovery via mDNS, and the state of DNS parsing libraries in that space isn't amazing. I've run into multiple libraries now that actually error out or crash on completely valid and in-the-wild edge cases (usually involving some combination of message compression and zero-length fields), and it's often easier to just write a new parser that only bothers to handle the parts I care about rather than fixing a much larger parser so it doesn't crash.