__INM_FUNC_EXIT__;
}
+
+static void __print_next_hop_cb(struct rtnl_nexthop *nh, void *data)
+{
+ char buf[128] = {0,};
+ GString *rtnl_route_gs = (GString *)data;
+
+ if (!nh || !rtnl_route_gs)
+ return;
+
+ g_string_append_printf(rtnl_route_gs,
+ "<ifindex:%d>",
+ rtnl_route_nh_get_ifindex(nh));
+ g_string_append_printf(rtnl_route_gs,
+ "<flags:%s>",
+ rtnl_route_nh_flags2str(rtnl_route_nh_get_flags(nh), buf, sizeof(buf)));
+ g_string_append_printf(rtnl_route_gs,
+ "<gateway:%s>",
+ nl_addr2str(rtnl_route_nh_get_gateway(nh), buf, sizeof(buf)));
+}
+
+static void __print_next_hop(struct rtnl_route *route, GString *rtnl_route_gs)
+{
+ rtnl_route_foreach_nexthop(route, __print_next_hop_cb, rtnl_route_gs);
+}
+
static inline void __parse_rtnl_route(struct rtnl_route *p_rtnl_route)
{
GString *rtnl_route_gs = NULL;
"<Rtnl route iif:%s>",
if_indextoname(rtnl_route_get_iif(p_rtnl_route), buf));
+ __print_next_hop(p_rtnl_route, rtnl_route_gs);
+
log_str = g_string_free(rtnl_route_gs, FALSE);
if (log_str) {
PRINT_STR(log_str);