return RET_SUCCESS;
}
+static int run_thread_get_global_ipaddr(MManager *mm, struct menu_data *menu)
+{
+ FUNC_ENTRY;
+ thread_instance_h g_instance = mm->t_instance;
+ const char *ipaddr;
+ if (g_instance == NULL)
+ goto OUT;
+
+ int ret = thread_get_global_ipaddr(g_instance, &ipaddr);
+ if (ret == THREAD_ERROR_NONE) {
+ msg("thread_get_ipaddr_global success");
+ msg("ipaddr: %s", ipaddr);
+ } else {
+ msg("thread_get_ipaddr_global failed");
+ }
+OUT:
+ FUNC_EXIT;
+ return RET_SUCCESS;
+}
+
static struct menu_data menu_thread_network_set_active_dataset_tlvs[] = {
{ "1", "Tlvs_buffer len", NULL, NULL, g_str_buf_length},
{ "2", "Tlvs_buffer", NULL, NULL, g_str_tlvs_buffer},
menu_thread_add_ipaddr, NULL, NULL},
{ "9", "thread_remove_ipaddr",
menu_thread_remove_ipaddr, NULL, NULL},
+ { "10", "thread_get_global_ipaddr",
+ NULL, run_thread_get_global_ipaddr, NULL},
{ NULL, NULL, },
};