Home
last modified time | relevance | path

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

/linux-4.19.296/include/net/
Dnexthop.h8 static inline int rtnh_ok(const struct rtnexthop *rtnh, int remaining) in rtnh_ok() argument
10 return remaining >= (int)sizeof(*rtnh) && in rtnh_ok()
11 rtnh->rtnh_len >= sizeof(*rtnh) && in rtnh_ok()
12 rtnh->rtnh_len <= remaining; in rtnh_ok()
15 static inline struct rtnexthop *rtnh_next(const struct rtnexthop *rtnh, in rtnh_next() argument
18 int totlen = NLA_ALIGN(rtnh->rtnh_len); in rtnh_next()
21 return (struct rtnexthop *) ((char *) rtnh + totlen); in rtnh_next()
24 static inline struct nlattr *rtnh_attrs(const struct rtnexthop *rtnh) in rtnh_attrs() argument
26 return (struct nlattr *) ((char *) rtnh + NLA_ALIGN(sizeof(*rtnh))); in rtnh_attrs()
29 static inline int rtnh_attrlen(const struct rtnexthop *rtnh) in rtnh_attrlen() argument
[all …]
/linux-4.19.296/include/uapi/linux/
Drtnetlink.h384 #define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && \ argument
385 ((int)(rtnh)->rtnh_len) <= (len))
386 #define RTNH_NEXT(rtnh) ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len))) argument
389 #define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0))) argument