Commit Graph

13 Commits

Author SHA1 Message Date
Érico Nogueira 83de8de084 Specify that exit functions are noreturn.
Fixes a warning on clang.
2021-09-20 20:30:16 -03:00
Érico Nogueira 3e4b5a3eb9 Fix DNS header generation.
The end result is the same, but we were using nscount to populate the
ARCOUNT fields.
2021-09-20 20:25:40 -03:00
Érico Nogueira 27930277bc Add basic Makefile.
-Wno-missing braces necessary due to bogus GCC warning, see [1].

[1] https://stackoverflow.com/questions/13746033/how-to-repair-warning-missing-braces-around-initializer
2021-09-20 20:24:53 -03:00
Érico Nogueira f0f63ce268 Add proper error message for command line options. 2021-09-20 20:20:53 -03:00
Érico Nogueira 768c01cfdf Allow the DNS server to be selected. 2021-08-18 12:14:37 -03:00
Érico Nogueira 4a35a8b4a8 Add warning about memory unsafety. 2021-08-18 11:49:16 -03:00
Érico Nogueira f6c29d9d62 Add command line options.
- choose between A and AAAA records (ipv4 or ipv6)
- select a non hardcoded domain
2021-08-18 11:48:18 -03:00
Érico Nogueira 3adefb94a0 Implement AAAA record parsing. 2021-08-18 11:48:18 -03:00
Érico Nogueira 69f584a78c Improve rcode error message. 2021-08-18 11:29:14 -03:00
Érico Nogueira 00449157c7 Make query generation a function. 2021-08-18 11:28:55 -03:00
Érico Nogueira 88234ad8fc Close socket at the earliest. 2021-07-20 01:25:18 -03:00
Érico Nogueira 79787eeaab Actually obtain qdcount from answer.
We were using the previous value, set during query creation.
2021-07-20 01:22:15 -03:00
Érico Nogueira 4c62db54e7 Initial commit.
Hardcodes query for google.com, but can fully interpret the resulting
answer.
2021-07-20 00:14:17 -03:00