<h3>Contribution description</h3>
<p>This PR adds a new posix module which provides netdb functions like <code>gethostbyname</code> or <code>getaddrinfo</code>. 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.<br>
I also added the option to use posix sockets for the existing <code>sock_dns</code> module. Without using posix sockets I had extremely poor success rates for address resolution (approximately 1 out of 20).</p>
<h3>Testing procedure</h3>
<p>You can test this PR e.g. in conjunction with everything else in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="804763378" data-permission-text="Title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/15969" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/15969/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/15969">#15969</a>.</p>
<h3>Issues/PRs references</h3>
<p>Missing posix feature, see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="267969107" data-permission-text="Title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/7801" data-hovercard-type="issue" data-hovercard-url="/RIOT-OS/RIOT/issues/7801/hovercard" href="https://github.com/RIOT-OS/RIOT/issues/7801">#7801</a>.<br>
This PR is split out from the chunky <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="804763378" data-permission-text="Title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/15969" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/15969/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/15969">#15969</a>.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/16853'>https://github.com/RIOT-OS/RIOT/pull/16853</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>pkg/lwip: make netdb accessible</li>
  <li>sys/posix: add module posix_netdb</li>
  <li>sys/net/application_layer/dns: add posix socket</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16853/files#diff-49276c88d7c5caffcf1fa56ac2794cacce61e494eb3dbbeacb1c660677a61244">pkg/lwip/Makefile.include</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16853/files#diff-f42063fedadd1fd6425c8e0744bfd25a639ead95fcac9dad6a6172005b7d5685">pkg/lwip/include/lwipopts.h</a>
    (7)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16853/files#diff-5f22d54551e6f3a55c8c04e074fdcdf6ca170a544f6f022c3d927f7e351a5ff3">pkg/lwip/patches/0002-adapt-netdb-functions-for-RIOT.patch</a>
    (249)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16853/files#diff-b267080875517cc7cad981894a20c8ab2075cd8ff291c1e0d0c34f01fb65f0ec">sys/Makefile</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16853/files#diff-df69fd2c7840fcaca7dae211c7df24745d202e8482f8d5f0957cc15ef90b948f">sys/Makefile.dep</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16853/files#diff-94926bdd91f2f388b53ae5ac6d2414c952ae6b7e2b5bdbf3ab6b287bfca5e82c">sys/include/net/sock/dns.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16853/files#diff-96da84ec1654308c94ab4b627e66f10adc9ac57e43fbc2e521326df7097e0e88">sys/net/application_layer/dns/dns.c</a>
    (61)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16853/files#diff-131a2c8582a95ed60e4d78947ed5ff2123fe21ccbea91d7de694251594f78655">sys/posix/include/netdb.h</a>
    (117)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16853/files#diff-f7e39a56cb2a03a3cfd15d8dbac31bab0caf3ad286aed9f803c0216ce8c62e05">sys/posix/netdb/Makefile</a>
    (3)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16853/files#diff-3d6d4bdba4d0fa021722425e58060c3deaa6abbe2a661bd6e8bc6c5cbc8df423">sys/posix/netdb/netdb.c</a>
    (55)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/16853.patch'>https://github.com/RIOT-OS/RIOT/pull/16853.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/16853.diff'>https://github.com/RIOT-OS/RIOT/pull/16853.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/16853">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYAMM5FTSGVJYMZX4BLUB46ERANCNFSM5EABMHPA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/ABE7WYCQDGTF2ODHGH4A6MDUB46ERA5CNFSM5EABMHPKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4O25GGWQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/16853",
"url": "https://github.com/RIOT-OS/RIOT/pull/16853",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>