cregit-Linux how code gets into the kernel

Release 4.15 include/net/nexthop.h

Directory: include/net
/* SPDX-License-Identifier: GPL-2.0 */
#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 Graf17099.42%150.00%
Greg Kroah-Hartman10.58%150.00%
Total171100.00%2100.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.