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