Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/net/routing/rtsock_common.h
Show First 20 Lines • Show All 448 Lines • ▼ Show 20 Lines | if ((*a32 != *b32) || (*(a32 + 1) != *(b32 + 1))) { | ||||
return 0; | return 0; | ||||
} | } | ||||
return 1; | return 1; | ||||
case AF_INET6: | case AF_INET6: | ||||
a6 = (const struct sockaddr_in6 *)a; | a6 = (const struct sockaddr_in6 *)a; | ||||
b6 = (const struct sockaddr_in6 *)b; | b6 = (const struct sockaddr_in6 *)b; | ||||
if (!IN6_ARE_ADDR_EQUAL(&a6->sin6_addr, &b6->sin6_addr)) { | if (!IN6_ARE_ADDR_EQUAL(&a6->sin6_addr, &b6->sin6_addr)) { | ||||
inet_ntop(AF_INET6, &a6->sin6_addr, a_s, sizeof(a_s)); | inet_ntop(AF_INET6, &a6->sin6_addr, a_s, sizeof(a_s)); | ||||
inet_ntop(AF_INET6, &b6->sin6_addr, a_s, sizeof(a_s)); | inet_ntop(AF_INET6, &b6->sin6_addr, b_s, sizeof(b_s)); | ||||
snprintf(msg, sz, "addr diff: %s vs %s", a_s, b_s); | snprintf(msg, sz, "addr diff: %s vs %s", a_s, b_s); | ||||
return 0; | return 0; | ||||
} | } | ||||
if (a6->sin6_scope_id != b6->sin6_scope_id) { | if (a6->sin6_scope_id != b6->sin6_scope_id) { | ||||
snprintf(msg, sz, "scope diff: %u vs %u", a6->sin6_scope_id, b6->sin6_scope_id); | snprintf(msg, sz, "scope diff: %u vs %u", a6->sin6_scope_id, b6->sin6_scope_id); | ||||
return 0; | return 0; | ||||
} | } | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 419 Lines • Show Last 20 Lines |