Home
last modified time | relevance | path

Searched refs:rtnh (Results 1 – 4 of 4) sorted by relevance

/systemd-251/src/libsystemd/sd-netlink/
Dnetlink-util.c555 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()
[all …]
Dnetlink-util.h144 int rtattr_read_nexthop(const struct rtnexthop *rtnh, size_t size, int family, OrderedSet **ret);
/systemd-251/src/basic/linux/
Drtnetlink.h424 #define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && \ argument
425 ((int)(rtnh)->rtnh_len) <= (len))
426 #define RTNH_NEXT(rtnh) ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len))) argument
429 #define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0))) argument
/systemd-251/src/network/
Dnetworkd-route.c1053 struct rtnexthop *rtnh; in append_nexthop_one() local
1067 rtnh = (struct rtnexthop *)((uint8_t *) *rta + offset); in append_nexthop_one()
1068 *rtnh = (struct rtnexthop) { in append_nexthop_one()
1069 .rtnh_len = sizeof(*rtnh), in append_nexthop_one()
1080 rtnh = (struct rtnexthop *)((uint8_t *) *rta + offset); in append_nexthop_one()
1081 rtnh->rtnh_len += RTA_SPACE(FAMILY_ADDRESS_SIZE(m->gateway.family)); in append_nexthop_one()
1086 rtnh = (struct rtnexthop *)((uint8_t *) *rta + offset); in append_nexthop_one()
1087rtnh->rtnh_len += RTA_SPACE(FAMILY_ADDRESS_SIZE(m->gateway.family) + sizeof(m->gateway.family)); in append_nexthop_one()
1099 struct rtnexthop *rtnh; in append_nexthops() local
1126 rtnh = (struct rtnexthop *)((uint8_t *) rta + offset); in append_nexthops()
[all …]