summaryrefslogtreecommitdiff
path: root/include/net/nexthop.h
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2019-04-20 19:28:20 +0300
committerDavid S. Miller <davem@davemloft.net>2019-04-23 07:47:25 +0300
commit3c618c1dbb8859625c643121ac80af9a6723533f (patch)
tree73d4f876db16e377320ff1f5f3da8d9d67ba8dc6 /include/net/nexthop.h
parent7e5f4cdb284be5ff862f84ccda084e2847f73fbb (diff)
downloadlinux-3c618c1dbb8859625c643121ac80af9a6723533f.tar.xz
net: Rename net/nexthop.h net/rtnh.h
The header contains rtnh_ macros so rename the file accordingly. Allows a later patch to use the nexthop.h name for the new nexthop code. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/nexthop.h')
-rw-r--r--include/net/nexthop.h34
1 files changed, 0 insertions, 34 deletions
diff --git a/include/net/nexthop.h b/include/net/nexthop.h
deleted file mode 100644
index 902ff382a6dc..000000000000
--- a/include/net/nexthop.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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 >= (int)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