Lines Matching refs:rtnh
555 int rtattr_read_nexthop(const struct rtnexthop *rtnh, size_t size, int family, OrderedSet **ret) { in rtattr_read_nexthop() argument
559 assert(rtnh); in rtattr_read_nexthop()
568 if (NLMSG_ALIGN(rtnh->rtnh_len) > size) in rtattr_read_nexthop()
571 if (rtnh->rtnh_len < sizeof(struct rtnexthop)) in rtattr_read_nexthop()
579 .ifindex = rtnh->rtnh_ifindex, in rtattr_read_nexthop()
580 .weight = rtnh->rtnh_hops, in rtattr_read_nexthop()
583 if (rtnh->rtnh_len > sizeof(struct rtnexthop)) { in rtattr_read_nexthop()
584 size_t len = rtnh->rtnh_len - sizeof(struct rtnexthop); in rtattr_read_nexthop()
586 … for (struct rtattr *attr = RTNH_DATA(rtnh); RTA_OK(attr, len); attr = RTA_NEXT(attr, len)) { in rtattr_read_nexthop()
623 size -= NLMSG_ALIGN(rtnh->rtnh_len); in rtattr_read_nexthop()
624 rtnh = RTNH_NEXT(rtnh); in rtattr_read_nexthop()