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

Refactoring DNS to base trait #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ryan-summers
Copy link
Member

@ryan-summers ryan-summers commented Jul 24, 2024

This PR refactors the network stack traits around DNS to change the implementation details.

The driving reason behind this is to align it more closely with std-based targets. Specifically, DNS implementation details are not exposed to the user, and if DNS services are not available, DNS resolution will Err.

This discussion came about as a result of quartiq/minimq#160, where we discussed the fact that there's two bounds required in our MQTT implementation.

I'm curious to hear feedback on this from other users of the DNS traits, CC @chrysn and @MathiasKoch

The intent here is to make DNS more of a "first class citizen" that is available for usage by all users. That way, client libraries that can take either an IP or a hostname can attempt resolution of the name and use the reuslt without requiring additional Dns trait bounds.


This is essentially solidifying some implementation details. For example, the smoltcp-nal already implements the Dns trait, but it only provides non-Err results if the user has set up the Smoltcp sockets with a DNS socket for processing. Thus, the trait bound isn't actually providing any value in protecting users from a missing DNS implementation.

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