25 Commits

Author SHA1 Message Date
6f9e4e9d59 Create module structure (#29)
Co-authored-by: Tobias Ottenweller <tobi@ottenweller.net>
Reviewed-on: #29
Co-authored-by: mice_on_drugs <tobi@ottenweller.net>
Co-committed-by: mice_on_drugs <tobi@ottenweller.net>
2022-06-05 19:05:49 +02:00
d1df76fc5e
(refactor) business models into general models folder 2022-06-05 15:16:45 +02:00
6527dbe6c5
Merge remote-tracking branch 'origin/master' 2022-06-05 15:07:31 +02:00
b32531866a
(refactor) according to new structure, have proto module with de- and encorders 2022-06-05 14:59:22 +02:00
d491ea12a5 (clippy) some small clippy fixes (#28)
Reviewed-on: #28
Co-authored-by: ddidderr <ddidderr@paul.network>
Co-committed-by: ddidderr <ddidderr@paul.network>
2022-06-05 14:58:37 +02:00
d0e4bea3e8 rfc4035_not_supported (#26)
Reviewed-on: #26
Co-authored-by: ddidderr <ddidderr@paul.network>
Co-committed-by: ddidderr <ddidderr@paul.network>
2022-05-08 19:40:30 +02:00
46629d2aad (tests) add tests for AA,TC,RD,RA flags (#25)
Reviewed-on: #25
Co-authored-by: ddidderr <ddidderr@paul.network>
Co-committed-by: ddidderr <ddidderr@paul.network>
2022-05-08 19:32:30 +02:00
ce12fddbe9 (tests) count tests added (#24)
Co-authored-by: Tobias Ottenweller <tobi@ottenweller.net>
Reviewed-on: #24
Co-authored-by: mice_on_drugs <tobi@ottenweller.net>
Co-committed-by: mice_on_drugs <tobi@ottenweller.net>
2022-05-08 19:18:04 +02:00
a72e40d9cb group tests (#23)
Co-authored-by: Tobias Ottenweller <tobi@ottenweller.net>
Reviewed-on: #23
Co-authored-by: mice_on_drugs <tobi@ottenweller.net>
Co-committed-by: mice_on_drugs <tobi@ottenweller.net>
2022-05-08 17:32:27 +02:00
df255f9267 (tests) rcode parsing tests (#22)
Check if valid and invalid response codes are parsed correctly.

Reviewed-on: #22
Co-authored-by: ddidderr <ddidderr@paul.network>
Co-committed-by: ddidderr <ddidderr@paul.network>
2022-05-08 16:48:15 +02:00
6a60951487 DNSMessageType tests added (#21)
Co-authored-by: Tobias Ottenweller <tobi@ottenweller.net>
Reviewed-on: #21
Co-authored-by: mice_on_drugs <tobi@ottenweller.net>
Co-committed-by: mice_on_drugs <tobi@ottenweller.net>
2022-05-08 16:15:02 +02:00
97e786905e (refactor) rename DNS header fields to understandable long names (#19)
Renames the DNS header fields and adds a new `enum DNSMessageType`.

Resolves #14

Co-authored-by: mice_on_drugs <tobi@ottenweller.net>
Reviewed-on: #19
Co-authored-by: ddidderr <ddidderr@paul.network>
Co-committed-by: ddidderr <ddidderr@paul.network>
2022-05-08 14:43:25 +02:00
623a82c2fe (deps) replace hexyl with hexhex (#18)
Since we don't want to add too many dependencies for now, use our own
small hexdump lib `hexhex` instead of `hexyl`.

Reviewed-on: #18
Co-authored-by: ddidderr <ddidderr@paul.network>
Co-committed-by: ddidderr <ddidderr@paul.network>
2022-05-08 14:39:29 +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