This comes from John Crickett's DNS Forwarder coding challenge
- I never finished the
serialize()
function and don't intend to. So the forwarder forwards the request, and parses the reply, but doesn't serialize it as the reply to the client. So the reply bufferdig
receives is the untouched reply. - I never finished reformatting a cached result to be returned to the dns tool and don't intend to. So if you hit a cached result your dns tool will hang until timeout as no result will ever be returned currently.
My reasoning for not finishing these things is mostly because I feel like I learned enough from going through most of the code challenge.
- Install boost
brew install boost
- Update
.vscode/c_cpp_properties.json
'sincludePath
to the version of boost that was installed
- Run make
make
- Run the binary
./main
- Query www.google.com or hopefully somewhere else
dig @127.0.0.1 -p 1053 www.google.com
- View logs of server, see that the reply was deserialized.
- Using boost for the first time
- Although probably could have been implemented a different way, I got to play with
bitset
s, which I've never used before. - Using wireshark for debugging packets and octect offsets
- Introduction to DNS protocol
- Generally more experience translating RFCs to code
- Generally more experience with c++