cregit-Linux how code gets into the kernel

Release 4.12 include/net/nexthop.h

Directory: include/net
#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

PersonTokensPropCommitsCommitProp
Thomas Graf41100.00%1100.00%
Total41100.00%1100.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

PersonTokensPropCommitsCommitProp
Thomas Graf50100.00%1100.00%
Total50100.00%1100.00%


static inline struct nlattr *rtnh_attrs(const struct rtnexthop *rtnh) { return (struct nlattr *) ((char *) rtnh + NLA_ALIGN(sizeof(*rtnh))); }

Contributors

PersonTokensPropCommitsCommitProp
Thomas Graf38100.00%1100.00%
Total38100.00%1100.00%


static inline int rtnh_attrlen(const struct rtnexthop *rtnh) { return rtnh->rtnh_len - NLA_ALIGN(sizeof(*rtnh)); }

Contributors

PersonTokensPropCommitsCommitProp
Thomas Graf27100.00%1100.00%
Total27100.00%1100.00%

#endif

Overall Contributors

PersonTokensPropCommitsCommitProp
Thomas Graf170100.00%1100.00%
Total170100.00%1100.00%
Directory: include/net
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.