Lines Matching refs:rtnh
8 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
31 return rtnh->rtnh_len - NLA_ALIGN(sizeof(*rtnh)); in rtnh_attrlen()