diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2019-11-11 19:20:42 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2019-11-24 19:59:35 +0100 |
commit | 951d32b817b58853cc928db19b7c544d88f29fc0 (patch) | |
tree | 3334874649e41b838ed806ca1ab4e25ee863b382 /tests | |
parent | 06356fd9c3234574bd26d2f123acd334b4275f3c (diff) |
osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n()
Follow up for patch I3cf150cc0cc06dd36039fbde091bc71b01697322
osmo_sockaddr_str_{from,to}_32n actually use host byte order. Deprecate these
and introduce a more accurately named version ending in h.
Change-Id: Ic7fc279bf3c741811cfc002538e28e8f8560e338
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sockaddr_str/sockaddr_str_test.c | 8 | ||||
-rw-r--r-- | tests/sockaddr_str/sockaddr_str_test.ok | 56 |
2 files changed, 32 insertions, 32 deletions
diff --git a/tests/sockaddr_str/sockaddr_str_test.c b/tests/sockaddr_str/sockaddr_str_test.c index 7e015ce7..64a61043 100644 --- a/tests/sockaddr_str/sockaddr_str_test.c +++ b/tests/sockaddr_str/sockaddr_str_test.c @@ -165,14 +165,14 @@ void sockaddr_str_test_conversions() { uint32_t a = 0; - rc = osmo_sockaddr_str_to_32n(x, &a); - printf(" osmo_sockaddr_str_to_32n() %s uint8_t[4]=[ %s]\n", rc_name(rc), + rc = osmo_sockaddr_str_to_32h(x, &a); + printf(" osmo_sockaddr_str_to_32h() %s uint8_t[4]=[ %s]\n", rc_name(rc), osmo_hexdump((void*)&a, sizeof(a))); if (rc == 0) { struct osmo_sockaddr_str back; - rc = osmo_sockaddr_str_from_32n(&back, a, x->port); - printf(" -> osmo_sockaddr_str_from_32n() %s ", rc_name(rc)); + rc = osmo_sockaddr_str_from_32h(&back, a, x->port); + printf(" -> osmo_sockaddr_str_from_32h() %s ", rc_name(rc)); dump_oip(&back); if (memcmp(x, &back, sizeof(back))) printf(" DIFFERS!\n"); diff --git a/tests/sockaddr_str/sockaddr_str_test.ok b/tests/sockaddr_str/sockaddr_str_test.ok index 33d9d7eb..910e9195 100644 --- a/tests/sockaddr_str/sockaddr_str_test.ok +++ b/tests/sockaddr_str/sockaddr_str_test.ok @@ -9,8 +9,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 01 02 03 04 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 04 03 02 01 ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 04 03 02 01 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000005010203040000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -28,8 +28,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 00 00 00 00 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 00 00 00 00 ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 00 00 00 00 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -47,8 +47,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ ff ff ff ff ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ ff ff ff ff ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ ff ff ff ff ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=0200ffffffffffff0000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -64,7 +64,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000001000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -78,7 +78,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000001000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -93,7 +93,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00010002000300000000000000000004 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000001000200030000000000000000000400000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } @@ -110,7 +110,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 0 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000000000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 0 } @@ -127,7 +127,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000001 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::1", .port = 0 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000000000000000000000000000000000000000000000100000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::1", .port = 0 } @@ -144,7 +144,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=ffffffffffffffffffffffffffffffff -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a00ffff00000000ffffffffffffffffffffffffffffffff00000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } @@ -162,7 +162,7 @@ -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } DIFFERS! osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a00ffff00000000ffffffffffffffffffffffffffffffff00000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } @@ -180,7 +180,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000001000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -194,7 +194,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000001000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -208,7 +208,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -223,7 +223,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000005000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -238,7 +238,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -253,7 +253,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000005000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -267,7 +267,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -283,8 +283,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 01 02 03 04 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 04 03 02 01 ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 04 03 02 01 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000000010203040000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -300,7 +300,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -317,7 +317,7 @@ -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::1:a09:807", .port = 1 } DIFFERS! osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000001000000000000000000000000000000010a09080700000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::1:a09:807", .port = 1 } @@ -337,8 +337,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 00 00 00 00 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 00 00 00 00 ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 00 00 00 00 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000005000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -355,7 +355,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } @@ -373,7 +373,7 @@ -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } DIFFERS! osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } |