From: saerome kim Date: Tue, 22 Aug 2017 09:42:45 +0000 (+0900) Subject: Add internal APIs for mesh path X-Git-Tag: submit/tizen/20170828.225740~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b2ab49cde9ae20ce7019ae44f422c949cd24ef6;p=platform%2Fcore%2Fapi%2Fwifi-mesh.git Add internal APIs for mesh path Change-Id: I9f08d9bc78c35d979a37f614aca9e0cae5034671 Signed-off-by: saerome kim --- diff --git a/include/wifi-mesh-internal.h b/include/wifi-mesh-internal.h index 9b6facc..3d966da 100644 --- a/include/wifi-mesh-internal.h +++ b/include/wifi-mesh-internal.h @@ -2035,6 +2035,311 @@ typedef void (*mesh_found_mpath_cb)(wifi_mesh_mpath_info_h path, void* user_data int wifi_mesh_get_mpath_info(wifi_mesh_h handle, mesh_found_mpath_cb cb, void *user_data); /** + * @brief Get a destination address. + * @details The first column represents the MAC address of destination node that can be + * 1 or more than 1 hop away in the network. + * + * @since_tizen 4.0 + * + * @param[in] station The Wi-Fi mesh station handle + * @param[in] dest_addr Destination MAC address + * + * + * @return 0 on success, otherwise a negative error value. + * @retval #WIFI_MESH_ERROR_NONE Successful + * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see wifi_mesh_get_mpath_info() + * @see mesh_found_mpath_cb() + * @see wifi_mesh_get_mpath_next_hop() + * @see wifi_mesh_get_mpath_iface() + * @see wifi_mesh_get_mpath_sn() + * @see wifi_mesh_get_mpath_metric() + * @see wifi_mesh_get_mpath_qlen() + * @see wifi_mesh_get_mpath_exptime() + * @see wifi_mesh_get_mpath_disc_timeout() + * @see wifi_mesh_get_mpath_disc_retries() + * @see wifi_mesh_get_mpath_flags() + * + */ +int wifi_mesh_get_mpath_dest_addr(wifi_mesh_mpath_info_h mpath, gchar* dest_addr); + +/** + * @brief Get a next hop address. + * @details Second column indicates the MAC address of next hop for the destination + * node/address. The first and second columns can be same if destination node is just one + * hop away or it is peer/neighbor node. + * + * @since_tizen 4.0 + * + * @param[in] station The Wi-Fi mesh station handle + * @param[in] next_hop Destination MAC address + * + * + * @return 0 on success, otherwise a negative error value. + * @retval #WIFI_MESH_ERROR_NONE Successful + * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see wifi_mesh_get_mpath_info() + * @see mesh_found_mpath_cb() + * @see wifi_mesh_get_mpath_dest_addr() + * @see wifi_mesh_get_mpath_iface() + * @see wifi_mesh_get_mpath_sn() + * @see wifi_mesh_get_mpath_metric() + * @see wifi_mesh_get_mpath_qlen() + * @see wifi_mesh_get_mpath_exptime() + * @see wifi_mesh_get_mpath_disc_timeout() + * @see wifi_mesh_get_mpath_disc_retries() + * @see wifi_mesh_get_mpath_flags() + * + */ +int wifi_mesh_get_mpath_next_hop(wifi_mesh_mpath_info_h mpath, gchar* next_hop); + +/** + * @brief Get a control interface. + * @details The third column tells about the interface who contains this information or + * where packet is forwarded. + * + * @since_tizen 4.0 + * + * @param[in] station The Wi-Fi mesh station handle + * @param[in] iface Network interface name + * + * + * @return 0 on success, otherwise a negative error value. + * @retval #WIFI_MESH_ERROR_NONE Successful + * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see wifi_mesh_get_mpath_info() + * @see mesh_found_mpath_cb() + * @see wifi_mesh_get_mpath_dest_addr() + * @see wifi_mesh_get_mpath_next_hop() + * @see wifi_mesh_get_mpath_sn() + * @see wifi_mesh_get_mpath_metric() + * @see wifi_mesh_get_mpath_qlen() + * @see wifi_mesh_get_mpath_exptime() + * @see wifi_mesh_get_mpath_disc_timeout() + * @see wifi_mesh_get_mpath_disc_retries() + * @see wifi_mesh_get_mpath_flags() + * + */ +int wifi_mesh_get_mpath_iface(wifi_mesh_mpath_info_h mpath, gchar* iface); + +/** + * @brief Get a serial number of the current control packet. + * @details The fourth column is about the PREQ sequence number. It is used to detect and + * break the loop while path is being investigated. + * + * @since_tizen 4.0 + * + * @param[in] station The Wi-Fi mesh station handle + * @param[in] sn Sequence number + * + * + * @return 0 on success, otherwise a negative error value. + * @retval #WIFI_MESH_ERROR_NONE Successful + * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see wifi_mesh_get_mpath_info() + * @see mesh_found_mpath_cb() + * @see wifi_mesh_get_mpath_dest_addr() + * @see wifi_mesh_get_mpath_next_hop() + * @see wifi_mesh_get_mpath_iface() + * @see wifi_mesh_get_mpath_metric() + * @see wifi_mesh_get_mpath_qlen() + * @see wifi_mesh_get_mpath_exptime() + * @see wifi_mesh_get_mpath_disc_timeout() + * @see wifi_mesh_get_mpath_disc_retries() + * @see wifi_mesh_get_mpath_flags() + * + */ +int wifi_mesh_get_mpath_sn(wifi_mesh_mpath_info_h mpath, guint* sn); + +/** + * @brief Get a metric number. + * @details The fifth column contains value for ALM and telling how the path healthy is. + * This information depends on the number of hops from asked interface to destination + * interface/address. Therefore each value is different from other destination. + * + * @since_tizen 4.0 + * + * @param[in] station The Wi-Fi mesh station handle + * @param[in] metric Metric + * + * + * @return 0 on success, otherwise a negative error value. + * @retval #WIFI_MESH_ERROR_NONE Successful + * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter + * + * @see wifi_mesh_get_mpath_info() + * @see mesh_found_mpath_cb() + * @see wifi_mesh_get_mpath_dest_addr() + * @see wifi_mesh_get_mpath_next_hop() + * @see wifi_mesh_get_mpath_iface() + * @see wifi_mesh_get_mpath_sn() + * @see wifi_mesh_get_mpath_qlen() + * @see wifi_mesh_get_mpath_exptime() + * @see wifi_mesh_get_mpath_disc_timeout() + * @see wifi_mesh_get_mpath_disc_retries() + * @see wifi_mesh_get_mpath_flags() + * + */ +int wifi_mesh_get_mpath_metric(wifi_mesh_mpath_info_h mpath, guint* metric); + +/** + * @brief Get a queue length in the Wi-Fi driver. + * @details This column gives MAC layer queue status at path discovery time. + * + * @since_tizen 4.0 + * + * @param[in] station The Wi-Fi mesh station handle + * @param[in] qlen Queue length + * + * + * @return 0 on success, otherwise a negative error value. + * @retval #WIFI_MESH_ERROR_NONE Successful + * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter + * + * + * @see wifi_mesh_get_mpath_info() + * @see mesh_found_mpath_cb() + * @see wifi_mesh_get_mpath_dest_addr() + * @see wifi_mesh_get_mpath_next_hop() + * @see wifi_mesh_get_mpath_iface() + * @see wifi_mesh_get_mpath_sn() + * @see wifi_mesh_get_mpath_metric() + * @see wifi_mesh_get_mpath_exptime() + * @see wifi_mesh_get_mpath_disc_timeout() + * @see wifi_mesh_get_mpath_disc_retries() + * @see wifi_mesh_get_mpath_flags() + */ +int wifi_mesh_get_mpath_qlen(wifi_mesh_mpath_info_h mpath, guint* qlen); + +/** + * @brief Get a time of next destination available. + * @details The eighth column holds path expiry duration in (TUs) for the given interface + * to destination interface. + * + * @since_tizen 4.0 + * + * @param[in] station The Wi-Fi mesh station handle + * @param[in] exptime Expiration time + * + * + * @return 0 on success, otherwise a negative error value. + * @retval #WIFI_MESH_ERROR_NONE Successful + * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter + * + * + * @see wifi_mesh_get_mpath_info() + * @see mesh_found_mpath_cb() + * @see wifi_mesh_get_mpath_dest_addr() + * @see wifi_mesh_get_mpath_next_hop() + * @see wifi_mesh_get_mpath_iface() + * @see wifi_mesh_get_mpath_sn() + * @see wifi_mesh_get_mpath_metric() + * @see wifi_mesh_get_mpath_qlen() + * @see wifi_mesh_get_mpath_disc_timeout() + * @see wifi_mesh_get_mpath_disc_retries() + * @see wifi_mesh_get_mpath_flags() + */ +int wifi_mesh_get_mpath_exptime(wifi_mesh_mpath_info_h mpath, guint* exptime); + +/** + * @brief Get a time of discovery timeout. + * @details This field tells about the buffered broadcast/multicast data on mesh STA. + * During the mesh DTIM period, the mesh STA transmits broadcast traffic for its neighbors. + * The mesh STA with power saving capability must switch from doze to awaken state for + * every DTIM of their peer mesh STAs. + * + * @since_tizen 4.0 + * + * @param[in] station The Wi-Fi mesh station handle + * @param[in] discovery_timeout Discovery timeout value + * + * + * @return 0 on success, otherwise a negative error value. + * @retval #WIFI_MESH_ERROR_NONE Successful + * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter + * + * + * @see wifi_mesh_get_mpath_info() + * @see mesh_found_mpath_cb() + * @see wifi_mesh_get_mpath_dest_addr() + * @see wifi_mesh_get_mpath_next_hop() + * @see wifi_mesh_get_mpath_iface() + * @see wifi_mesh_get_mpath_sn() + * @see wifi_mesh_get_mpath_metric() + * @see wifi_mesh_get_mpath_qlen() + * @see wifi_mesh_get_mpath_exptime() + * @see wifi_mesh_get_mpath_disc_retries() + * @see wifi_mesh_get_mpath_flags() + */ +int wifi_mesh_get_mpath_disc_timeout(wifi_mesh_mpath_info_h mpath, + guint* discovery_timeout); + +/** + * @brief Get a number of discovery re-trial. + * @details The column number tenth shows that how many retries have occurred while path + * from source interface to destination address was being discovered. + * + * @since_tizen 4.0 + * + * @param[in] station The Wi-Fi mesh station handle + * @param[in] discovery_retries Discovery retial number + * + * + * @return 0 on success, otherwise a negative error value. + * @retval #WIFI_MESH_ERROR_NONE Successful + * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter + * + * + * @see wifi_mesh_get_mpath_info() + * @see mesh_found_mpath_cb() + * @see wifi_mesh_get_mpath_dest_addr() + * @see wifi_mesh_get_mpath_next_hop() + * @see wifi_mesh_get_mpath_iface() + * @see wifi_mesh_get_mpath_sn() + * @see wifi_mesh_get_mpath_metric() + * @see wifi_mesh_get_mpath_qlen() + * @see wifi_mesh_get_mpath_exptime() + * @see wifi_mesh_get_mpath_disc_timeout() + * @see wifi_mesh_get_mpath_flags() + */ +int wifi_mesh_get_mpath_disc_retries(wifi_mesh_mpath_info_h mpath, + guchar* discovery_retries); + +/** + * @brief Get flags + * @details The last column contains bit masking type values for different stat flags for + * paths. + * + * @since_tizen 4.0 + * + * @param[in] station The Wi-Fi mesh station handle + * @param[in] flags Different status flags + * + * + * @return 0 on success, otherwise a negative error value. + * @retval #WIFI_MESH_ERROR_NONE Successful + * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter + * + * + * @see wifi_mesh_get_mpath_info() + * @see mesh_found_mpath_cb() + * @see wifi_mesh_get_mpath_dest_addr() + * @see wifi_mesh_get_mpath_next_hop() + * @see wifi_mesh_get_mpath_iface() + * @see wifi_mesh_get_mpath_sn() + * @see wifi_mesh_get_mpath_metric() + * @see wifi_mesh_get_mpath_qlen() + * @see wifi_mesh_get_mpath_exptime() + * @see wifi_mesh_get_mpath_disc_timeout() + * @see wifi_mesh_get_mpath_disc_retries() + */ +int wifi_mesh_get_mpath_flags(wifi_mesh_mpath_info_h mpath, guchar* flags); + +/** * @brief Sets network device interface name. * @details This function provides the ability to manually select interfaces for advanced users. * diff --git a/src/wifi-mesh-internal.c b/src/wifi-mesh-internal.c index 8a2db1d..75d4e5e 100644 --- a/src/wifi-mesh-internal.c +++ b/src/wifi-mesh-internal.c @@ -23,7 +23,8 @@ * Wi-Fi Mesh network CAPI */ -EXPORT_API int wifi_mesh_network_get_data_rate(wifi_mesh_network_h network, int *data_rate) +EXPORT_API int wifi_mesh_network_get_data_rate(wifi_mesh_network_h network, + int *data_rate) { struct mesh_network_s *net = (struct mesh_network_s *)network; @@ -41,7 +42,8 @@ EXPORT_API int wifi_mesh_network_get_data_rate(wifi_mesh_network_h network, int return WIFI_MESH_ERROR_NONE; } -EXPORT_API int wifi_mesh_network_set_data_rate(wifi_mesh_network_h network, int data_rate) +EXPORT_API int wifi_mesh_network_set_data_rate(wifi_mesh_network_h network, + int data_rate) { struct mesh_network_s *net = (struct mesh_network_s *)network; @@ -75,7 +77,8 @@ EXPORT_API int wifi_mesh_cancel_scan(wifi_mesh_h handle) return rv; } -EXPORT_API int wifi_mesh_set_gate(wifi_mesh_h handle, int gate_announce, int hwmp_root_mode, bool stp) +EXPORT_API int wifi_mesh_set_gate(wifi_mesh_h handle, int gate_announce, + int hwmp_root_mode, bool stp) { int rv = 0; int _stp = stp ? 1 : 0; @@ -107,7 +110,8 @@ EXPORT_API int wifi_mesh_unset_gate(wifi_mesh_h handle) return rv; } -EXPORT_API int wifi_mesh_get_stations_info(wifi_mesh_h handle, wifi_mesh_found_station_cb cb, void *user_data) +EXPORT_API int wifi_mesh_get_stations_info(wifi_mesh_h handle, + wifi_mesh_found_station_cb cb, void *user_data) { int rv = 0; CHECK_FEATURE_SUPPORTED(MESH_FEATURE); @@ -123,7 +127,8 @@ EXPORT_API int wifi_mesh_get_stations_info(wifi_mesh_h handle, wifi_mesh_found_s return rv; } -EXPORT_API int wifi_mesh_get_sta_bssid(wifi_mesh_station_info_h station, gchar* bssid) +EXPORT_API int wifi_mesh_get_sta_bssid(wifi_mesh_station_info_h station, + gchar* bssid) { int rv = WIFI_MESH_ERROR_NONE; struct mesh_station_info_s *psta = station; @@ -502,8 +507,8 @@ EXPORT_API int wifi_mesh_get_sta_peer_ps_mode(wifi_mesh_station_info_h station, return rv; } -EXPORT_API int wifi_mesh_get_sta_non_peer_ps_mode(wifi_mesh_station_info_h station, - guint* non_peer_ps_mode) +EXPORT_API int wifi_mesh_get_sta_non_peer_ps_mode( + wifi_mesh_station_info_h station, guint* non_peer_ps_mode) { int rv = WIFI_MESH_ERROR_NONE; struct mesh_station_info_s *psta = station; @@ -768,7 +773,8 @@ EXPORT_API int wifi_mesh_get_sta_connected_time(wifi_mesh_station_info_h station return rv; } -EXPORT_API int wifi_mesh_get_mpath_info(wifi_mesh_h handle, mesh_found_mpath_cb cb, void *user_data) +EXPORT_API int wifi_mesh_get_mpath_info(wifi_mesh_h handle, mesh_found_mpath_cb cb, + void *user_data) { int rv = 0; CHECK_FEATURE_SUPPORTED(MESH_FEATURE); @@ -784,6 +790,196 @@ EXPORT_API int wifi_mesh_get_mpath_info(wifi_mesh_h handle, mesh_found_mpath_cb return rv; } +EXPORT_API int wifi_mesh_get_mpath_dest_addr(wifi_mesh_mpath_info_h mpath, + gchar* dest_addr) +{ + int rv = WIFI_MESH_ERROR_NONE; + struct mesh_mpath_dump_s *pdump = mpath; + + CHECK_FEATURE_SUPPORTED(MESH_FEATURE); + + if (NULL == mpath || NULL == dest_addr) { + /* LCOV_EXCL_START */ + LOGE("Invalid parameter"); + return WIFI_MESH_ERROR_INVALID_PARAMETER; + /* LCOV_EXCL_STOP */ + } + + dest_addr = pdump->dest_addr; + return rv; +} + +EXPORT_API int wifi_mesh_get_mpath_next_hop(wifi_mesh_mpath_info_h mpath, + gchar* next_hop) +{ + int rv = WIFI_MESH_ERROR_NONE; + struct mesh_mpath_dump_s *pdump = mpath; + + CHECK_FEATURE_SUPPORTED(MESH_FEATURE); + + if (NULL == mpath || NULL == next_hop) { + /* LCOV_EXCL_START */ + LOGE("Invalid parameter"); + return WIFI_MESH_ERROR_INVALID_PARAMETER; + /* LCOV_EXCL_STOP */ + } + + next_hop = pdump->next_hop; + return rv; +} + +EXPORT_API int wifi_mesh_get_mpath_iface(wifi_mesh_mpath_info_h mpath, + gchar* iface) +{ + int rv = WIFI_MESH_ERROR_NONE; + struct mesh_mpath_dump_s *pdump = mpath; + + CHECK_FEATURE_SUPPORTED(MESH_FEATURE); + + if (NULL == mpath || NULL == iface) { + /* LCOV_EXCL_START */ + LOGE("Invalid parameter"); + return WIFI_MESH_ERROR_INVALID_PARAMETER; + /* LCOV_EXCL_STOP */ + } + + iface = pdump->iface; + return rv; +} + +EXPORT_API int wifi_mesh_get_mpath_sn(wifi_mesh_mpath_info_h mpath, + guint* sn) +{ + int rv = WIFI_MESH_ERROR_NONE; + struct mesh_mpath_dump_s *pdump = mpath; + + CHECK_FEATURE_SUPPORTED(MESH_FEATURE); + + if (NULL == mpath || NULL == sn) { + /* LCOV_EXCL_START */ + LOGE("Invalid parameter"); + return WIFI_MESH_ERROR_INVALID_PARAMETER; + /* LCOV_EXCL_STOP */ + } + + *sn = pdump->sn; + return rv; +} + +EXPORT_API int wifi_mesh_get_mpath_metric(wifi_mesh_mpath_info_h mpath, + guint* metric) +{ + int rv = WIFI_MESH_ERROR_NONE; + struct mesh_mpath_dump_s *pdump = mpath; + + CHECK_FEATURE_SUPPORTED(MESH_FEATURE); + + if (NULL == mpath || NULL == metric) { + /* LCOV_EXCL_START */ + LOGE("Invalid parameter"); + return WIFI_MESH_ERROR_INVALID_PARAMETER; + /* LCOV_EXCL_STOP */ + } + + *metric = pdump->metric; + return rv; +} + +EXPORT_API int wifi_mesh_get_mpath_qlen(wifi_mesh_mpath_info_h mpath, + guint* qlen) +{ + int rv = WIFI_MESH_ERROR_NONE; + struct mesh_mpath_dump_s *pdump = mpath; + + CHECK_FEATURE_SUPPORTED(MESH_FEATURE); + + if (NULL == mpath || NULL == qlen) { + /* LCOV_EXCL_START */ + LOGE("Invalid parameter"); + return WIFI_MESH_ERROR_INVALID_PARAMETER; + /* LCOV_EXCL_STOP */ + } + + *qlen = pdump->qlen; + return rv; +} + +EXPORT_API int wifi_mesh_get_mpath_exptime(wifi_mesh_mpath_info_h mpath, + guint* exptime) +{ + int rv = WIFI_MESH_ERROR_NONE; + struct mesh_mpath_dump_s *pdump = mpath; + + CHECK_FEATURE_SUPPORTED(MESH_FEATURE); + + if (NULL == mpath || NULL == exptime) { + /* LCOV_EXCL_START */ + LOGE("Invalid parameter"); + return WIFI_MESH_ERROR_INVALID_PARAMETER; + /* LCOV_EXCL_STOP */ + } + + *exptime = pdump->exptime; + return rv; +} + +EXPORT_API int wifi_mesh_get_mpath_disc_timeout(wifi_mesh_mpath_info_h mpath, + guint* discovery_timeout) +{ + int rv = WIFI_MESH_ERROR_NONE; + struct mesh_mpath_dump_s *pdump = mpath; + + CHECK_FEATURE_SUPPORTED(MESH_FEATURE); + + if (NULL == mpath || NULL == discovery_timeout) { + /* LCOV_EXCL_START */ + LOGE("Invalid parameter"); + return WIFI_MESH_ERROR_INVALID_PARAMETER; + /* LCOV_EXCL_STOP */ + } + + *discovery_timeout = pdump->discovery_timeout; + return rv; +} + +EXPORT_API int wifi_mesh_get_mpath_disc_retries(wifi_mesh_mpath_info_h mpath, + guchar* discovery_retries) +{ + int rv = WIFI_MESH_ERROR_NONE; + struct mesh_mpath_dump_s *pdump = mpath; + + CHECK_FEATURE_SUPPORTED(MESH_FEATURE); + + if (NULL == mpath || NULL == discovery_retries) { + /* LCOV_EXCL_START */ + LOGE("Invalid parameter"); + return WIFI_MESH_ERROR_INVALID_PARAMETER; + /* LCOV_EXCL_STOP */ + } + + *discovery_retries = pdump->discovery_retries; + return rv; +} + +EXPORT_API int wifi_mesh_get_mpath_flags(wifi_mesh_mpath_info_h mpath, + guchar* flags) +{ + int rv = WIFI_MESH_ERROR_NONE; + struct mesh_mpath_dump_s *pdump = mpath; + + CHECK_FEATURE_SUPPORTED(MESH_FEATURE); + + if (NULL == mpath || NULL == flags) { + /* LCOV_EXCL_START */ + LOGE("Invalid parameter"); + return WIFI_MESH_ERROR_INVALID_PARAMETER; + /* LCOV_EXCL_STOP */ + } + + *flags = pdump->flags; + return rv; +} + EXPORT_API int wifi_mesh_set_interfaces(wifi_mesh_h handle, const char *mesh, const char* gate, const char *softap) { diff --git a/test/wifi-mesh-network.c b/test/wifi-mesh-network.c index 8da6491..f30f104 100644 --- a/test/wifi-mesh-network.c +++ b/test/wifi-mesh-network.c @@ -248,7 +248,51 @@ static void found_station_cb(wifi_mesh_station_info_h station, void* user_data) static void found_mpath_cb(wifi_mesh_mpath_info_h mpath, void* user_data) { + int ret = WIFI_MESH_ERROR_NONE; + + gchar dest_addr[MAX_BSSID_LEN]; /**< destination address */ + gchar next_hop[MAX_BSSID_LEN]; /**< next hop address */ + gchar iface[32]; /**< network interface for mesh */ + guint sn; /**< sequence number */ + guint metric; /**< metric */ + guint qlen; /**< driver queue length */ + guint exptime; /**< expire time */ + guint discovery_timeout; /**< Discovery timeout */ + guchar discovery_retries; /**< Discovery retries */ + guchar flags; /**< Flags */ + msg("Station Information Received: %p", mpath); + + ret = wifi_mesh_get_mpath_dest_addr(mpath, dest_addr); + if (WIFI_MESH_ERROR_NONE == ret) + msg("dest_addr = %s", dest_addr); + ret = wifi_mesh_get_mpath_next_hop(mpath, next_hop); + if (WIFI_MESH_ERROR_NONE == ret) + msg("next_hop = %s", next_hop); + ret = wifi_mesh_get_mpath_iface(mpath, iface); + if (WIFI_MESH_ERROR_NONE == ret) + msg("iface = %s", iface); + ret = wifi_mesh_get_mpath_sn(mpath, &sn); + if (WIFI_MESH_ERROR_NONE == ret) + msg("sn = %d", sn); + ret = wifi_mesh_get_mpath_metric(mpath, &metric); + if (WIFI_MESH_ERROR_NONE == ret) + msg("metric = %d", metric); + ret = wifi_mesh_get_mpath_qlen(mpath, &qlen); + if (WIFI_MESH_ERROR_NONE == ret) + msg("qlen = %d", qlen); + ret = wifi_mesh_get_mpath_exptime(mpath, &exptime); + if (WIFI_MESH_ERROR_NONE == ret) + msg("exptime = %d", exptime); + ret = wifi_mesh_get_mpath_disc_timeout(mpath, &discovery_timeout); + if (WIFI_MESH_ERROR_NONE == ret) + msg("discovery_timeout = %d", discovery_timeout); + ret = wifi_mesh_get_mpath_disc_retries(mpath, &discovery_retries); + if (WIFI_MESH_ERROR_NONE == ret) + msg("discovery_retries = %d", discovery_retries); + ret = wifi_mesh_get_mpath_flags(mpath, &flags); + if (WIFI_MESH_ERROR_NONE == ret) + msg("flags = %d", flags); } #if 0