ip6_route.h (bba73071b6f71be0a101658d7c13866e30b264a6) ip6_route.h (b75cc8f90f07342467b3bd51dbc0054f185032c9)
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _NET_IP6_ROUTE_H
3#define _NET_IP6_ROUTE_H
4
5struct route_info {
6 __u8 type;
7 __u8 length;
8 __u8 prefix_len;

--- 61 unchanged lines hidden (view full) ---

70{
71 return (rt->rt6i_flags & (RTF_GATEWAY|RTF_ADDRCONF|RTF_DYNAMIC)) ==
72 RTF_GATEWAY;
73}
74
75void ip6_route_input(struct sk_buff *skb);
76struct dst_entry *ip6_route_input_lookup(struct net *net,
77 struct net_device *dev,
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _NET_IP6_ROUTE_H
3#define _NET_IP6_ROUTE_H
4
5struct route_info {
6 __u8 type;
7 __u8 length;
8 __u8 prefix_len;

--- 61 unchanged lines hidden (view full) ---

70{
71 return (rt->rt6i_flags & (RTF_GATEWAY|RTF_ADDRCONF|RTF_DYNAMIC)) ==
72 RTF_GATEWAY;
73}
74
75void ip6_route_input(struct sk_buff *skb);
76struct dst_entry *ip6_route_input_lookup(struct net *net,
77 struct net_device *dev,
78 struct flowi6 *fl6, int flags);
78 struct flowi6 *fl6,
79 const struct sk_buff *skb, int flags);
79
80struct dst_entry *ip6_route_output_flags(struct net *net, const struct sock *sk,
81 struct flowi6 *fl6, int flags);
82
83static inline struct dst_entry *ip6_route_output(struct net *net,
84 const struct sock *sk,
85 struct flowi6 *fl6)
86{
87 return ip6_route_output_flags(net, sk, fl6, 0);
88}
89
90struct dst_entry *ip6_route_lookup(struct net *net, struct flowi6 *fl6,
80
81struct dst_entry *ip6_route_output_flags(struct net *net, const struct sock *sk,
82 struct flowi6 *fl6, int flags);
83
84static inline struct dst_entry *ip6_route_output(struct net *net,
85 const struct sock *sk,
86 struct flowi6 *fl6)
87{
88 return ip6_route_output_flags(net, sk, fl6, 0);
89}
90
91struct dst_entry *ip6_route_lookup(struct net *net, struct flowi6 *fl6,
91 int flags);
92 const struct sk_buff *skb, int flags);
92struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
93struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
93 int ifindex, struct flowi6 *fl6, int flags);
94 int ifindex, struct flowi6 *fl6,
95 const struct sk_buff *skb, int flags);
94
95void ip6_route_init_special_entries(void);
96int ip6_route_init(void);
97void ip6_route_cleanup(void);
98
99int ipv6_route_ioctl(struct net *net, unsigned int cmd, void __user *arg);
100
101int ip6_route_add(struct fib6_config *cfg, struct netlink_ext_ack *extack);

--- 19 unchanged lines hidden (view full) ---

121 else
122 err = ipv6_dev_get_saddr(net, idev ? idev->dev : NULL,
123 daddr, prefs, saddr);
124
125 return err;
126}
127
128struct rt6_info *rt6_lookup(struct net *net, const struct in6_addr *daddr,
96
97void ip6_route_init_special_entries(void);
98int ip6_route_init(void);
99void ip6_route_cleanup(void);
100
101int ipv6_route_ioctl(struct net *net, unsigned int cmd, void __user *arg);
102
103int ip6_route_add(struct fib6_config *cfg, struct netlink_ext_ack *extack);

--- 19 unchanged lines hidden (view full) ---

123 else
124 err = ipv6_dev_get_saddr(net, idev ? idev->dev : NULL,
125 daddr, prefs, saddr);
126
127 return err;
128}
129
130struct rt6_info *rt6_lookup(struct net *net, const struct in6_addr *daddr,
129 const struct in6_addr *saddr, int oif, int flags);
130u32 rt6_multipath_hash(const struct flowi6 *fl6, const struct sk_buff *skb);
131 const struct in6_addr *saddr, int oif,
132 const struct sk_buff *skb, int flags);
133u32 rt6_multipath_hash(const struct flowi6 *fl6, const struct sk_buff *skb,
134 struct flow_keys *hkeys);
131
132struct dst_entry *icmp6_dst_alloc(struct net_device *dev, struct flowi6 *fl6);
133
134void fib6_force_start_gc(struct net *net);
135
136struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
137 const struct in6_addr *addr, bool anycast);
138

--- 122 unchanged lines hidden (view full) ---

261
262static inline bool rt6_duplicate_nexthop(struct rt6_info *a, struct rt6_info *b)
263{
264 return a->dst.dev == b->dst.dev &&
265 a->rt6i_idev == b->rt6i_idev &&
266 ipv6_addr_equal(&a->rt6i_gateway, &b->rt6i_gateway) &&
267 !lwtunnel_cmp_encap(a->dst.lwtstate, b->dst.lwtstate);
268}
135
136struct dst_entry *icmp6_dst_alloc(struct net_device *dev, struct flowi6 *fl6);
137
138void fib6_force_start_gc(struct net *net);
139
140struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
141 const struct in6_addr *addr, bool anycast);
142

--- 122 unchanged lines hidden (view full) ---

265
266static inline bool rt6_duplicate_nexthop(struct rt6_info *a, struct rt6_info *b)
267{
268 return a->dst.dev == b->dst.dev &&
269 a->rt6i_idev == b->rt6i_idev &&
270 ipv6_addr_equal(&a->rt6i_gateway, &b->rt6i_gateway) &&
271 !lwtunnel_cmp_encap(a->dst.lwtstate, b->dst.lwtstate);
272}
273
269#endif
274#endif