Lines Matching refs:rtnh
949 struct rtnexthop *rtnh = nla_data(attr); in parse_multipath() local
953 while (tlen >= sizeof(*rtnh) && tlen >= rtnh->rtnh_len) { in parse_multipath()
958 rtnl_route_nh_set_weight(nh, rtnh->rtnh_hops); in parse_multipath()
959 rtnl_route_nh_set_ifindex(nh, rtnh->rtnh_ifindex); in parse_multipath()
960 rtnl_route_nh_set_flags(nh, rtnh->rtnh_flags); in parse_multipath()
962 if (rtnh->rtnh_len > sizeof(*rtnh)) { in parse_multipath()
966 RTNH_DATA(rtnh), in parse_multipath()
967 rtnh->rtnh_len - sizeof(*rtnh), in parse_multipath()
995 tlen -= RTNH_ALIGN(rtnh->rtnh_len); in parse_multipath()
996 rtnh = RTNH_NEXT(rtnh); in parse_multipath()
1263 struct rtnexthop *rtnh; in rtnl_route_build_msg() local
1265 rtnh = nlmsg_reserve(msg, sizeof(*rtnh), NLMSG_ALIGNTO); in rtnl_route_build_msg()
1266 if (!rtnh) in rtnl_route_build_msg()
1269 rtnh->rtnh_flags = nh->rtnh_flags; in rtnl_route_build_msg()
1270 rtnh->rtnh_hops = nh->rtnh_weight; in rtnl_route_build_msg()
1271 rtnh->rtnh_ifindex = nh->rtnh_ifindex; in rtnl_route_build_msg()
1280 rtnh->rtnh_len = nlmsg_tail(msg->nm_nlh) - in rtnl_route_build_msg()
1281 (void *) rtnh; in rtnl_route_build_msg()