Antti Tönkyrä
f3ad7f14fa
dns: add rdata logging for NS rrtype
6 years ago
Simon Dugas
4336a0e739
dns: log rdata for NULL record type
...
Logs the rdata for a NULL record type as a printable string.
6 years ago
Simon Dugas
7f26246ce1
dns: parse and log fields for SOA record type
...
Added `dns_parse_rdata_soa` to parse SOA fields into an `DNSRDataSOA`
struct.
Added logging for answer and authority SOA records in both version
1 & 2, as well as grouped formats.
6 years ago
Simon Dugas
af498fd840
dns: use nom's rest to take all remaining rdata
...
Using nom's `rest` combinator eliminates the need to call the do_parse
macro for parsing a single element.
6 years ago
Simon Dugas
8005f50647
dns: refactor to handle more rdata formats
...
Represent rdata as `DNSRData` enum variants instead of `Vec<u8>`.
This will allow parsing/logging of more complex formats like SOA.
6 years ago
Pierre Chifflier
442500678b
rust: use the streaming version of combinators to fix incomplete reads
7 years ago
Pierre Chifflier
f3ddd7127c
rust: Add types annotation when required
...
Unfortunately, the transition to nom 5 (and functions instead of macros)
has side-effects, one of them being requiring lots of types annotations
when using a parsing, for ex in a match instruction.
7 years ago
Pierre Chifflier
8664a55ee7
rust/dns: remove unneeded calls to closure!
7 years ago
Pierre Chifflier
5b809f77f1
rust: upgrade all parsers to nom 5
7 years ago
Jason Ish
42e5065ab8
rust: update to Rust 2018 with cargo fix
...
Migrate to Rust 2018 edition.
Credit to Danny Browning for first demontrating this:
https://github.com/OISF/suricata/pull/3604/commits
7 years ago
Victor Julien
b1d4931842
rust: fix warnings about wrong type of comments
...
"rustdoc does not generate documentation for macro expansions"
7 years ago
Pierre Chifflier
f22695130b
rust: nom4 requires to add complete!() when using many! combinators
8 years ago
Pierre Chifflier
13b7399790
rust: upgrade all parsers to nom4
8 years ago
Victor Julien
73fac478a2
rust/dns: fix nom verbose error mode
9 years ago
Jason Ish
5a8537fe4a
rust/dns - convert more type values to text
...
Issue:
https://redmine.openinfosecfoundation.org/issues/2364
Convert more record type and errr code values to text.
Remove duplicate type declarations.
9 years ago
Jason Ish
40991cab82
rust/dns: handle multiple txt strings
...
Fix handling of TXT records when there are multiple strings
in a single TXT record. For now, conform to the C implementation
where an answer record is created for each string in a single
txt record.
Also removes the data_len field from the answer entry. In Rust,
the length is available from actual data, which after decoding
may actually be different than the encoded data length, so just
use the length from the actual data.
9 years ago
Jason Ish
4bdb722371
rust/dns: fix unit tests on Rust 1.7.0
9 years ago
Jason Ish
2aebfbce94
rust/dns: support txt records
9 years ago
Jason Ish
33e09a0002
rust dns: fixup for nom 3.0
9 years ago
Jason Ish
73388042b2
rust: DNS app-layer.
...
A DNS application layer in Rust. This is different than the
C based one, as it is partially stateless by not matching
up responses to replies.
9 years ago
Jason Ish
9449739dd5
rust: dns: nom DNS parsers
9 years ago