Searched refs:rtnh (Results 1 – 2 of 2) sorted by relevance
8 static inline int rtnh_ok(const struct rtnexthop *rtnh, int remaining) in rtnh_ok() argument10 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() argument18 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() argument26 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 …]
384 #define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && \ argument385 ((int)(rtnh)->rtnh_len) <= (len))386 #define RTNH_NEXT(rtnh) ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len))) argument389 #define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0))) argument