Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a new base module #469

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

Introduce a new base module #469

wants to merge 17 commits into from

Conversation

bal-e
Copy link
Contributor

@bal-e bal-e commented Dec 12, 2024

This introduces a new_base module as a potential candidate for replacing base. While it has a similar structure (although much is left to be filled out), it has three distinguishing features:

  1. It builds the foundation for a derive-based interface for easily and efficiently parsing (and possibly building) DNS messages.

  2. It introduces RevName, a more efficient type for domain names (where labels are stored in reverse order).

  3. It relies on the zerocopy crate to offload basic byte parsing, and to represent big-endian integers where necessary. This saves a fair amount of parsing code.

There's a lot more work to be done. Procedural macros for deriving the various parsing traits need to be implemented. Basic record types (e.g. A) need to be defined. The OPT record is a special case that requires more attention. Common parsing targets (e.g. a standard IN-class query, and a fallback deconstructed message type) need to be defined. Parts of the existing codebase need to be adjusted to use new_base, to demonstrate its usefulness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant