Release 4.12 include/net/nexthop.h
#ifndef __NET_NEXTHOP_H
#define __NET_NEXTHOP_H
#include <linux/rtnetlink.h>
#include <net/netlink.h>
static inline int rtnh_ok(const struct rtnexthop *rtnh, int remaining)
{
return remaining >= sizeof(*rtnh) &&
rtnh->rtnh_len >= sizeof(*rtnh) &&
rtnh->rtnh_len <= remaining;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Thomas Graf | 41 | 100.00% | 1 | 100.00% |
Total | 41 | 100.00% | 1 | 100.00% |
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);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Thomas Graf | 50 | 100.00% | 1 | 100.00% |
Total | 50 | 100.00% | 1 | 100.00% |
static inline struct nlattr *rtnh_attrs(const struct rtnexthop *rtnh)
{
return (struct nlattr *) ((char *) rtnh + NLA_ALIGN(sizeof(*rtnh)));
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Thomas Graf | 38 | 100.00% | 1 | 100.00% |
Total | 38 | 100.00% | 1 | 100.00% |
static inline int rtnh_attrlen(const struct rtnexthop *rtnh)
{
return rtnh->rtnh_len - NLA_ALIGN(sizeof(*rtnh));
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Thomas Graf | 27 | 100.00% | 1 | 100.00% |
Total | 27 | 100.00% | 1 | 100.00% |
#endif
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Thomas Graf | 170 | 100.00% | 1 | 100.00% |
Total | 170 | 100.00% | 1 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.