sock_dns: factor out message parsing and composition#16669
Merged
miri64 merged 3 commits intoRIOT-OS:masterfrom Aug 11, 2021
Merged
sock_dns: factor out message parsing and composition#16669miri64 merged 3 commits intoRIOT-OS:masterfrom
miri64 merged 3 commits intoRIOT-OS:masterfrom
Conversation
05d3836 to
4ac0c72
Compare
miri64
commented
Jul 21, 2021
| @@ -7,31 +7,24 @@ | |||
| */ | |||
Member
Author
There was a problem hiding this comment.
Just to avoid confusion in the review: I did not rename the file and then moved the sock_dns parts to sys/net/application_layer/dns/dns.c, rather I renamed sys/net/application_layer/dns/dns.c to sys/net/application_layer/sock_dns/dns.c and then moved the message composition and parsing parts from sys/net/application_layer/sock_dns/dns.c to this sys/net/application_layer/dns/msg.c. However, since that was the majority of sys/net/application_layer/sock_dns/dns.c's content, Git interpreted it as a rename.
4ac0c72 to
eea2b4a
Compare
4 tasks
benpicco
reviewed
Aug 6, 2021
f58ab2e to
7920ab2
Compare
Member
Author
|
Squashed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
This moves the composition and parsing of a DNS message to its own module. The idea is that they can be reused for other DNS transports such as DoH. Of course complexity and thus code size increases which is why I like to discuss this. The other route could be to integrate other transports such as DoH into
sock_dnsmonolithicly.Testing procedure
tests/gnrc_sock_dnsshould still pass. If desired, I can also add extra tests fordns_msg.Issues/PRs references
None.