Lines Matching refs:rtnh
853 struct rtnexthop *rtnh = nla_data(attr); in parse_multipath() local
857 while (tlen >= sizeof(*rtnh) && tlen >= rtnh->rtnh_len) { in parse_multipath()
862 rtnl_route_nh_set_weight(nh, rtnh->rtnh_hops); in parse_multipath()
863 rtnl_route_nh_set_ifindex(nh, rtnh->rtnh_ifindex); in parse_multipath()
864 rtnl_route_nh_set_flags(nh, rtnh->rtnh_flags); in parse_multipath()
866 if (rtnh->rtnh_len > sizeof(*rtnh)) { in parse_multipath()
870 RTNH_DATA(rtnh), in parse_multipath()
871 rtnh->rtnh_len - sizeof(*rtnh), in parse_multipath()
899 tlen -= RTNH_ALIGN(rtnh->rtnh_len); in parse_multipath()
900 rtnh = RTNH_NEXT(rtnh); in parse_multipath()
1147 struct rtnexthop *rtnh; in rtnl_route_build_msg() local
1149 rtnh = nlmsg_reserve(msg, sizeof(*rtnh), NLMSG_ALIGNTO); in rtnl_route_build_msg()
1150 if (!rtnh) in rtnl_route_build_msg()
1153 rtnh->rtnh_flags = nh->rtnh_flags; in rtnl_route_build_msg()
1154 rtnh->rtnh_hops = nh->rtnh_weight; in rtnl_route_build_msg()
1155 rtnh->rtnh_ifindex = nh->rtnh_ifindex; in rtnl_route_build_msg()
1164 rtnh->rtnh_len = nlmsg_tail(msg->nm_nlh) - in rtnl_route_build_msg()
1165 (void *) rtnh; in rtnl_route_build_msg()