posix: net_help: move inet_pton/inet_ntop completely to POSIX#3612
posix: net_help: move inet_pton/inet_ntop completely to POSIX#3612cgundogan merged 1 commit intoRIOT-OS:masterfrom
Conversation
bba4f50 to
8debc09
Compare
|
nice one, :) |
There was a problem hiding this comment.
how about adding a test for conversion with the inet_[pton|ntop](), like:
static void test_inet_pton_ntop__success(void)
{
ipv4_addr_t result;
size_t res_str_len = 11;
char res_str[res_str_len];
TEST_ASSERT_NOT_NULL(inet_pton(AF_INET, "0.1.12.123", &result));
TEST_ASSERT_NOT_NULL(inet_ntop(AF_INET, &result, res_str, res_str_len));
}It would provide certainty that the wrappers work as intended (which is the case) and extend the coverage of these unittests for future CI tests in case the code changes.
There was a problem hiding this comment.
I would rather add those to their own test suite, because while they are calling those functions in reality they have nothing to do with them.
There was a problem hiding this comment.
ok, an own testsuite sounds reasonable
8debc09 to
a74c65b
Compare
|
Rebased to current master. |
d8a0d6f to
290419b
Compare
|
Rebased to current master and dependencies and added #3660 as dependency. |
68f433f to
8bf8e44
Compare
8bf8e44 to
0440d3c
Compare
|
Rebased to current master and dependencies |
0440d3c to
2770293
Compare
|
Rebased to current master and dependencies |
2770293 to
8a5500e
Compare
|
Squashed and rebased to current master (no more waiting for other PRs) |
There was a problem hiding this comment.
This code does not compile. socklen_t is undefined here.
|
tested with the |
|
travis seems to be complaining |
|
Coap seems to be broken (not through this PR though as far as I can see). I get other errors in master. |
|
(the errors in this PR are unrelated to this PR, but are just different, since the headers are moved around here). |
|
On master I get: |
|
It seems to be only an issue with clang (which I used since I wasn't getting anything from gcc's cryptic error messages) |
|
Seems like the functions travis is complaining about are included in glibc and newlib, and thus what GCC is trying to say is, that these are redefinitons (avr and msp430 boards are blacklisted anyway for libcoap, so I'll just remove them for now). |
280f228 to
fabdf35
Compare
|
See #3864. Based this PR on that PR. |
fabdf35 to
08a3f0b
Compare
|
Rebased and squashed |
|
Travis is happy. Does your ACK uphold @cgundogan? |
|
yes 👍 |
posix: net_help: move inet_pton/inet_ntop completely to POSIX
As promised to @OlegHahm in #3607: Moves
inet_.to.completely to the posix headers. It uses theng_ipv[46]_addr_(to|from)_str()functions and wraps them.Depends on
#3608(merged),#3611(merged) and#3660(merged).Depends on
#3864(merged) for external bug fixes.