[riot-notifications] [RIOT-OS/RIOT] sock_dns: factor out message parsing and composition (#16669)

Martine Lenders notifications at github.com
Wed Jul 21 15:01:38 CEST 2021

The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.

### 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. 
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes

### Testing procedure
`tests/gnrc_sock_dns` should still pass. If desired, I can also add extra tests for `dns_msg`.
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output

### Issues/PRs references
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * sock_dns: move module to directory named like module
  * dns: move message parsing and composition to own module

-- File Changes --

    M makefiles/pseudomodules.inc.mk (1)
    M sys/Makefile (5)
    M sys/Makefile.dep (5)
    M sys/include/net/dns.h (9)
    A sys/include/net/dns/msg.h (99)
    M sys/include/net/sock/dns.h (22)
    M sys/net/application_layer/dns/Makefile (5)
    R sys/net/application_layer/dns/msg.c (131)
    A sys/net/application_layer/sock_dns/Makefile (1)
    A sys/net/application_layer/sock_dns/dns.c (75)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210721/1107d25b/attachment.htm>

More information about the notifications mailing list