-
Notifications
You must be signed in to change notification settings - Fork 2.1k
sock_dns: factor out message parsing and composition #16669
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
sock_dns: factor out message parsing and composition #16669
Conversation
05d3836
to
4ac0c72
Compare
@@ -7,31 +7,24 @@ | |||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please squash!
f58ab2e
to
7920ab2
Compare
Squashed |
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_dns
monolithicly.Testing procedure
tests/gnrc_sock_dns
should still pass. If desired, I can also add extra tests fordns_msg
.Issues/PRs references
None.