[riot-notifications] [RIOT-OS/RIOT] sys/posix: add module posix_netdb (#16853)

Hendrik van Essen notifications at github.com
Tue Sep 14 14:32:08 CEST 2021


### Contribution description

This PR adds a new posix module which provides netdb functions like `gethostbyname` or `getaddrinfo`. It does not come with its own implementation. It is a meta module collecting implementations, at the moment only form LwIP. I decided to do it this way so the code does not have to be copy&pasted over into the RIOT repository. Doing so would lead to the problem that the module would be getting out of sync with the LwIP code once its updated.
I also added the option to use posix sockets for the existing `sock_dns` module. Without using posix sockets I had extremely poor success rates for address resolution (approximately 1 out of 20).

### Testing procedure

You can test this PR e.g. in conjunction with everything else in #15969.

### Issues/PRs references

Missing posix feature, see #7801.
This PR is split out from the chunky #15969.
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/16853

-- Commit Summary --

  * pkg/lwip: make netdb accessible
  * sys/posix: add module posix_netdb
  * sys/net/application_layer/dns: add posix socket

-- File Changes --

    M pkg/lwip/Makefile.include (4)
    M pkg/lwip/include/lwipopts.h (7)
    A pkg/lwip/patches/0002-adapt-netdb-functions-for-RIOT.patch (249)
    M sys/Makefile (3)
    M sys/Makefile.dep (4)
    M sys/include/net/sock/dns.h (2)
    M sys/net/application_layer/dns/dns.c (61)
    A sys/posix/include/netdb.h (117)
    A sys/posix/netdb/Makefile (3)
    A sys/posix/netdb/netdb.c (55)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/16853.patch
https://github.com/RIOT-OS/RIOT/pull/16853.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16853
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210914/6a47099b/attachment.htm>


More information about the notifications mailing list