1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef _IPV6_STUBS_H 3 #define _IPV6_STUBS_H 4 5 #include <linux/in6.h> 6 #include <linux/netdevice.h> 7 #include <linux/skbuff.h> 8 #include <net/dst.h> 9 #include <net/flow.h> 10 #include <net/neighbour.h> 11 #include <net/sock.h> 12 #include <net/ipv6.h> 13 14 /* structs from net/ip6_fib.h */ 15 struct fib6_info; 16 struct fib6_nh; 17 struct fib6_config; 18 struct fib6_result; 19 20 /* This is ugly, ideally these symbols should 21 * into the core kernel. 22 */ 23 struct ipv6_stub { 24 int (*ipv6_sock_mc_join)(struct sock * 25 const struct 26 int (*ipv6_sock_mc_drop)(struct sock * 27 const struct 28 struct dst_entry *(*ipv6_dst_lookup_fl 29 30 31 32 int (*ipv6_route_input)(struct sk_buff 33 34 struct fib6_table *(*fib6_get_table)(s 35 int (*fib6_lookup)(struct net *net, in 36 struct fib6_result 37 int (*fib6_table_lookup)(struct net *n 38 int oif, stru 39 struct fib6_r 40 void (*fib6_select_path)(const struct 41 struct flowi6 42 const struct 43 u32 (*ip6_mtu_from_fib6)(const struct 44 const struct 45 const struct 46 47 int (*fib6_nh_init)(struct net *net, s 48 struct fib6_config 49 struct netlink_ext 50 void (*fib6_nh_release)(struct fib6_nh 51 void (*fib6_nh_release_dsts)(struct fi 52 void (*fib6_update_sernum)(struct net 53 int (*ip6_del_rt)(struct net *net, str 54 void (*fib6_rt_update)(struct net *net 55 struct nl_info 56 57 void (*udpv6_encap_enable)(void); 58 void (*ndisc_send_na)(struct net_devic 59 const struct in6 60 bool router, boo 61 #if IS_ENABLED(CONFIG_XFRM) 62 void (*xfrm6_local_rxpmtu)(struct sk_b 63 int (*xfrm6_udp_encap_rcv)(struct sock 64 struct sk_buff *(*xfrm6_gro_udp_encap_ 65 66 67 int (*xfrm6_rcv_encap)(struct sk_buff 68 int encap_type) 69 #endif 70 struct neigh_table *nd_tbl; 71 72 int (*ipv6_fragment)(struct net *net, 73 int (*output)(str 74 struct net_device *(*ipv6_dev_find)(st 75 st 76 int (*ip6_xmit)(const struct sock *sk, 77 __u32 mark, struct ipv 78 }; 79 extern const struct ipv6_stub *ipv6_stub __rea 80 81 /* A stub used by bpf helpers. Similarly ugly 82 struct ipv6_bpf_stub { 83 int (*inet6_bind)(struct sock *sk, str 84 u32 flags); 85 struct sock *(*udp6_lib_lookup)(struct 86 const str 87 const str 88 int dif, 89 struct sk 90 int (*ipv6_setsockopt)(struct sock *sk 91 sockptr_t optva 92 int (*ipv6_getsockopt)(struct sock *sk 93 sockptr_t optva 94 int (*ipv6_dev_get_saddr)(struct net * 95 const struct 96 const struct 97 unsigned int 98 struct in6_a 99 }; 100 extern const struct ipv6_bpf_stub *ipv6_bpf_st 101 102 #endif 103
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.