#ifndef __NET_NEXTHOP_H #define __NET_NEXTHOP_H #include #include static inline int rtnh_ok(const struct rtnexthop *rtnh, int remaining) { return remaining >= sizeof(*rtnh) && rtnh->rtnh_len >= sizeof(*rtnh) && rtnh->rtnh_len <= remaining; } static inline struct rtnexthop *rtnh_next(const struct rtnexthop *rtnh, int *remaining) { int totlen = NLA_ALIGN(rtnh->rtnh_len); *remaining -= totlen; return (struct rtnexthop *) ((char *) rtnh + totlen); } static inline struct nlattr *rtnh_attrs(const struct rtnexthop *rtnh) { return (struct nlattr *) ((char *) rtnh + NLA_ALIGN(sizeof(*rtnh))); } static inline int rtnh_attrlen(const struct rtnexthop *rtnh) { return rtnh->rtnh_len - NLA_ALIGN(sizeof(*rtnh)); } #endif it
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
href='/cgit.cgi/linux/net-next.git/log/tools/testing/selftests/mount?h=nds-private-remove&id=1c0e6a3613d3f0bb088a3160095c8da4c1214d02&showmsg=1'>Expand)
AgeCommit message (Expand)AuthorFilesLines
AuthorFilesLines