*
* @see thread_external_route_foreach_cb()
*/
-int thread_br_get_ipv6_prefix(thread_route_info_h route,
+int thread_route_get_ipv6_prefix(thread_route_info_h route,
uint8_t *ipv6_prefix, uint8_t *ipv6_prefix_len);
/**
*
* @see thread_external_route_foreach_cb()
*/
-int thread_br_get_rloc16(thread_route_info_h route,
+int thread_route_get_rloc16(thread_route_info_h route,
uint16_t *rloc16);
/**
*
* @see thread_external_route_foreach_cb()
*/
-int thread_br_get_preference(thread_route_info_h route,
+int thread_route_get_preference(thread_route_info_h route,
int8_t *preference);
/**
*
* @see thread_external_route_foreach_cb()
*/
-int thread_br_check_stable(thread_route_info_h route,
+int thread_route_get_stable(thread_route_info_h route,
bool *is_stable);
/**
*
* @see thread_external_route_foreach_cb()
*/
-int thread_br_check_device_nexthop(thread_route_info_h route,
+int thread_route_get_device_nexthop(thread_route_info_h route,
bool *is_device_nexthop);
/**
return THREAD_ERROR_NONE;
}
-int thread_br_get_ipv6_prefix(thread_route_info_h route,
+int thread_route_get_ipv6_prefix(thread_route_info_h route,
uint8_t *ipv6_prefix, uint8_t *ipv6_prefix_len)
{
FUNC_ENTRY;
return THREAD_ERROR_NONE;
}
-int thread_br_get_rloc16(thread_route_info_h route,
+int thread_route_get_rloc16(thread_route_info_h route,
uint16_t *rloc16)
{
FUNC_ENTRY;
return THREAD_ERROR_NONE;
}
-int thread_br_get_preference(thread_route_info_h route,
+int thread_route_get_preference(thread_route_info_h route,
int8_t *preference)
{
FUNC_ENTRY;
return THREAD_ERROR_NONE;
}
-int thread_br_check_stable(thread_route_info_h route,
+int thread_route_get_stable(thread_route_info_h route,
bool *is_stable)
{
FUNC_ENTRY;
return THREAD_ERROR_NONE;
}
-int thread_br_check_device_nexthop(thread_route_info_h route,
+int thread_route_get_device_nexthop(thread_route_info_h route,
bool *is_device_nexthop)
{
FUNC_ENTRY;
msg("Found the external route...");
uint8_t *prefix_address = NULL;
- int ret = thread_br_get_ipv6_prefix(route_info, g_ext_ipv6_prefix, &g_ext_ipv6_prefix_len);
+ int ret = thread_route_get_ipv6_prefix(route_info, g_ext_ipv6_prefix, &g_ext_ipv6_prefix_len);
if (ret == THREAD_ERROR_NONE) {
prefix_address = g_ext_ipv6_prefix;
msg("prefix_address: %02x%02x:%02x%02x:%02x%02x:%02x%02x",
msg("prefix_len: %u", g_ext_ipv6_prefix_len);
}
- ret = thread_br_get_rloc16(route_info, &g_ext_rloc16);
+ ret = thread_route_get_rloc16(route_info, &g_ext_rloc16);
if (ret == THREAD_ERROR_NONE) {
msg("rloc16: %u", g_ext_rloc16);
}
- ret = thread_br_get_preference(route_info, &g_ext_preference);
+ ret = thread_route_get_preference(route_info, &g_ext_preference);
if (ret == THREAD_ERROR_NONE) {
msg("preference: %u", g_ext_preference);
}
- ret = thread_br_check_stable(route_info, &g_ext_is_stable);
+ ret = thread_route_get_stable(route_info, &g_ext_is_stable);
if (ret == THREAD_ERROR_NONE) {
msg("stable: %s", g_ext_is_stable ? "TRUE" : "FALSE");
}
- ret = thread_br_check_device_nexthop(route_info, &g_ext_is_device_next_hop);
+ ret = thread_route_get_device_nexthop(route_info, &g_ext_is_device_next_hop);
if (ret == THREAD_ERROR_NONE) {
msg("next_hop_is_self: %s", g_ext_is_device_next_hop ?
"TRUE" : "FALSE");
{
uint8_t ipv6Prefix[THREAD_IPV6_ADDRESS_SIZE];
uint8_t ipv6PrefixLen;
- EXPECT_EQ(THREAD_ERROR_NONE, thread_br_get_ipv6_prefix(route_info, ipv6Prefix, &ipv6PrefixLen));
+ EXPECT_EQ(THREAD_ERROR_NONE, thread_route_get_ipv6_prefix(route_info, ipv6Prefix, &ipv6PrefixLen));
}
break;
case RouteInfo::kRloc16:
{
uint16_t rloc16;
- EXPECT_EQ(THREAD_ERROR_NONE, thread_br_get_rloc16(route_info, &rloc16));
+ EXPECT_EQ(THREAD_ERROR_NONE, thread_route_get_rloc16(route_info, &rloc16));
}
break;
case RouteInfo::kPreference:
{
int8_t preference;
- EXPECT_EQ(THREAD_ERROR_NONE, thread_br_get_preference(route_info, &preference));
+ EXPECT_EQ(THREAD_ERROR_NONE, thread_route_get_preference(route_info, &preference));
}
break;
case RouteInfo::kStable:
{
bool isStable;
- EXPECT_EQ(THREAD_ERROR_NONE, thread_br_check_stable(route_info, &isStable));
+ EXPECT_EQ(THREAD_ERROR_NONE, thread_route_get_stable(route_info, &isStable));
}
break;
case RouteInfo::kDeviceNexthop:
{
bool isDeviceNexthop;
- EXPECT_EQ(THREAD_ERROR_NONE, thread_br_check_device_nexthop(route_info, &isDeviceNexthop));
+ EXPECT_EQ(THREAD_ERROR_NONE, thread_route_get_device_nexthop(route_info, &isDeviceNexthop));
}
break;
default:
thread_br_get_external_routes(instance, GetExternalRoutesCallback, nullptr));
}
-TEST_F(ThreadBRTest, BRGetIpv6PrefixErrorNone)
+TEST_F(ThreadBRTest, BRGetRouteIpv6PrefixErrorNone)
{
EXPECT_EQ(THREAD_ERROR_NONE, thread_enable(&instance));
EXPECT_EQ(THREAD_ERROR_NONE, thread_br_enable(instance));
GUINT_TO_POINTER(static_cast<guint>(RouteInfo::kIpv6Prefix))));
}
-TEST_F(ThreadBRTest, BRGetRloc16ErrorNone)
+TEST_F(ThreadBRTest, BRGetRouteRloc16ErrorNone)
{
EXPECT_EQ(THREAD_ERROR_NONE, thread_enable(&instance));
EXPECT_EQ(THREAD_ERROR_NONE, thread_br_enable(instance));
GUINT_TO_POINTER(static_cast<guint>(RouteInfo::kRloc16))));
}
-TEST_F(ThreadBRTest, BRGetPreferenceErrorNone)
+TEST_F(ThreadBRTest, BRGetRoutePreferenceErrorNone)
{
EXPECT_EQ(THREAD_ERROR_NONE, thread_enable(&instance));
EXPECT_EQ(THREAD_ERROR_NONE, thread_br_enable(instance));
GUINT_TO_POINTER(static_cast<guint>(RouteInfo::kPreference))));
}
-TEST_F(ThreadBRTest, BRCheckStableErrorNone)
+TEST_F(ThreadBRTest, BRGetRouteStableErrorNone)
{
EXPECT_EQ(THREAD_ERROR_NONE, thread_enable(&instance));
EXPECT_EQ(THREAD_ERROR_NONE, thread_br_enable(instance));
GUINT_TO_POINTER(static_cast<guint>(RouteInfo::kStable))));
}
-TEST_F(ThreadBRTest, BRCheckDeviceNexthopErrorNone)
+TEST_F(ThreadBRTest, BRGetRouteDeviceNexthopErrorNone)
{
EXPECT_EQ(THREAD_ERROR_NONE, thread_enable(&instance));
EXPECT_EQ(THREAD_ERROR_NONE, thread_br_enable(instance));