Commit Graph

13 Commits

Author SHA1 Message Date
5af6e234e1 (deps) replace hexyl with hexhex
Since we don't want to add too many dependencies for now, use our own
small hexdump lib `hexhex` instead of `hexyl`.
2022-04-10 15:12:56 +02:00
67608177b0 (docs) README 2022-04-06 20:20:34 +02:00
678e2ca60e add test script for useful dig command to test queries against the server 2022-04-06 20:20:17 +02:00
e0cc382eeb Improve tests 2022-04-06 20:20:00 +02:00
00ac8cbb4f Use result for test 2022-04-06 20:20:00 +02:00
0dc41ef845 (tests) Implement tests for DNS header parsing
* implemented 3 tests
  * valid opcodes
  * invalid opcodes
  * header too short
* fixed byteorder and bit shifting for flags
* added hexdump for main function for testing purposes
2022-04-06 20:19:41 +02:00
cccdf5b5e9 Implement TryFrom for DNSOpCode and DNSRCode. (#15)
Co-authored-by: Tobias Ottenweller <tobi@ottenweller.net>
Reviewed-on: #15
2022-04-06 20:18:38 +02:00
a07fb80b45 (chore) Change DNS OpCode and DNS RCode enum names to CamelCase (#13)
and use the same names as the RFC.
Also added some RFC documentation as doc comments in the code.

Co-authored-by: ddidderr <ddidderr@paul.network>
Reviewed-on: #13
2022-04-06 20:18:19 +02:00
812264e2ab (chore) replace flume dependency with std::sync::mpsc (#12)
Co-authored-by: ddidderr <ddidderr@paul.network>
Reviewed-on: #12
2022-04-06 20:17:48 +02:00
c67c940ba9 Improve code styling 2022-04-03 17:10:59 +02:00
bc278b7d39 Custom error type for parsing 2022-04-03 17:01:07 +02:00
b9ff4c9a51 Move parsing of udp datagram for dns header into model 2022-03-15 17:01:17 +01:00
71223309d7 Code for parsing headers added. 2022-03-13 21:56:17 +01:00