Lines Matching refs:rtnh
7 static inline int rtnh_ok(const struct rtnexthop *rtnh, int remaining) in rtnh_ok() argument
9 return remaining >= sizeof(*rtnh) && in rtnh_ok()
10 rtnh->rtnh_len >= sizeof(*rtnh) && in rtnh_ok()
11 rtnh->rtnh_len <= remaining; in rtnh_ok()
14 static inline struct rtnexthop *rtnh_next(const struct rtnexthop *rtnh, in rtnh_next() argument
17 int totlen = NLA_ALIGN(rtnh->rtnh_len); in rtnh_next()
20 return (struct rtnexthop *) ((char *) rtnh + totlen); in rtnh_next()
23 static inline struct nlattr *rtnh_attrs(const struct rtnexthop *rtnh) in rtnh_attrs() argument
25 return (struct nlattr *) ((char *) rtnh + NLA_ALIGN(sizeof(*rtnh))); in rtnh_attrs()
28 static inline int rtnh_attrlen(const struct rtnexthop *rtnh) in rtnh_attrlen() argument
30 return rtnh->rtnh_len - NLA_ALIGN(sizeof(*rtnh)); in rtnh_attrlen()