This PR renames all types and functions that refer to domain name from using
the term “dname” to just “name.” For instance, Dname becomes Name, ToDname
becomes ToName, and ToDname::to_dname becomes ToName::to_name.
This annoyingly wide-reaching change is motivated by a clash with the DNAME
record type that would always be confusing. So we rather do it now.
This is a really breaking change. Apologies.
This PR adds zonefile/parsed.rs, zonetree/ and related examples/, which
together enable, and show a library user how, to go from a zone file in
presentation format to an in-memory tree of zones which can be queried to
provide an answer, or walked (iterated over).
The tree also supports versioned write operations and a trait based zone
implementation allowing for the in-memory tree for a zone to instead be some
other (a)synchornous backing store (as demonstrated by the mysql-zone.rs
example).
The zonetree module is feature-gated behind the unstable-zonetree feature.
This PR adds an unstable net::server module that enables the creation of UDP
and TCP DNS servers using base transport server, middleware and service building blocks.
This PR changes the types for the IANA registered values into structs
wrapping underlying integer types and provides the values as constants. This
mostly just changes the spelling of those values. However, it also required
some re-wiring of the type generation macros for record data and opt data
since the type names and value names differ now.
This is a breaking change.
This PR changes the ToDname and ToRelativeDname traits to have a pair of
methods for each conversion that either return a result or just a success
value depending on whether the octets builder used for the name can fail.
This should allow removing quite a few unwraps when e.g. Vec<u8> or Bytes
are used.
This is a breaking change.
This PR switches the validate::RrsigExt trait to accept anything that is
AsRef<Record<..>> instead of insisting on an actual Record so it can be
used with various smart pointers. It also adds an impl of AsRef<Self> to
Record to make this work.
This is a breaking change.
This PR looks at all the error types and splits them into meaningful error
information, which will be available as enum variants, and internals, which
will be hidden away behind opaque structs. For the former case, we will
still use enums directly rather than have error kind enums. These will not
be non-exhaustive since they should really cover all possible cases and
exhaustive matching should work.
This is a breaking change.
This PR fixes TXT record data serialization for human-readable formats. TXT
record data is now serialized as a sequence of character strings. It also
deserializes from such a sequence. If supported by the format, it
alternatively deserializes from a string that is broken up into 255 octet
chunks if necessary.
It uses a newly added helper type base::charstr::DeserializeCharStrSeed that
deserializes character strings by appending them to an octets builder. Since
this may be useful for other cases, it has been made public.
This is a breaking change.
This PR redesigns the conversion of CharStr from and to text formats.
It distinguishes between three text formats: quoted and unquoted
representation format (i.e., what’s used in zonefiles) and a serialization
format which is an unquoted format with only backslash and non-printable
octets escaped. The latter will be used in serialization but also by default
for Display. This makes it reversible with the FromStr implementation but
avoids escaping white space. Methods for explicitly displaying in quoted and
unquoted representation format are provided.
Serialization works mostly as before but uses the serialization format
rather than the unquoted representation format in human-readable formats. It
still uses the raw octets in binary formats.
The PR adds proper documentation for all of it to the type.
This PR changes the rdata::Txt type to reject empty record data as invalid.
RFC 1035 states that the TXT-DATA is “One or more <character-string>s”. This
means that there will have to be at least the length octet of the first
character string.
The PR also adjusts the TxtBuilder to never return a empty data. Since this
requires being able to return an error in TxtBuilder:.finish, this is a
breaking change. While at it, the PR also adds more control over the created
character strings by making close_char_str public and adding a new
append_char_str method.
The PR also improves the documentation for the TXT record data types.
This PR adds implementation for OctetsFrom and Debug to AllOptData. As a
consequence, this also adds these to some of the option data types and
changes Debug for some of them to be available for all octets sequences.
This PR fixes the Display implementation for the Txt record data type. It
now prints each character string separately and quoted. It uses the new
CharStr::display_quoted method that prints the content of a character string
quoted and with only necessary characters escaped.
* Remove interop and ci-test features and set interop tests to ignore.
* Fix feature selection.
* Clippy-suggested improvements.
* Do things for --all-targets in CI.
This PR adds experimental support for client transport of DNS messages.
It also adds a new concept of unstable features which gate code that can introduce breaking changes also in non-breaking releases.
This PR fixes the Display implementation of Chain<_,_> so it considers all
possible combinations of empty, non-empty, and root names. It now behaves
similarly to the Display implementation of Dname in that it only adds a final
dot to an absolute name if it is the root label only. Similarly to Dname, it
also adds Chain::fmt_with_dot which returns a temporary type that formats
absolute names with a final dot.
---------
Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>
This PR changes the signature of FoundSrvs::merge to use a non-mut other
and also changes the documentation to state the method doesn’t change
other which it didn’t do.
This PR moves the flatten_into method present on various types that either
are or contain domain names into a FlattenInto trait. It also removes the
method from all types that aren’t or don’t contain domain names and only had
it to be able to make the big record data type enums.
This PR fixes scanning (i.e., reading from presentation format) of domain
names that are just the root label. It also fixes how they are displayed:
previously they were empty, now they are displayed as a dot. It also adds a
new method Dname::fmt_with_dot that returns a placeholder type that displays
the name with a dot at the end.
This impl supports users of `domain` that may use `Dname` as keys in
standard library collections, who may want to query those collections
with non-owned `Dname`.
Include a doc comment testing that a collection of `Dname<Vec<u8>>` can
be queried with a `Dname<[u8]>`.